Choropleths are thematic maps shaded or patterned in proportion to the measurement of the statistical variable being displayed on the map, such as population density or per-capita-income.
This post is about creating quick choropleth maps in R, with macroeconomic data across geographies.
As a sample exercise, I decided to get data on what percentage of their aggregate disbursements, do states in India spend on development expenditure. I got the data from the Reserve Bank of India’s website. I had to clean the data a little for easy handling in R. Here’s the cleaned data.
…and as expected, the lines of code above print out the desired map
In the examples above I set the buckets attribute equal to 9. That set the data in discrete scales. Had I set buckets = 1 instead, we would have got a continuous scale of data.
The same for the last 2 fiscal years:
For the US, there are amazing packages for county level and ZIP code level detail of data visualization.