It is occasionally useful to create maps where each geographic unit is given equal visual prominence. This is particularly true in economics/political science, where land area can be poorly correlated with the information you’re really trying to depict. For example South Dakota has about twice the land area of Kentucky, but has fewer than one-fifth of the population.
One way to deal with this is a hexagonal tile grid map, and NPR gives good examples of their application to U.S. states. I’ve adapted code to facilitate something similar for Ireland’s 32 counties in Stata. (I was working with 1800s population data, before Northern Ireland existed, so the code is based on the 32 counties.) The images are generated by spmap and maptile, and you can use their in-built options to change the appearance. The map is implemented as what maptile calls a “geography”, and I’ve named this geography eirtile.
The first requirement is installation of both spmap and maptile, both of which are available from the SSC.
Next, click this link to download the eirtile database and coordinate files. These need to be unzipped into the maptile geographies folder, located within your Stata ado folder. For me that’s C:\ado\personal\maptile_geographies though it might be different for you. You may also want to download this 1841 Census population file to replicate the example.
An important requirement is that you have a variable named countyid to link your data to the database coordinates. The ordering is alphabetic, so Antrim is countyid=1 and Wicklow is countyid=32. The code will still run if observations are missing, so it’s not the end of the world if you don’t have data from the six NI counties.
The code below generates the 1840 population image.
insheet using "1841pops.csv", clear names
destring pop, replace ignore(",")
gen pop_per_thousand = round(pop/1000)
sort County
gen countyid = _n
maptile pop_per_thousand, geog(eirtile) geoid(countyid) twopt(title("Population of Irish counties ('000s), 1841")) nq(7)
The first three lines open and clean the data. Lines 4 and 5 generate the necessary countyid variable, which serves as the link between your data and the mapping software. The last line calls maptile, tells it to map the population variable of interest, use eirtile as the geography, and that countyid is the identifier variable. The latter options (twopt and nq) are maptile-specific commands and you should consult that program’s help file for details. This help file also shows you how to change the colours, label the missing data, etc.