Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ramarty committed Dec 6, 2023
1 parent 2aaaec4 commit 3196816
Show file tree
Hide file tree
Showing 4 changed files with 166 additions and 58 deletions.
5 changes: 3 additions & 2 deletions R/blackmarbler.R
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ file_to_raster <- function(f,

if(length(quality_flag_rm) > 0){
if(variable %in% c("DNB_BRDF-Corrected_NTL",
"Gap_Filled_DNB_BRDF-Corrected_NTL")){
"Gap_Filled_DNB_BRDF-Corrected_NTL",
"Latest_High_Quality_Retrieval")){
for(val in quality_flag_rm){ # out[qf %in% quality_flag_rm] doesn't work, so loop
out[qf == val] <- NA
}
Expand Down Expand Up @@ -352,7 +353,7 @@ download_raster <- function(file_name,
headers <- c('Authorization' = paste('Bearer', bearer))
download_path <- file.path(temp_dir, file_name)

if(quiet == FALSE) message(paste0("Downloading: ", file_name))
if(quiet == FALSE) message(paste0("Processing: ", file_name))

response <- GET(url, add_headers(headers), write_disk(download_path, overwrite = TRUE))

Expand Down
2 changes: 1 addition & 1 deletion _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
url: https://worldbank.github.io/blackmarbler/
url: ~
template:
bootstrap: 5

2 changes: 1 addition & 1 deletion vignettes/assess-quality.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ ntl_tmp_gap_r <- ntl_tmp_gap_r |> mask(roi_sf)
ntl_tmp_gap_df <- rasterToPoints(ntl_tmp_gap_r, spatial = TRUE) |> as.data.frame()
names(ntl_tmp_gap_df) <- c("value", "x", "y")
ntl_tmp_gap_df$value[ntl_tmp_gap_df$value == 255] <- NA
#ntl_tmp_gap_df$value[ntl_tmp_gap_df$value == 255] <- NA
##### Map
ggplot() +
Expand Down
215 changes: 161 additions & 54 deletions vignettes/assess-quality.html

Large diffs are not rendered by default.

0 comments on commit 3196816

Please sign in to comment.