I hereby claim:
- I am migurski on github.
- I am migurski (https://keybase.io/migurski) on keybase.
- I have a public key whose fingerprint is 2D09 CC12 CFAF 908F 40D2 A4BC 6658 C0CD 757E 9D53
To claim this, I am signing this object:
''' Convert precinct-level result CSVs from OpenElections to tabular format. | |
''' | |
import gzip, csv, collections, sys, itertools | |
def key1(row): | |
''' Outer key is the county and precinct. | |
''' | |
return row['parent_jurisdiction'], row['jurisdiction'] | |
def key2(row): |
from osgeo import ogr | |
import requests, zipfile, io, tempfile, shutil, os, sys, csv, math, collections | |
state_codes = { | |
'01': 'AL', '31': 'NE', '02': 'AK', '32': 'NV', '04': 'AZ', '33': 'NH', | |
'05': 'AR', '34': 'NJ', '06': 'CA', '35': 'NM', '08': 'CO', '36': 'NY', | |
'09': 'CT', '37': 'NC', '10': 'DE', '38': 'ND', '11': 'DC', '39': 'OH', | |
'12': 'FL', '40': 'OK', '13': 'GA', '41': 'OR', '15': 'HI', '42': 'PA', | |
'16': 'ID', '72': 'PR', '17': 'IL', '44': 'RI', '18': 'IN', '45': 'SC', | |
'19': 'IA', '46': 'SD', '20': 'KS', '47': 'TN', '21': 'KY', '48': 'TX', |
I hereby claim:
To claim this, I am signing this object:
#! /bin/bash -ex | |
# Convert Landsat 8 GeoTIFF images into RGB pan-sharpened JPEGs. | |
# | |
# Requirements: | |
# * gdal http://www.mapbox.com/tilemill/docs/guides/gdal/ | |
# * Dan Stahlke's https://github.com/gina-alaska/dans-gdal-scripts | |
# * convert (image-magick) | |
# | |
# Reference info: |
''' Search for records in g20151-slice.csv using index g20151-index.csv. | |
Also search for a few junk records, to make sure they're not found. | |
''' | |
import csv, os, io | |
from remote import RemoteFileObject | |
INDEX_URL = 'http://localhost/~migurski/Census-Reporter/g20151-index.csv' | |
DATA_URL = 'http://localhost/~migurski/Census-Reporter/g20151-slice.csv' |
<?php | |
// What's this blog's title? | |
$blog_title = "tecznotes"; | |
// What's this blog's description (for outgoing RSS feed)? | |
$blog_description = "Michal Migurski's notebook, listening post, and soapbox."; | |
// What's this blog's primary language (for outgoing RSS feed)? | |
$blog_language = "en"; | |
{ | |
"vector_tile_url": "http://vector.mapzen.com/osm/{layers}/{z}/{x}/{y}.{format}{?api_key}", | |
"time_distance_matrix_url": "https://matrix.mapzen.com/{action}{?api_key,json}", | |
"search_geocode_url": "https://search.mapzen.com/v1/search{?api_key,text}{&size,boundary.country,boundary.rect.min_lat,boundary.rect.min_lon,boundary.rect.max_lat,boundary.rect.max_lon,boundary.circle.lat,boundary.circle.lon,boundary.circle.radius,focus.point.lat,focus.point.lon,sources,layers}", | |
"search_reverse_url": "https://search.mapzen.com/v1/reverse{?api_key,point.lat,point.lon}{&size,boundary.country,sources,layers}", | |
"search_autocomplete_url": "https://search.mapzen.com/v1/autocomplete{?api_key,text}{&focus.point.lat,focus.point.lon}", | |
"search_place_url": "https://search.mapzen.com/v1/place{?api_key,ids}", | |
"elevation_url": "https://elevation.mapzen.com/height{?api_key,json}" | |
} |
from __future__ import print_function | |
from os import environ | |
from psycopg2 import connect | |
from psycopg2.extras import DictCursor, Json | |
from itertools import count, groupby | |
from datetime import timedelta, datetime | |
from operator import itemgetter | |
from uritemplate import expand | |
from dateutil.parser import parse |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Untitled</title> | |
<script src="https://code.jquery.com/jquery-1.11.2.min.js" charset="utf-8"></script> | |
<script src="modestmaps.min.js" charset="utf-8"></script> | |
<script src="turf.min.js" charset="utf-8"></script> | |
</head> | |
<body> |