Skip to content

Instantly share code, notes, and snippets.

@hotzeplotz
hotzeplotz / data-visualization.js
Last active August 29, 2015 14:10
European MetroMonitor - Workshop
/**
* Turn a CSV file with longitude and latitude columsn into a GeoJSON data structure
*/
function csv_to_geojson(csv_data) {
var full_data = {
type: "FeatureCollection",
features: []
};
full_data.features = _.map(csv_data,
@hotzeplotz
hotzeplotz / dataset.csv
Last active August 29, 2015 14:10
EUMM dataset
We can't make this file beautiful and searchable because it's too large.
"","MetroRegion","BROAD_SECTOR_HVAS_GVA_1994_GR","BROAD_SECTOR_HVAS_GVA_1995_GR","BROAD_SECTOR_HVAS_GVA_1996_GR","BROAD_SECTOR_HVAS_GVA_1997_GR","BROAD_SECTOR_HVAS_GVA_1998_GR","BROAD_SECTOR_HVAS_GVA_1999_GR","BROAD_SECTOR_HVAS_GVA_2000_GR","BROAD_SECTOR_HVAS_GVA_2001_GR","BROAD_SECTOR_HVAS_GVA_2002_GR","BROAD_SECTOR_HVAS_GVA_2003_GR","BROAD_SECTOR_HVAS_GVA_2004_GR","BROAD_SECTOR_HVAS_GVA_2005_GR","BROAD_SECTOR_HVAS_GVA_2006_GR","BROAD_SECTOR_HVAS_GVA_2007_GR","BROAD_SECTOR_HVAS_GVA_2008_GR","BROAD_SECTOR_HVAS_GVA_2009_GR","BROAD_SECTOR_HVAS_GVA_2010_GR","BROAD_SECTOR_HVAS_GVA_2011_GR","BROAD_SECTOR_HVAS_GVA_2012_GR","BROAD_SECTOR_HVAS_GVA_2013_GR","BROAD_SECTOR_HVAS_GVA_2014_GR","BROAD_SECTOR_MANUFACTURING_GVA_1994_GR","BROAD_SECTOR_MANUFACTURING_GVA_1995_GR","BROAD_SECTOR_MANUFACTURING_GVA_1996_GR","BROAD_SECTOR_MANUFACTURING_GVA_1997_GR","BROAD_SECTOR_MANUFACTURING_GVA_1998_GR","BROAD_SECTOR_MANUFACTURING_GVA_1999_GR","BROAD_SECTOR_MANUFACTURING_GVA_2000_GR","BROAD_SECTOR_MANUFACTURING_GVA_2001_GR","BROAD_
@hotzeplotz
hotzeplotz / data-visualization.js
Last active August 29, 2015 14:10
European MetroMonitor - workshop
/**
* Turn a CSV file with longitude and latitude columsn into a GeoJSON data structure
*/
function csv_to_geojson(csv_data) {
var full_data = {
type: "FeatureCollection",
features: []
};
full_data.features = _.map(csv_data,
@hotzeplotz
hotzeplotz / index.html
Created November 22, 2014 12:55
Future of large cities - GDP // source http://jsbin.com/saqimiwosi
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Future of large cities - GDP</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox.js/v2.1.4/mapbox.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox.js/v2.1.4/mapbox.css' rel='stylesheet' />
<link href='style.css' rel='stylesheet' />
<style id="jsbin-css">
@hotzeplotz
hotzeplotz / bogota.geojson
Last active August 29, 2015 14:09
Bogotá - public transport
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Governance structures - London</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox.js/v2.1.4/mapbox.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox.js/v2.1.4/mapbox.css' rel='stylesheet' />
<style>
#map {
@hotzeplotz
hotzeplotz / index.html
Last active August 29, 2015 14:09
London - Governance
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>London - Governance</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="jquery.panzoom.min.js"></script>
</head>
<body>
@hotzeplotz
hotzeplotz / index.html
Last active October 13, 2015 12:23
Future of large cities - Population
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Future of large cities - Population</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox.js/v2.1.4/mapbox.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox.js/v2.1.4/mapbox.css' rel='stylesheet' />
<link href='//blocks.lsecities.net/hotzeplotz/raw/8f64b9a8bd98042a712c/style.css' rel='stylesheet' />
</head>
@hotzeplotz
hotzeplotz / tokyo_city-boundary.topojson
Last active August 29, 2015 14:09
Tokyo - public transport infrastructure
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hotzeplotz
hotzeplotz / index.html
Last active October 13, 2015 12:14
Future of large cities - GDP
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Future of large cities - GDP</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox.js/v2.1.4/mapbox.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox.js/v2.1.4/mapbox.css' rel='stylesheet' />
<link href='style.css' rel='stylesheet' />
</head>