Skip to content

Instantly share code, notes, and snippets.

@brookskindle
brookskindle / build_hots_db.py
Created November 20, 2018 03:10
Populate a Postgres table with information from HOTSLogs
#!/usr/bin/env python
"""
Build a heroes of the storm database
"""
import csv
import logging
import time
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, Integer, Boolean, create_engine
@brookskindle
brookskindle / README.md
Last active October 21, 2019 06:03
Queries against the Checkouts by Title dataset that the City of Seattle has. https://data.seattle.gov/Community/Checkouts-by-Title/tmmm-ytt6

Database looks like

$ psql checkouts <<< "\d"
          List of relations
 Schema |   Name    | Type  | Owner  
--------+-----------+-------+--------
 public | checkouts | table | brooks
(1 row)

$ psql checkouts <<< "\d checkouts"