Skip to content

Instantly share code, notes, and snippets.

Christopher Groskopf onyxfish

Block or report user

Report or block onyxfish

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
onyxfish /
Created Mar 30, 2017
Import the entire Bureau of Labor Statistics (BLS) Quarterly Census of Wages (QCEW) dataset into a PostgreSQL database

QCEW Data Loader

These scripts import the entire Bureau of Labor Statistics Quarterly Census of Employement and Wages (from 1990 to latest) into one giant PostgreSQL database.

The database created by this process will use about 100GB of disk space. Make sure you have enough space available before you start!


Database name, table name, and more can be configured via

onyxfish /
Last active Oct 7, 2016
An agate aggregation to generate geojson linestrings from sequential row data
import agate
import geojson
class LineString(agate.Aggregation):
def __init__(self, lat_column, lng_column):
self._lat_column_name = lat_column
self._lng_column_name = lng_column
def get_aggregate_data_type(self, table):
return agate.Text()
onyxfish /
Last active Oct 24, 2015
Using agate in a Jupyter notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
onyxfish / exonerations.ipynb
Last active Aug 29, 2015
First agate ipython experiment
View exonerations.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gist:750d1367699350cb6abd
Mr. Chartmaker: Impressive new responsive charting tool built by Gregor Aisch for Upshot
markdowneyjr: Interesting (though probably fragile) approach to using Markdown for editing (i.e. how we use Google COPY docs)
Change Agent: neat, if maybe ill-advised usage of Github to version simple key/value data (written by someone at Github)
Wolfram Data Drop: Crazy new "give us all your data" platfrom that integrates with Wolfram Alpha
onyxfish / gist:cd15c6eed80b8acea3c5
Created Dec 17, 2014
Permissions schemes Google uses
View gist:cd15c6eed80b8acea3c5
Federated login using 3rd party providers (LDAP)
Concurrent logins with multiple accounts
Forced logins with single accounts (Drive)
API keys that use Oauth2
API keys that use don't use Oauth2
IP-restricted API keys
Domain-restricted API keys
Alternate accounts (password reset)
Account forwarding (email)
onyxfish /
Last active Jan 5, 2020
Google Spreadsheets script to generate slugs from a range of cells

This script for Google Spreadsheets allows you to generate slugs for your data such as might be used for creating unique urls.

Use it like this!

# A B C
1 a b slug
2 foo baz bing =slugify(A2:B4)
3 bar BAZ
4 FOO baz-bing
onyxfish /
Created May 29, 2014
Usage of object_pairs_hook to load JSON with guaranteed key order
#!/usr/bin/env python
from collections import OrderedDict
import json
write_data = OrderedDict([
('a', '1'),
('b', '2'),
('c', '3')
onyxfish /
Created May 7, 2014
First working google analytics example
# -*- coding: utf-8 -*-
import argparse
import httplib2
import os
import sys
from apiclient import discovery
from apiclient.errors import HttpError

"GitHub users: what do you love about, hate about, or want to see added to Issues?"

  • Setting labels is inconsistent. On detail page it's click to set, on list its apply/remove.
  • Setting assignee is inconsistent. On detail page "I" am first in the list but on list I'm alphabetized.
  • Issues don't close from commit messages until merged to master. (This breaks our workflow.)
  • Milestone deadlines are confusing. "Due on the 18th" rarely means "Finished by the 17th at midnight".
  • "Closes #2, #3" only closes #2.
You can’t perform that action at this time.