Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Ian Dees iandees

🏠
Working from home
View GitHub Profile
@iandees
iandees / README.md
Last active Feb 4, 2019
A mapping of ZCTA (zipcode-ish) to US counties, with a "percent covered" calculated using the land area.
View README.md

This CSV uses the census_geo_containment table of CensusReporter's TIGER dumps to show the relationship between zipcodes (represented here as ZCTAs) and counties. It's important to note that ZCTAs are not zipcodes. Further, the ZCTA dataset haven't been updated since 2010, and are out of date. But this is a pretty good place to start and is still useful.

Geographies are represented here using extended Census geoids. If you chop off the first 7 characters of the child_zip values you'll get the zipcode and if you chop off the first 7 characters of the parent_county you'll get the county's FIPS code. For quick debugging, you can pass these geoids into CensusReporter URLs like so: https://censusreporter.org/profiles/<geoid> (e.g. https://censusreporter.org/profiles/05000US72099).

The `percent_cov

@iandees
iandees / README.md
Last active Aug 22, 2021
Download and process Bing Buildings into Census tracts.
View README.md

These are my notes for taking the Microsoft US Building Footprints and splitting them into more manageable chunks based on US Census Tracts.

All of this happened on an m5.xlarge in AWS and used up about ~300GB of EBS over the course of a few hours.

  1. Make a filesystem on the EBS volume and mount it:

    sudo mkfs.xfs /dev/nvme1n1
    mount /dev/nvme1n1 /mnt
    
@iandees
iandees / iam_policy.json
Created Apr 21, 2018
Minimum S3 policy required for awscli s3 sync to work.
View iam_policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": "s3:ListObjects",
"Resource": "*"
},
{
View events.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View pgdc_arcticdem_mosaic_index.txt
http://data.pgc.umn.edu/elev/dem/setsm/ArcticDEM/mosaic/v2.0/07_40/07_40_2_2_5m_v2.0.tar.gz
http://data.pgc.umn.edu/elev/dem/setsm/ArcticDEM/mosaic/v2.0/07_41/07_41_1_1_5m_v2.0.tar.gz
http://data.pgc.umn.edu/elev/dem/setsm/ArcticDEM/mosaic/v2.0/07_41/07_41_1_2_5m_v2.0.tar.gz
http://data.pgc.umn.edu/elev/dem/setsm/ArcticDEM/mosaic/v2.0/07_41/07_41_2_1_5m_v2.0.tar.gz
http://data.pgc.umn.edu/elev/dem/setsm/ArcticDEM/mosaic/v2.0/07_41/07_41_2_2_5m_v2.0.tar.gz
http://data.pgc.umn.edu/elev/dem/setsm/ArcticDEM/mosaic/v2.0/07_42/07_42_1_2_5m_v2.0.tar.gz
http://data.pgc.umn.edu/elev/dem/setsm/ArcticDEM/mosaic/v2.0/08_39/08_39_1_2_5m_v2.0.tar
http://data.pgc.umn.edu/elev/dem/setsm/ArcticDEM/mosaic/v2.0/08_39/08_39_2_2_5m_v2.0.tar
http://data.pgc.umn.edu/elev/dem/setsm/ArcticDEM/mosaic/v2.0/08_40/08_40_1_1_5m_v2.0.tar.gz
http://data.pgc.umn.edu/elev/dem/setsm/ArcticDEM/mosaic/v2.0/08_40/08_40_1_2_5m_v2.0.tar.gz
View illinois_early_voting.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View merge_tiger_roads.py
import unicodecsv
import argparse
import sys
import simplejson as json
from shapely import wkt
from shapely.geometry import mapping
import shapely.speedups
shapely.speedups.enable()
parser = argparse.ArgumentParser()
View 2016_feature_name_directionals.csv
Direction Code Expanded Full Text Directional Abbreviation Spanish Translation
11 North N
12 South S
13 East E
14 West W
15 Northeast NE
16 Northwest NW
17 Southeast SE
18 Southwest SW
19 Norte N Y North
View ildot_toll_plazas.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@iandees
iandees / dlib_plus_osm.md
Last active May 30, 2018
Detecting Road Signs in Mapillary Images with dlib C++
View dlib_plus_osm.md

image

I've been interested in computer vision for a long time, but I haven't had any free time to make any progress until this holiday season. Over Christmas and the New Years I experimented with various methodologies in OpenCV to detect road signs and other objects of interest to OpenStreetMap. After some failed experiments with thresholding and feature detection, the excellent /r/computervision suggested using the dlib C++ module because it has more consistently-good documentation and the pre-built tools are faster.

After a day or two figuring out how to compile the examples, I finally made some progress:

Compiling dlib C++ on a Mac with Homebrew

  1. Clone dlib from Github to your local machine: