Skip to content

Instantly share code, notes, and snippets.

@miccferr
miccferr / working_area_gpx
Created August 30, 2019 12:27
gpx working area
<?xml version='1.0' encoding='utf8'?>
<gpx creator="HOT Tasking Manager" version="1.1" xmlns="http://www.topografix.com/GPX/1/1"><metadata><link href="https://github.com/hotosm/tasking-manager"><text>HOT Tasking Manager</text></link><time>2019-08-30T12:25:23.501747</time></metadata><trk><name>Task for project 1. Do not edit outside of this area!</name><trkseg><trkpt lat="52.40790323525192" lon="4.702208070882431" /><trkpt lat="52.412797831932096" lon="4.702208070882431" /><trkpt lat="52.412797831932096" lon="4.710231973225642" /><trkpt lat="52.40790323525192" lon="4.710231973225642" /><trkpt lat="52.40790323525192" lon="4.702208070882431" /></trkseg></trk><wpt lat="52.40790323525192" lon="4.702208070882431" /><wpt lat="52.412797831932096" lon="4.702208070882431" /><wpt lat="52.412797831932096" lon="4.710231973225642" /><wpt lat="52.40790323525192" lon="4.710231973225642" /><wpt lat="52.40790323525192" lon="4.702208070882431" /></gpx>
@miccferr
miccferr / filter-geojson-polygon-stream.js
Last active December 12, 2018 16:34
Using JSONStream to read/filter/write a GeoJSON. Outputs only Polygon geometries.
const fs = require('fs');
const JSONStream = require('JSONStream');
const es = require('event-stream')
let stream = fs.createReadStream('./data/kensington/kensington.geojson', {encoding: 'utf8'});
let WriteStream =fs.createWriteStream('./data/kensington/kensington_clean.geojson', {encoding: 'utf8'});
let open = '{"type":"FeatureCollection","features":[',
close = ']}';
let transformStream =JSONStream.stringify(open, '\n,\n', close);
@miccferr
miccferr / fast_food.geojson
Created May 3, 2018 08:03
London Fast Food [nodes]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@miccferr
miccferr / gla_housold_data.csv
Created May 3, 2018 08:02
GLA Household data [clean]
We can't make this file beautiful and searchable because it's too large.
Code,Name,LAD code,Borough,2001/02,2002/03,2003/04,2004/05,2005/06,2006/07,2007/08,2008/09,2009/10,2010/11,2011/12,2012/13
E01000001,City of London 001A,E09000001,City of London,70480,71790,75340,80300,81980,87310,89010,95560,95730,99460,103120,105400
E01000002,City of London 001B,E09000001,City of London,69250,70790,74560,79740,81680,87280,89250,96120,96580,100630,104640,107250
E01000003,City of London 001C,E09000001,City of London,54030,55240,58190,62270,63830,68260,69880,75340,75790,79080,82340,84510
E01000005,City of London 001E,E09000001,City of London,46340,47280,49720,53120,54390,58110,59450,64060,64420,67210,69980,71840
E01032739,City of London 001F,E09000001,City of London,68780,69790,72970,77490,78830,83680,85020,90990,90870,94140,97330,99220
E01032740,City of London 001G,E09000001,City of London,62950,64430,67940,72750,74610,79820,81710,88100,88600,92400,96160,98630
E01000006,Barking and Dagenham 016A,E09000002,Barking and Dagenham,29610,30060,31490,33540,34250,36520,37290,40110,40270,41950,43610,4
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@miccferr
miccferr / labels.json
Created January 15, 2018 20:15
A tentative OSM hierarchical categorisation using OSM's wiki Map Features
{
"Aerialway": {
"aerialway": [
"cable_car",
"gondola",
"chair_lift",
"mixed_lift",
"drag_lift",
"t-bar",
"j-bar",
@miccferr
miccferr / err.png
Last active December 7, 2017 15:51
err.png
@miccferr
miccferr / geojsonio_embed.ipynb
Created July 26, 2016 17:55 — forked from jwass/geojsonio_embed.ipynb
Embed geojson.io in a Jupyter / IPython notebook using geojsonio.py
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@miccferr
miccferr / hdm.json
Created July 14, 2016 08:42 — forked from aaronpdennis/hdm.json
HDM Layers and OSM tags
{
"water_source": {
"class": {
"water well": ["man_made=water_well"],
"water tower": ["man_made=water_tower"],
"water tank": ["man_made=storage_tank", "man_made=water_tank"],
"spring": ["natural=spring"],
"drinking water": ["amenity=drinking_water"]
},
"potable": {
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[