chrisvwn / Rnightlights

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

High variability in radiance readings from one month to another #37

Closed nreguera closed 4 years ago

nreguera commented 5 years ago

Hi Chris,

About the high variability found in some villages (Voat in Cambodia), one reason could be that this Village is included in three different districts (I guess is because the data I have is wrong or because the town it has the same name for the different districts), so when I plot it it shows the readings frmo different villages... Can you check this?

chrisvwn commented 5 years ago

Hi Natxo,

Thanks for the observation. This is interesting. Let me have a look and get back.

chrisvwn commented 5 years ago

Hi Natxo,

So looking at the graphs of the sum of radiances for MMR, I think this may be greatly explained by cloud cover. One of the factors that greatly affects nightlights is cloud cover as the light generated at the earth's surface is largely unable to penetrate clouds. While VIIRS.M takes an average of readings across the month, if the cloud cover is very dense across the month e.g. in the rainy season, average readings may be close to zero.

To test this theory, we can look at the graphs of nightlights and compare with cloud cover graphs. We expect a kind of inverse relationship - when cloud cover is high, nightlight readings will be low and vice versa. Please see the graphs below

Screenshot from 2019-08-30 16-10-57 Plot of monthly average sum of radiances for MMR, 2014 at village level

Screenshot from 2019-08-30 15-57-34 Monthly % cloud cover for 2014 source: https://www.worldweatheronline.com/yangon-weather-averages/yangon/mm.aspx

From visual inspection, I think this shows it somewhat holds.

Another test would be to see if this variance holds across other time periods as well as checking whether this inverse relationship also holds for these other time periods.

nreguera commented 5 years ago

Hi,

Yes, it looks that some natural sources of light and other climate conditions can distort the readings. I think there is already a team in the NASA that is working on this, trying to generate algorithms capable of adjusting this.

About the variability I was refering, it looks that there are three readings for this "Voat" village in Cambodia. If you look at this graph, you can see 3 stacked points for each period (it´s more clear on the right side of the graph):

screenshot

So I think this is a matter of cleaning the dataset and give the geographical divisions the name that it correspond, right?

chrisvwn commented 5 years ago

Oh! I don't know why I run the analysis for MMR instead of KHM. I think I mixed this with another question. Sorry about that!

Let me have a quick look at Voat in KHM. Indeed, if you have 3 stacked values there must be similar names involved. If this is the case then you may want to use a combination of the province, district, commune and village to uniquely identify the villages?

chrisvwn commented 5 years ago

I note there are quite a number of NAs and duplicates in the village names. For example duplicates for "Voat":

b <- Rnightlights:::readCtryStruct("KHM")

b[which(b$`village_(phum)`=="Voat"),]

   country province_(khêt) district_(srok)     commune_(khum) village_(phum) area_sq_km
1:     KHM    Kâmpóng Cham    Stueng Trang Tuol Preah Khleang           Voat   77.76127
2:     KHM        Siemréab           Varin          Srae Nouy           Voat  789.43798
3:     KHM      Svay Rieng     Romeas Haek               Tras           Voat  122.36605

So maybe use a combination of the admin level names to get a unique village.

Considering the NAs, it may require the sourcing of a better labelled map at village level if you are primarily working at this level. One resource I am currently investigating that could be of help is http://www.geoboundaries.org/data. If this is viable it may be possible to use the custPolyPath feature in Rnightlights to import a shapefile zip though this feature is not well tested.

nreguera commented 4 years ago

Haha, maybe because I am in Yangon, but the study I am doing is for Cambodia mainly :)

Yes, probably you are right, there is a need to clean the data, and to subset the villages using the whole administrative division details.

That looks interesting, it may help us with those issues yes.... Anyway, despite I am looking a bit at village level, I jumped over the districts and provinces to make most of the analysis, as it´s very difficult to find data at that granularity level...

Thanks!

nreguera commented 3 years ago

Hi Chris,

Just reviewing this again.

I am now working with Myanmar data. I have calculated the monthly change for each township (for example the difference between the lights of August-2016 and September-2016 for the township Mansi is a 123% of change increase, meaning that in September there is more than double radiance than in August).

Overall the changes have high variability from one month to the next. and a lot of ups and downs. For example here you can see the changes in all the townships in Kachin state (the y-axis reflects the change in %):

image

Do you think this data is according to the rasters and to the climate conditions (like clouds) as we said before in this thread, or maybe I could have done some wrong calculation?

Thanks.

chrisvwn commented 3 years ago

Hi Natxo,

I think this may be related to background removal/masking and maybe some other pre-processing which the package does not yet do. This is the reason I pulled the package from CRAN. When I find the procedures and find time I will implement them in the package.