On most political maps produced in modern times, nation states and other geo-political bodies are represented as homogeneous slabs that have no internal structure: the inner city of the capital is as much part of the country as its most deserted hinterland. The country extends uniformly all the way to its well-defined border, where it meets up with either neighbouring nations or the sea. What such maps show is really the extent of the territory over which a government claimssovereign authority, independently of whether (or how much) this authority is actually exercised. But what does it really mean for a country or state to be "the biggest" when large swathes of its territory are of little human interest, and therefore completely uninhabited or uncontrolled? And what does it mean for a country to have "the most inhabitants", if its population centers are separated by thousands of miles of desert?
This map explores a more meaningful way of conceiving of a nation in social terms, as the imagined community of all individuals who consider themselves to belong to the same nation. Instead of representing a country as a uniform territory, the map only considers areas that are actually inhabited by humans, shaded according to their population density. Apart from highlighting that there are big differences in the internal structure of the world's nations, it also reveals that not all borders are alike: abrupt ones might follow "natural" boundary features or require strict policing along awkwardly arbitrary or downright unenforceable boundary lines, while more frontier-like border regions can also be more or less penetrable in nature.
The nerdy stuff...
The map combines data from a number of different sources:
Background satellite image tiles kindly provided by Bing maps
The semi-transparent population density overlay comes from raster tiles generated based on SEDAC's Gridded Population of the World (GPW) data set, details of the raster tile generation process can be found in this github repository. In theory they have 30 arc-second resolution (individual data for every 1 km2 rectangle at the equator, with even more precision towards the poles), but in practice the quality of the data is mostly constrained by the the underlying data sources, which varies by country: while the governments of industrialised nations can often provide precise population densities for every individual square kilometer of land, for many countries the density is only estimated by dividing the population count of more coarse-grained geographic units (such as an entire county) evenly across its often large surface area, which can show up as patchy patterns on the map.
At higher zoom levels, the increasingly fuzzy population density blobs are complemented by higher-resolution vector data from OpenStreetMap (OSM), by highlighting residential land use areas as well as individual buildings (all buildings featured in the OSM data set are rendered, whether they're actually residential/inhabited or not). This data is accessed through OpenMapTiles kindly hosted by MapTiler's tilehosting.com (see here for a representation of the raw data).
The OpenMapTiles are also used to cleanly cut out (i.e. make completely transparent) areas which do not feature permanent human habitation such as bodies of water, wetlands and nature reserves.
Finally, the so far country-agnostic habitation data is colour-coded by national state using OpenStreetMap's national border polygons retrieved from OSM user wambacher's OSM boundaries website. The polygons are augmented with 7-colour and local country name labels from Natural Earth's Cultural vector data sets, stored together in a custom vector tileset (see this github repository).
At higher zoom levels, nation state labels are supplanted by lower-level place (city, town, village and neighbourhood) names from OpenMapTiles' place layer.