chrisvwn / Rnightlights

R package to extract data from satellite nightlights.
GNU General Public License v3.0
47 stars 14 forks source link

Error accessing composites page #45

Closed nreguera closed 4 years ago

nreguera commented 4 years ago

Hi Chris,

When I try to download data I get this mesage:

Error in utils::download.file(url = ntLtsIndexUrlVIIRS, destfile = ntLtsPageLocalName, : cannot open URL 'https://eogdata.mines.edu/download_dnb_composites_iframe.html'

When I try to open the url in chrome it doesn´t load.

chrisvwn commented 4 years ago

Hi Natxo,

Maybe this was a temporary problem? I am able to access the page both manually and from the package. See below though 201909 is not found on the page.

> a <- Rnightlights::getCtryNlData("KEN", "adm0", "VIIRS.M", "201909", "sum")
Processing missing data: KEN:VIIRS.M:VCMCFG:201909:sum. This may take a while. 
Note: Set 'ignoreMissing=TRUE' to return only data found or 
'ignoreMissing=NULL' to return NULL if not all the data is found
2019-11-25 13:01:28: **** START PROCESSING: ctryCodes=KEN, admLevels=list(KEN = "gadm36_KEN_0"), nlTypes=VIIRS.M, configNames=VCMCFG, multiTileStrategy=all, multiTileMergeFun=mean, removeGasFlares=TRUE, nlPeriods=201909, nlStats=sum, custPolyPath=NULL, gadmVersion=3.6, gadmPolyType=shpZip, downloadMethod=auto, cropMaskMethod=rast, extractMethod=rast****
2019-11-25 13:01:28: Downloading country polygons ...
  |                                                                                                |   0%2019-11-25 13:01:28: Downloading polygon: KEN
2019-11-25 13:01:28: Downloading ctry poly: KEN
2019-11-25 13:01:28: Downloading ctry shpZip: KEN
2019-11-25 13:01:28: Polygon dir for KEN:3.6 already exists
  |================================================================================================| 100%
2019-11-25 13:01:28: Downloading country polygons ... DONE
2019-11-25 13:01:28: **** PROCESSING nlType:VIIRS.M | configName: VCMCFG | nlPeriod:201909****
2019-11-25 13:01:28: Checking tiles required for VIIRS.M 201909
2019-11-25 13:01:28: KEN: Stats missing. Adding tiles
2019-11-25 13:01:29: numTiles: 2, Required tiles: 75N060W,00N060W
2019-11-25 13:01:29: Downloading tile: 2019092
trying URL 'https://eogdata.mines.edu/download_dnb_composites_iframe.html'
Content type 'text/html; charset=UTF-8' length 234051 bytes (228 KB)
==================================================
downloaded 228 KB

2019-11-25 13:01:35: ** Tile not available on the NOAA page.
nreguera commented 4 years ago

It looks like, now I am able to download. Thanks.