Below you will find pages that utilize the taxonomy term “sql”
Posts
Supreme Court Database for the SQL-minded
Sometimes one just wants to query some data, right? I recently found myself again wanting to query the excellent work of the Supreme Court Database (SCDB for short), which is an important resource for legal historians and political scientists of all stripes. Several years ago, I pulled together a quick SQLite database and have used it since then. It’s now time to generate a fresh database with updated SCDB data, so I figured I would document how I do it, in case it might be useful to others.
Posts
Exploring work with NAPP microdata
Census microdata, such as that produced by the NAPP project, can help illuminate interesting issues surrounding work and labor.
Investigating the history of work using microdata must begin with the questions asked by the census enumerators about employment. These varied depending on the country and year, but were generally quite simple. For example, the U.S. 1880 census form had two questions pertaining to work, and a third that hinted toward labor as well.
Posts
napptools: the gory details
This post is an explanation of the napptools scripts, including how they transform NAPP download files into a SQLite database.
The tools napptools consists of three script programs:
napp2csv.sh: A Bash script that uses traditional unix tools cut, sed, and tr to chop a NAPP data file into its respective columns, guided by a SAS-format command file. This also creates secondary tables in .CSV format from the variable descriptions in the SAS file.