Skip to content

Just some basic SQL exercises using some of the 2020 US Census data

Notifications You must be signed in to change notification settings

jongarrison/census_games

Repository files navigation

2020 US Census SQL Experiments

Just playing around with PostgreSQL, csvkit and census data. See install (OSX primarily) and query notes in notes/

The source census csv file is here in the data/ directory.

Overview of the tools and data:

CsvKit

Csvkit is an amazing set of tools for working with csv files. It relies on Python and I used virtual_env to install csvkit. See the notes/210829_install_notes.txt and the ./setup_venv.sh script on how to setup and use virtual_env with Python.

My primary use of csvkit was to feed it the census csv file and have it suggest the SQL table create command in this case. I just added an index and renamed the table. A seriously handy utility.

PostgreSQL

I opted to install PostgreSQL via Homebrew. Install it however you'd like. I tend to use the psql client that installs with directly with PostgreSQL for running queries.

SqlLite and Jupyter Notebooks

I came back to this project much later to attempt some basic demo queries using Python/SqlLite/Jupyter Notebooks. My python environment is installed via Anaconda. I run Jupyter Notebooks in VSCode via the JupyterLab Plugin.

About

Just some basic SQL exercises using some of the 2020 US Census data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published