India in Data

Plotting India: Challenges and Resources

We discuss the challenges in visualizing Indian geographical datasets, and provide references to reliable maps and sample code using the latest version of d3.

The internal state-boundaries of India have changed several times in the last 20 years thanks to five new states. In our experience, quite a few Indian maps shipped with popular libraries are outdated.

Additional geopolitical issues make Indian cartography hard. The Kashmir region in the north is broken up into three territories administered by India, Pakistan, and China. China also claims additional territory that is currently administered by India.

Maps of India encountered outside the country exclude (some of) the disputed territories that India doesn’t administer. However, most Indians only know (and expect) a map that includes these regions in the mainland. Not doing so can apparently carry significant legal consequences.

Thus, there are 2 map flavors you want - ones that include the disputed territories that India claims but doesn’t administer, and ones that don’t. For a userbase that is based in India (or includes an outsized number of Indians), you might prefer the former. The latter should be fine for everything else (and is typically the default in many libraries).

We next provide sample code and map geojson references. All the code used to render these plots is available from this Observable notebook: https://observablehq.com/@shriphani/india-map-examples.

India With All Claimed Territories

The Hindustan Times, a highly regarded national daily newspaper maintains very high quality geojsons of India with the disputed territories included in this git repository: https://github.com/HindustanTimesLabs/shapefiles. Here is this map rendered using d3:

India Administered Areas Only

We are also releasing a set of geojsons obtained from the GADM project that are highly accurate. If you want a version of India with territories administered fully by India, and without the disputed bits they don’t administer, these will get the job done. The full set of geojsons is available from this git repository: https://github.com/india-in-data/india_maps. When rendered with d3, the map of Indian states looks like this:

Centering World Map on India

In a visualization with India as the theme, it is highly advised to center the map around India else it just looks weird. You can just plug in the longitude to d3’s rotate method and it will take care of the rest. Here is a country map from Natural Earth centered on India:

comments powered by Disqus