diff --git a/R/blackmarbler.R b/R/blackmarbler.R index febaba4..6a364ae 100644 --- a/R/blackmarbler.R +++ b/R/blackmarbler.R @@ -540,7 +540,7 @@ download_raster <- function(file_name, if(response$status_code == 200){ if(length(response$body) < 10000){ - stop(paste0("Issue with bearer token. You may need to generate a new token. Ensure that select EULAs are accepted. Please see the instructions here: https://github.com/worldbank/blackmarbler?tab=readme-ov-file#bearer-token-")) + stop(paste0("\nISSUE WITH BEARER TOKEN. You may need to generate a new token. Ensure that select EULAs are accepted. Please see the instructions here: https://github.com/worldbank/blackmarbler?tab=readme-ov-file#bearer-token-")) } } diff --git a/README.md b/README.md index 9b86128..d69b05f 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ Follow the below steps to obtain a bearer token: NASA Profile Home Information

-7. Go to the [NASA LAADS Archive](https://ladsweb.modaps.eosdis.nasa.gov/missions-and-measurements/products/VNP46A4/) and login (login botton on top right). You will see a page to authorize use of Sentinel3 and Meris. Click the green "Authorize" button. +7. Go to the [NASA LAADS Archive](https://ladsweb.modaps.eosdis.nasa.gov/missions-and-measurements/products/VNP46A4/) and login (login button on top right). You will see a page to authorize use of Sentinel3 and Meris. Click the green "Authorize" button. 8. To obtain the bearer token, go to the [Earth Data Login](https://urs.earthdata.nasa.gov/users) page and login. On the top panel, click "Generate token". On this page, click "Show Token" to see the bearer token. diff --git a/readme_figures/readme_test_1.R b/readme_figures/readme_test_1.R index 3810970..3e7d124 100644 --- a/readme_figures/readme_test_1.R +++ b/readme_figures/readme_test_1.R @@ -14,4 +14,4 @@ bearer <- "BEARER-TOKEN-HERE" # Define region of interest (roi). The roi must be (1) an sf polygon and (2) # in the WGS84 (epsg:4326) coordinate reference system. Here, we use the # getData function to load a polygon of Ghana -roi_sf <- gadm(country = "GHA", level=1, path = tempdir()) |> st_as_sf() \ No newline at end of file +roi_sf <- gadm(country = "GHA", level=1, path = tempdir()) |> st_as_sf() diff --git a/readme_figures/testing_from_source.R b/readme_figures/testing_from_source.R index ee746b0..18c0c70 100644 --- a/readme_figures/testing_from_source.R +++ b/readme_figures/testing_from_source.R @@ -17,7 +17,7 @@ library(terra) source("~/Documents/Github/blackmarbler/R/blackmarbler.R") -bearer <- read.csv("~/Dropbox/bearer_bm.csv")$token +#bearer <- read.csv("~/Dropbox/bearer_bm.csv")$token roi_sf <- data.frame(lat = -1.943889, lon = 30.059444, id = 1) |> st_as_sf(coords = c("lon", "lat"),