Enter this in the search box along with your search terms:
Get all gists from the user santisbon.
user:santisbon
Find all gists with a .yml extension.
extension:yml
Find all gists with HTML files.
language:html
Enter this in the search box along with your search terms:
Get all gists from the user santisbon.
user:santisbon
Find all gists with a .yml extension.
extension:yml
Find all gists with HTML files.
language:html
| # Data courtesy of Zillow, attribution required: https://www.zillow.com/howto/api/neighborhood-boundaries.htm | |
| # Requires GDAL/OGR: http://www.gdal.org/ | |
| STATES=("AL" "AK" "AZ" "AR" "CA" "CO" "CT" "DC" "DE" "FL" "GA" "HI" "ID" "IL" "IN" "IA" "KS" "KY" "LA" "ME" "MD" "MA" "MI" "MN" "MS" "MO" "MT" "NE" "NV" "NH" "NJ" "NM" "NY" "NC" "ND" "OH" "OK" "OR" "PA" "RI" "SC" "SD" "TN" "TX" "UT" "VT" "VA" "WA" "WV" "WI") | |
| rm -rf zillow_neighborhoods.* | |
| for s in "${STATES[@]}"; do | |
| echo "Processing $s" | |
| wget -c https://www.zillowstatic.com/static/shp/ZillowNeighborhoods-$s.zip -O $s.zip | |
| unzip $s.zip |
| // UPDATE: In 2023, you should probably stop using this! The narrow version of Safari that | |
| // does not support `nomodule` is probably not being used anywhere. The code below is left | |
| // for posterity. | |
| /** | |
| * Safari 10.1 supports modules, but does not support the `nomodule` attribute - it will | |
| * load <script nomodule> anyway. This snippet solve this problem, but only for script | |
| * tags that load external code, e.g.: <script nomodule src="nomodule.js"></script> | |
| * | |
| * Again: this will **not** prevent inline script, e.g.: |
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 config.sh.
You want the most up-to-date shapefile of Congressional districts, but you don't want Michigan to be a giant blob.
(The Census Bureau offers some cartographic boundary shapefiles without this problem, but they aren't always the most current.)
| #! /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: |
| import asyncio | |
| import aiohttp | |
| import os | |
| import random | |
| import re | |
| import sys | |
| import traceback | |
| from io import StringIO | |
| from lxml.html import parse, make_links_absolute | |
| from lxml.cssselect import CSSSelector |
I currently use Python for nearly all of my data science and wrangling work these days but usually find myself switching to R to visualize data using ggplot2. This is due in part to ggplot2's general excellence, but also because I had a lot of trouble learning Python's most popular viz library, matplotlib on my own...its homepage is decent enough...but its variety of plotting APIs (--pylab? OOP? %matplotlib???) has led to widely differing examples and best practices among the many online matplotlib guides (not dissimilar to the general problem of trying to practice either Python 2.x or 3.x).
That changed yesterday when I stumbled across [Nicolas P. Rougier's beautifully designed and com
| ID | Name | Abbreviation | Conference | Division | |
|---|---|---|---|---|---|
| 1 | Arizona Cardinals | ARI | NFC | West | |
| 2 | Atlanta Falcons | ATL | NFC | South | |
| 3 | Baltimore Ravens | BAL | AFC | North | |
| 4 | Buffalo Bills | BUF | AFC | East | |
| 5 | Carolina Panthers | CAR | NFC | South | |
| 6 | Chicago Bears | CHI | NFC | North | |
| 7 | Cincinnati Bengals | CIN | AFC | North | |
| 8 | Cleveland Browns | CLE | AFC | North | |
| 9 | Dallas Cowboys | DAL | NFC | East |
Structured journalism is: