Thank you very much for your code. I'm currently trying to replicate the example you gave in your post (https://github.com/chrisvwn/Rnightlights), but unfortunately I keep getting the following error message: "Error in seq.int(0, to0 - from, by) : 'to' must be a finite number". Below is the log.
Could you please help me fix this.
Best regards.
install.packages("Rnightlights")
Installing package into ‘C:/Users/MXXG6212/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/Rnightlights_0.2.2.zip'
Content type 'application/zip' length 272820 bytes (266 KB)
downloaded 266 KB
package ‘Rnightlights’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\MXXG6212\AppData\Local\Temp\RtmpGwsMQp\downloaded_packages
install.packages("lubridate")
Installing package into ‘C:/Users/MXXG6212/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/lubridate_1.7.4.zip'
Content type 'application/zip' length 1365237 bytes (1.3 MB)
downloaded 1.3 MB
package ‘lubridate’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\MXXG6212\AppData\Local\Temp\RtmpGwsMQp\downloaded_packages
install.packages("reshape2")
Installing package into ‘C:/Users/MXXG6212/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/reshape2_1.4.3.zip'
Content type 'application/zip' length 610734 bytes (596 KB)
downloaded 596 KB
package ‘reshape2’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\MXXG6212\AppData\Local\Temp\RtmpGwsMQp\downloaded_packages
install.packages("ggplot2")
Installing package into ‘C:/Users/MXXG6212/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/ggplot2_3.0.0.zip'
Content type 'application/zip' length 3146975 bytes (3.0 MB)
downloaded 3.0 MB
package ‘ggplot2’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\MXXG6212\AppData\Local\Temp\RtmpGwsMQp\downloaded_packages
install.packages("plotly")
Installing package into ‘C:/Users/MXXG6212/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/plotly_4.8.0.zip'
Content type 'application/zip' length 2138016 bytes (2.0 MB)
downloaded 2.0 MB
package ‘plotly’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\MXXG6212\AppData\Local\Temp\RtmpGwsMQp\downloaded_packages
library(Rnightlights)
The Rnightlights package needs to create a directory that will hold package files and data which may be large.
Please choose a location where this directory will be created. Recommend 3GB+ For multiple countries & periods.If none is chosen a temporary directory will be used for this session only.
Would you like to choose a different data directory?
Enter 0 to use a temporary directory for this session only.
1: Create data path under home directory 'C:/Users/MXXG6212/Documents
2: Choose a different directory as the data path
Selection: 1
Data directory created C:/Users/MXXG6212/Documents/.Rnightlights
Rnightlights may require 3GB+. Run setupDataPath() to change the location
Upgrading data directory to ver. 0.2.2
Renaming tiles:
No upgrade required
Renaming data files:
No upgrade required
Renaming country rasters:
No upgrade required
Remove Old Zonal Files:
No upgrade required
Upgrade complete!
library(lubridate)
Attachement du package : ‘lubridate’
The following object is masked from ‘package:base’:
date
library(reshape2)
ctry <- "KEN"
highestAdmLevelStats <- getCtryNlData(ctryCode = ctry, admLevel = "highest", nlType = "VIIRS.M", nlPeriods = nlRange("201401", "201412"), nlStats = "sum", ignoreMissing=FALSE)
Error in seq.int(0, to0 - from, by) : 'to' must be a finite number
Dear Chris,
Thank you very much for your code. I'm currently trying to replicate the example you gave in your post (https://github.com/chrisvwn/Rnightlights), but unfortunately I keep getting the following error message: "Error in seq.int(0, to0 - from, by) : 'to' must be a finite number". Below is the log.
Could you please help me fix this.
Best regards.
package ‘Rnightlights’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in C:\Users\MXXG6212\AppData\Local\Temp\RtmpGwsMQp\downloaded_packages
package ‘lubridate’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in C:\Users\MXXG6212\AppData\Local\Temp\RtmpGwsMQp\downloaded_packages
package ‘reshape2’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in C:\Users\MXXG6212\AppData\Local\Temp\RtmpGwsMQp\downloaded_packages
package ‘ggplot2’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in C:\Users\MXXG6212\AppData\Local\Temp\RtmpGwsMQp\downloaded_packages
package ‘plotly’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in C:\Users\MXXG6212\AppData\Local\Temp\RtmpGwsMQp\downloaded_packages
Please choose a location where this directory will be created. Recommend 3GB+ For multiple countries & periods.If none is chosen a temporary directory will be used for this session only.
Would you like to choose a different data directory?
Enter 0 to use a temporary directory for this session only.
1: Create data path under home directory 'C:/Users/MXXG6212/Documents 2: Choose a different directory as the data path
Selection: 1 Data directory created C:/Users/MXXG6212/Documents/.Rnightlights Rnightlights may require 3GB+. Run setupDataPath() to change the location Upgrading data directory to ver. 0.2.2 Renaming tiles: No upgrade required Renaming data files: No upgrade required Renaming country rasters: No upgrade required Remove Old Zonal Files: No upgrade required Upgrade complete!
Attachement du package : ‘lubridate’
The following object is masked from ‘package:base’: