chrisvwn / Rnightlights

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

Problem Downloading VIIRS.Y type data #21

Closed millancho closed 5 years ago

millancho commented 5 years ago

Hey Chris,

Thank you for this magnificent package. I was able to download data for Cuba about 9 months ago with the latest version you had released at the time. Today I was looking to update that data but encountered this error: "Error in seq.int(r1$year, to0$year, by) : 'to' must be a finite number"

I took a quick look at the data available for the different "nlTypes" but there only seems to be data for "OLS.Y" according to the allValidNlPeriods function. I'm a little confused as to why this is happening since there are actual files on the website as you can see at "https://ngdc.noaa.gov/eog/viirs/download_dnb_composites.html"

I would appreciate any help you could provide me with regarding this problem.

Thank you very much,

chrisvwn commented 5 years ago

Hey @millancho ,

You're welcome and I am glad that the package is of use.

This looks like the same problem as #8 related to the locale. Could you look at the suggested solution and see if it works for you?

Chris

millancho commented 5 years ago

Thanks for the quick reply Chris. Really appreciate the help.

Cheers

chrisvwn commented 5 years ago

You're welcome. Please let me know if this resolves your issue or if you require a follow up.

millancho commented 5 years ago

Hey @chrisvwn ,

I encountered an error on the return dataframe obtained from getCtryNlData. Maybe it is an especific problem on the Country I'm getting the data from (CUBA) and the adm0/1/2 files associated with it. Basically, I'm missing the data from a whole province, in both adm1 and adm2 levels, I was wondering if you know of a solution to fix this problem. Maybe by accesing the .shp files?

I would appreciate any ideas or a way to solve this,

Millancho

chrisvwn commented 5 years ago

Hi @millancho ,

I guess this means the original issue was fixed?

I haven't worked with CUBA data. You can load the Cuba shapefile in a program like QGIS and see if there is missing data. Find it in the polygons folder in the Rnightlights folder. If you do find some discrepancies you can contact the people at http://www.gadm.org for assistance.

millancho commented 5 years ago

Hey Chris,

Sorry, yes, the main issue was indeed fixed.

And thanks, I’ll try that right now.

chrisvwn commented 5 years ago

Hey @millancho,

I will close this issue for now. If you still have an issue with the CUBA data, please open a new issue and I will endeavour to get you a solution.

Regards,

Chris