Sunday, February 4, 2018

Vietnam interactive map with R

 

This is my first attempt at drawing an interactive map with leaflet, created by the Rstudio team (a nice introduction to the package, which I follow to create this map, can be found here). Quite a bit of data involved, so the map might load rather slowly.
The data are from the Vietnam Household Living Standard Survey (VHLSS), 2014 round. They are available for purchase from the Vietnam's General Statistics Office. Here I only use income data ("Muc 4"). I aggregated the multiple income sources at the household level (summing across all family members), and take the unweighted mean of income across all households surveyed in each province.

  • The gradient color scaling is based on the magnitude of the mean income from all sources. The darker the color scheme, the more affluence the average household there.
  • To see the underlying data for the provinces, hover your mouse over the corresponding provinces. Keep in mind that this is only a prototype. I'm planning to break the map into layers (each shows one category of income) and better representations.
  • Zoom in using mouse scroll or the buttons on the left. Click, hold and drag left mouse to refocus.
Feel free to contact me for details.

No comments:

Post a Comment

Please leave your comment here.