Skip to content

Instantly share code, notes, and snippets.

@bertspaan
bertspaan / mask.json
Created July 25, 2020 09:23
facade-cutter output
{
"data": {
"mask": [{
"x": 1075,
"y": 213
}, {
"x": 2428,
"y": 231
}, {
"x": 2425,
@bertspaan
bertspaan / nyc-zip.geojson
Created December 22, 2015 17:10
NYC ZIP codes
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bertspaan
bertspaan / manifest.json
Last active May 17, 2019 07:39
Bouwdossier IIIF Manifest
{
"@context": "http://iiif.io/api/presentation/2/context.json",
"@id": "https://api.data.amsterdam.nl/api/stadsarchief/bouwdossiers/15530",
"@type": "sc:Manifest",
"label": "Bouwdossier",
"sequences": [
{
"@type": "sc:Sequence",
"@id": "https://api.data.amsterdam.nl/api/stadsarchief/bouwdossiers/15530/sequence",
"canvases": [
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bertspaan
bertspaan / parse_time.py
Created July 5, 2012 14:49
Parser for Dutch natural language time strings
#!/usr/local/Cellar/python3/3.2.3/bin/python3.2
from pypeg2 import *
import datetime
numbers = [
"nul",
"een",
"twee",
"drie",
@bertspaan
bertspaan / vakken.geojson
Last active December 18, 2018 16:39
Dienst der Publieke Werken
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bertspaan
bertspaan / 1_relive-tracker_1534868008125-iPhone8,4.csv
Last active September 1, 2018 14:05
Maptime Amsterdam - Deep Mapping
lon lat ele time skyhawk_strava_velocity_smooth
4.901851 52.385264 1.49 2018-08-21T16:13:27.297Z
4.901612 52.385418 0.94 2018-08-21T16:13:28.074Z 0.32
4.901550 52.385461 0.81 2018-08-21T16:13:29.004Z 0.32
4.901504 52.385496 0.72 2018-08-21T16:13:30.003Z 0.00
4.901473 52.385523 0.69 2018-08-21T16:13:31.003Z 0.00
4.901460 52.385541 0.71 2018-08-21T16:13:32.003Z 0.00
4.901462 52.385550 0.79 2018-08-21T16:13:33.003Z 0.00
4.901482 52.385550 0.92 2018-08-21T16:13:34.003Z 0.00
4.901518 52.385541 1.10 2018-08-21T16:13:35.002Z 0.00
@bertspaan
bertspaan / split_geojson.rb
Last active April 11, 2018 19:52
Ruby script to split GeoJSON file(s) into separate files, one for each feature.
# encoding: UTF-8
require 'json'
require 'fileutils'
ARGV.select{ |file| [".json", ".geojson"].include? File.extname(file) }.each do |file|
basename = File.basename(file, File.extname(file))
geojson = JSON.parse(File.open(file).read)
if geojson.has_key? "features"
@bertspaan
bertspaan / README.md
Last active March 17, 2018 17:40
TileMill project and SQL script to generate map tiles as seen on http://citysdk.waag.org/buildings/

Buildings in the Netherlands by year of construction

Map can be seen on http://citysdk.waag.org/buildings/. The map shows all 9,866,539 buildings in the Netherlands, shaded according to year of construction. Data from BAG, via CitySDK. Map made with TileMill by Bert Spaan, Waag Society, inspired by BKLYNR.

This README file explains how to get the data, create the map and export high-res PNG and PDF files.

Download and import BAG data

First, install PostgreSQL and PostGIS. To download and import the latest BAG data into a local database, you can use the data, tools and tutorials provided