A few days ago, a reddit user posted a beautiful visualization for Mean Centers of U.S. population by state on /r/MapPorn subreddit.
Pretty neat, right ? This map conveys the point across and also maintains an appeasing simplicity. This inspired me to create a similar population map for my motherland, India.
But what I imagined to be a straightforward task, turned into something really complicated. While the original creator of the above reddit post was able to get the desired data in neatly arranged format from the US Census Bureau website, similar information wasn’t readily available for India. So, I set out to create my map from scratch.
Python code that useds Pandas to manipulate web-scraped population data. Along with code to manipulate geospatial data to generate the desired results.
Read the complete project details here: https://medium.com/@sam.sumitkumar/plotting-weighted-mean-population-centroids-on-a-country-map-22da408c1397
Indian districts mapped as polygons