Skip to content

Instantly share code, notes, and snippets.

A simple script for joining a GeoJSON file with external properties in a CSV or TSV file; extracted from TopoJSON.

We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 11 columns, instead of 12. in line 1.
Entity Name Title Base Overtime Other (vacation, sick, bonus, etc) Medical/Dental/Visual Employeer Contribution to Pension Employee Contribution to Pension Paid By Employer Employer Contribution to Deferred Compensation (401k) Misc Total Cost of Employment
Bay Area Rapid Transit Dugger, Dorothy General Mgr 298700 0 34500 14951 39521 23324 1869 6796 419661
Bay Area Rapid Transit Crunican, Grace General Mgr 312461 0 3846 19141 37513 17500 1869 7591 399921
Bay Area Rapid Transit Tietz, Forrest Police Sergeant 136746 111902 33921 18200 60630 156 0 1107 362662
Bay Area Rapid Transit Pangilinan, Edgardo Asst Controller 107785 0 214322 10903 13017 7650 1869 5734 361279
Bay Area Rapid Transit Lucarelli, Frank Police Lieutenant 173811 46280 33422 23364 76427 233 0 5019 358556
Bay Area Rapid Transit Collier, Roberta Asst Treasurer 33971 0 289534 1797 4072 2378 1869 4897 338518
Bay Area Rapid Transit Parker, Thomas Exec Mgr Transit System Compl 136544 0 145633 19139 16863 9923 1869 5584 335554
Bay Area Rapid Transit Ra
CREATE TABLE events (
event_name varchar(64) NOT NULL,
venue_name varchar(64),
street_addr varchar(64),
city varchar(64),
state char(2) DEFAULT 'CA',
url varchar(64),
day varchar(12),
time time,
lat numeric(10,7),
@mpmckenna8
mpmckenna8 / index.html
Last active August 29, 2015 13:56
Start of Olympic D3 map hack
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
background: #fcfcfa;
}
.stroke {
fill: none;
@mpmckenna8
mpmckenna8 / index.html
Last active August 29, 2015 13:56
S'Mile Map Demo
<!DOCTYPE html>
<meta charset="utf-8">
<style>
/*//Uncomment if you want to add those lat/long lines
svg{
Background:black;
}
*/
<!DOCTYPE html>
<html>
<head>
<title>Foo</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<style type='text/css'>
body {
font-family: 'Helvetica';
letter-spacing:-5px;
@mpmckenna8
mpmckenna8 / index.html
Last active August 29, 2015 13:56
Grideroo Visually
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Code Challenge Vis</title>
<script src="http://d3js.org/d3.v3.min.js"></script>
</head>
<body>
<script type="text/javascript">
@mpmckenna8
mpmckenna8 / README.md
Created February 13, 2014 03:29 — forked from mbostock/.block

A demo of TopoJSON on a U.S. counties shapefile from the U.S. census bureau. The same TopoJSON file can also be used to show states and counties.

@mpmckenna8
mpmckenna8 / index.html
Last active August 29, 2015 13:56
Leaflet.js Layer Control w/ Stamen base maps
<!DOCTYPE html>
<html>
<head>
<title>Stamen simple basemap</title>
<script type="text/javascript" src="http://leaflet.cloudmade.com/dist/leaflet.js"></script>
<link rel="stylesheet" href="http://leaflet.cloudmade.com/dist/leaflet.css" />
<!--[if lte IE 8]><link rel="stylesheet" href="http://leaflet.cloudmade.com/dist/leaflet.ie.css" /><![endif]-->
<script type="text/javascript" src="http://maps.stamen.com/js/tile.stamen.js?v1.2.3"></script>