Open data is a core element to building data visualization on the Open Web, driving our ability to reproduce, tinker with and expand visualizations. In a tool like Open Gender Tracker, open data becomes invaluable. Open Gender Tracker relies on name and gender mappings in order to ascertain the gender of an author or source. Today, we are releasing Global Name Data, a dataset of birth name-gender mapping which we believe to be the most comprehensive in the world.
Most gender classification tools draw name-gender mappings from sets of data which are highly reduced, such as top-1000 lists or IPUMS census samples. While this data is useful, it is woefully insufficient when attempting to classify gender for uncommon names. Likewise, the geographic limitations of these datasets make them unviable for an international service.
In deploying Open Gender Tracker to a citizen media service with authors from around the globe, we quickly realized our gender byline classifier service needed to handle uncommon names and provide reliable estimates for gender across multiple countries. To that end, we gathered open data from the United States and the United Kingdom to create a machine-readable resource for baby names and gender. Between the US and the UK we have data on gender mappings for 101,749 unique names arising from records on 336,267,178 births—an order of magnitude improvement over the next best name dataset.
Each government name dataset we used was released under an open content license. But open licensing is only one step toward open data. The Social Security Administration provides data in a common machine readable format, but the various statistical agencies in the United Kingdom used a variety of formats and presentation. Global Name Data collects each of these datasets and presents them in a common, machine-readable format for easy use and re-use. Additionally, we believe reproducibility is a core component to open data. We have provided tools (written in R) to download and parse the data from each source.
Databases of birth names are used for a variety of projects. Open Gender Tracker uses name data to track byline and mentions by gender in news articles. Laura and Martin Wattenberg used baby name data to build one of the earliest popular interactive visualizations on the web, the Baby Name Voyager. Political campaigns use name databases to estimate likely age and income of voters from voter roll databases. Each of these use cases relies upon accurate and rich datasets for names across a number of dimensions (not just gender).
With that in mind, let’s take a closer look at how we can access the data. If you have R installed you can follow the instructions on the README to install the package. Once we do that, it’s simple to load the package into an R session and explore the data.
We’re looking at the actual birth data for US Births from 1880 to 2011. From here we can do more than classify gender, we can track popularity (and androgyny!) of names, name conventions and overall demographic changes. We can quickly get a sense of the baby boom using this data1.
Importantly, we can also use this data to determine likely genders for a name! One of the most common questions I was asked when building this project was “can you tell me how many men or women are named ‘Pat’ in the United States?” Thanks to the wonder of open data and a little code, we can answer that.
Interestingly, the most androgynous “Pat” cohort would’ve been in their early 30s or late 20s when the Saturday Night Live skit premiered. Other than that, the majority people born with the name “Pat” in the United States are women (40,000 births versus 25,000). This breakdown is actually quite anomalous–the staggering majority of names are associated with only one gender at birth. But we can explore that ourselves with some code:
The default classifier (Agresti and Coull’s inexact binomial proportion) has better performance in the interior of the distribution than other methods but will report impossible upper/lower confidence intervals for the extreme (
> 1 or
< 0). For our purposes that’s fine. However, we’ve broken up the count and estimation functions to allow flexibility for end users who may be interested in building their own classifiers with more features such as phoneme classification or last-letter analysis. We can also just make something beautiful2:
Building our gender classifier from open data allows us to not only release the results but also to provide the intermediate data which can be used to track name usage over time, generate n-gram and phenome frequency information, and discover that in the United States, roughly 11,000 children have been born with the name “Baby”3. Global Name Data isn’t a revolution. It isn’t a dramatic project which will change how we deal with data or how quickly governments release data. But it does reduce the friction and uncertainty associated with using name data in your project. We’re excited to see to what you do with this name data!
The use of
yearBirths2() is a slight misdirect. While it is certainly possible to clobber variables in the global environment in R, functions exported from packages are namespaced. If we had named our user created function
yearBirths we would not have overwritten the package supplied function, only inserted our function into the search path. We could still expose namedata’s version with
How this was made is left as an exercise for the reader. One hint: it doesn’t use the default estimation method (which wouldn’t result in truncation at
It’s likely that some of these were children who hadn’t been named by the time they were entered into the SSA’s database, but let’s pretend for a moment that people name their kids crazy things. :) ↩