Skip to content

Instantly share code, notes, and snippets.

@bertspaan
bertspaan / gijs.svg
Last active December 25, 2015 21:09
Stijn & Gijs!
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bertspaan
bertspaan / waterschapsgrenzen.topojson
Created October 24, 2013 07:31
Waterschapsgrensen in TopoJSON, nieuwe versie
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bertspaan
bertspaan / crops.json
Created November 27, 2013 08:17
Gewassen met categorie
[
{
"name": "Aardappelen, bestrijdingsmaatregel AM",
"code": 2025,
"category": "aardappelen"
},
{
"name": "Aardappelen, consumptie op klei/lössgrond",
"code": 2951,
"category": "aardappelen"
@bertspaan
bertspaan / parking.rb
Last active January 1, 2016 05:28
Ruby script to add Amsterdam parking data to CitySDK
require 'citysdk'
$email = ARGV[1]
$password = ARGV[2]
@api = CitySDK::API.new("api.citysdk.waag.org")
@api.authenticate(email, passw)
layer = 'test.divv.parking.zone'
@bertspaan
bertspaan / README.md
Created January 2, 2014 15:28
Python script to convert DBF database file to CSV
@bertspaan
bertspaan / cbs.json
Created March 12, 2014 15:34
JSON-LD context for CitySDK CBS layer
{
"name": "dc:title",
"aant_inw": "http://dbpedia.org/ontology/populationTotal‎",
"gm_code": {
"@id": "http://citysdk.eu/layers/cbs/fields/gm_code",
"@type": "xsd:string‎"
},
"opp_tot": {
"@id": "http://citysdk.eu/layers/cbs/fields/opp_tot",
"@type": "http://dbpedia.org/page/Hectare‎"
@bertspaan
bertspaan / json-ld.json
Last active August 29, 2015 13:57
CitySDK JSON-LD test output
{
"@context":{
"@base":"http://rdf.citysdk.eu/ams/",
"name":"dc:title",
"cdk_id":"cdk:cdk_id",
"features":"cdk:apiResult",
"properties":"cdk:geojsonProperties",
"geojsonProperties": "_:geojsonProperties",
"date_created":"dc:date",
"layers":{
@bertspaan
bertspaan / artsholland.context.json
Last active August 29, 2015 13:57
JSON-LD context for CitySDK Arts Holland layer data
{
"@base": "http://rdf.citysdk.eu/ams/",
"ah": "http://purl.org/artsholland/1.0/",
"foaf": "http://xmlns.com/foaf/0.1/",
"vcard": "http://www.w3.org/2006/vcard/ns#",
"dc": "http://purl.org/dc/elements/1.1/",
"title": "dc:title",
"uri": "owl:sameAs",
"website": "foaf:homepage",
"locality": "vcard:locality",
@bertspaan
bertspaan / schools.rb
Created March 27, 2014 11:29
Read CitySDK schools data, export to CSV
require 'json'
schools = JSON.parse(File.open('schools.json').read, {symbolize_names: true})
schools[:results].each do |school|
data = school[:layers][:"duo.schools.secondary"][:data]
lat, lon = school[:geom][:coordinates]
csv_row = {
@bertspaan
bertspaan / README.md
Last active April 12, 2017 23:25 — forked from mbostock/.block

A treemap recursively subdivides area into rectangles; the area of any node in the tree corresponds to its value. This example uses color to encode different packages of the Flare visualization toolkit. Treemap design invented by Ben Shneiderman. Squarified algorithm by Bruls, Huizing and van Wijk. Data courtesy Jeff Heer.