Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ramarty committed Jan 3, 2025
1 parent 2d11b35 commit e326517
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion R/blackmarbler.R
Original file line number Diff line number Diff line change
Expand Up @@ -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-"))
}
}

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Follow the below steps to obtain a bearer token:
<img src="man/figures/nasa_profile_info.png" alt="NASA Profile Home Information" width="500"/>
</p>

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.

Expand Down
2 changes: 1 addition & 1 deletion readme_figures/readme_test_1.R
Original file line number Diff line number Diff line change
Expand Up @@ -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()
roi_sf <- gadm(country = "GHA", level=1, path = tempdir()) |> st_as_sf()
2 changes: 1 addition & 1 deletion readme_figures/testing_from_source.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down

0 comments on commit e326517

Please sign in to comment.