The most efficient way to process nightlights data?
Using Google Earth Engine.
But using it with R can be tough.
So here's a detailed guide on how to do it:
#rstats
Using Google Earth Engine.
But using it with R can be tough.
So here's a detailed guide on how to do it:
#rstats
Step 2:
Install the RGEE package using the following instructions from Ricardo Dalagnol's video:
youtu.be
Install the RGEE package using the following instructions from Ricardo Dalagnol's video:
youtu.be
Step 3:
Import your region of interestโi.e. an SF object.
You can download this directly to your workspace using the geodata package.
Import your region of interestโi.e. an SF object.
You can download this directly to your workspace using the geodata package.
Step 6:
Filter for the months we're interested in.
It will be January 2014 - December 2022.
We can do this using the filterDate() command from RGEE.
Filter for the months we're interested in.
It will be January 2014 - December 2022.
We can do this using the filterDate() command from RGEE.
Step 7:
Calculate the zonal statistics for the region of interest.
We can sum up all luminous pixels for the region using the ee_extract() command.
The output will be a wide data frame.
Calculate the zonal statistics for the region of interest.
We can sum up all luminous pixels for the region using the ee_extract() command.
The output will be a wide data frame.
And there you have it.
Nightlights data processed and visualised in just 5 steps.
No downloading data locally needed.
Nightlights data processed and visualised in just 5 steps.
No downloading data locally needed.
If you liked this then give us a follow @yohaniddawela for more breakdowns and tutorials.
You may also enjoy this post on nightlights data:
You may also enjoy this post on nightlights data:
Interested in going deeper?
I provide more in-depth geospatial analyses and tutorials in my newsletter.
You can subscribe here: yohan.so
I provide more in-depth geospatial analyses and tutorials in my newsletter.
You can subscribe here: yohan.so
Loading suggestions...