Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@e-n-f
e-n-f / taxi.sh
Last active July 7, 2017 10:45
NYC taxi with datamaps
#!/bin/sh
for i in trip_data_*.csv.zip
do
unzip -c $i
done |
tr -d '\015' |
awk -F, '{print $12 "," $11 " 1:0"; print $14 "," $13 " 1:1"}' |
/data2/data/github/datamaps/encode -z19 -m1 -o nyc-taxi-all
@e-n-f
e-n-f / README.md
Last active August 29, 2015 14:03 — forked from mbostock/.block

Experimenting with a rainbow color scale that is cylical but has better perceptual properties. The HCL rainbow has roughly-constant luminance, but is ugly. The cubehelix rainbow, inspired by Matteo Niccoli’s perceptual rainbow but extended to 360°, varies in brightness but is prettier.

@e-n-f
e-n-f / counts.txt
Created June 18, 2014 05:51
SF pedestrian counts
2972.8 560 Van Ness and Bush Van Ness BRT Draft EIS
2826.6 844 Castro and 18th http://archives.sfmta.com/cms/rhomepd/documents/2009PedestrianCountReport4_16_10.pdf
2754.4 1387 Third and Howard http://archives.sfmta.com/cms/rhomepd/documents/2009PedestrianCountReport4_16_10.pdf
2679.8 5464 Fourth and Howard http://urbanecology.org/entrips/documents/Existing%20Conditions%20Report.pdf
2356.6 1689.5 Grant Columbus and Broadway http://sf.streetsblog.org/wp-content/upload1/ChinatownPedestrianNeedsAssessment_Final.pdf
2178.4 1156 Sixth and Mission http://archives.sfmta.com/cms/rhomepd/documents/2009PedestrianCountReport4_16_10.pdf
1783.2 1554 Stockton Columbus and Green http://sf.streetsblog.org/wp-content/upload1/ChinatownPedestrianNeedsAssessment_Final.pdf
1460 1113 Third and Folsom http://urbanecology.org/entrips/documents/Existing%20Conditions%20Report.pdf
1353.6 974 Eighth and Mission http://urbanecology.org/entrips/documents/Existing%20Conditions%20Report.pdf
1276.8 1140 Van Ness and Geary Van Ness BRT Draft E
@e-n-f
e-n-f / counts.csv
Created June 18, 2014 05:48
SF pedestrian counts, 1926-present
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 3 columns, instead of 6. in line 1.
1926 scaled to hourly,current hourly,name
2972.8,560,Van,Ness,and,Bush
2826.6,844,Castro,and,18th
2754.4,1387,Third,and,Howard
2679.8,5464,Fourth,and,Howard
2356.6,1689.5,Grant,Columbus,and,Broadway
2178.4,1156,Sixth,and,Mission
1783.2,1554,Stockton,Columbus,and,Green
1460,1113,Third,and,Folsom
1353.6,974,Eighth,and,Mission
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@e-n-f
e-n-f / index.html
Created January 26, 2014 00:44
Generic HTML for viewing arbitrary tiled web maps
<!DOCTYPE html>
<html>
<head>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' />
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.ie.css" />
<![endif]-->
<script src="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.js"></script>
@e-n-f
e-n-f / index.html
Created January 26, 2014 00:04
Display map tiles from tiles/{z}/{x}/{y}.png relative to the current directory
<!DOCTYPE html>
<html>
<head>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' />
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.ie.css" />
<![endif]-->
<script src="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.js"></script>
@e-n-f
e-n-f / tilemill2.md
Last active January 4, 2016 05:09
How to get a shapefile into TileMill 2

How to get a shapefile into TileMill 2

Getting the shapefile onto your computer

You probably already have a shapefile. If not, I downloaded one from Natural Earth:

$ curl -L -O http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_admin_0_countries.zip
@e-n-f
e-n-f / index.html
Last active December 21, 2015 15:09
TIGER HTML
<!DOCTYPE html>
<html>
<head>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' />
<script src='http://api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.js'></script>
<link href='http://api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.css' rel='stylesheet' />
<!--[if lte IE 8]>
<link href='http://api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.ie.css' rel='stylesheet' >
<![endif]-->
<style>