Added heatmap output (via JavaScript).
4
maps/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
/assets/*.js
|
||||||
|
/assets/*.map
|
||||||
|
/node_modules/
|
||||||
|
/map_data.js
|
22
maps/Makefile
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
CC=node_modules/.bin/coffee
|
||||||
|
ASSETDIR=assets
|
||||||
|
|
||||||
|
SRC=$(wildcard $(ASSETDIR)/*.coffee)
|
||||||
|
BUILD=$(SRC:%.coffee=%.js)
|
||||||
|
|
||||||
|
all: coffee
|
||||||
|
|
||||||
|
# coffeescript files
|
||||||
|
|
||||||
|
coffee: $(BUILD)
|
||||||
|
|
||||||
|
$(ASSETDIR)/%.js: $(ASSETDIR)/%.coffee
|
||||||
|
$(CC) -m -c $<
|
||||||
|
|
||||||
|
# cleanup
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
-rm $(BUILD)
|
||||||
|
|
||||||
|
|
32
maps/assets/main.coffee
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
window.nextState = ->
|
||||||
|
if window.keyidx > window.data["keys"].length
|
||||||
|
console.log "ERROR: No more keys."
|
||||||
|
return false
|
||||||
|
stamp = window.data["keys"][window.keyidx]
|
||||||
|
for i in window.data[stamp][1]
|
||||||
|
window.carstate.push i
|
||||||
|
for i in window.data[stamp][0]
|
||||||
|
ridx = window.carstate.indexOf i
|
||||||
|
window.carstate.splice ridx, 1
|
||||||
|
time = new Date stamp * 1000
|
||||||
|
window.map.attributionControl.setPrefix time.toString()
|
||||||
|
window.heatmap.redraw()
|
||||||
|
window.keyidx++
|
||||||
|
setTimeout 'nextState();', 333
|
||||||
|
|
||||||
|
document.addEventListener 'DOMContentLoaded', (event) ->
|
||||||
|
console.log 'Data: %o', window.data
|
||||||
|
|
||||||
|
berlin_topleft = L.latLng 52.575463, 13.182306
|
||||||
|
berlin_botrght = L.latLng 52.425506, 13.549104
|
||||||
|
berlin = L.latLngBounds berlin_topleft, berlin_botrght
|
||||||
|
|
||||||
|
window.map = L.map('map', {maxBounds: berlin}).setView berlin.getCenter(), 12
|
||||||
|
window.tiles = L.tileLayer('berlin/{z}/{x}/{y}.png', {minZoom: 11, maxZoom: 13, bounds: berlin, opacity: 0.4}).addTo map
|
||||||
|
|
||||||
|
window.keyidx = 0
|
||||||
|
window.carstate = []
|
||||||
|
|
||||||
|
window.heatmap = L.heatLayer(window.carstate, {radius: 15}).addTo map
|
||||||
|
|
||||||
|
setTimeout 'nextState();', 500
|
3
maps/assets/style.css
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#map {
|
||||||
|
height: 800px;
|
||||||
|
}
|
BIN
maps/berlin/11/1098/671.png
Normal file
After Width: | Height: | Size: 78 KiB |
BIN
maps/berlin/11/1098/672.png
Normal file
After Width: | Height: | Size: 91 KiB |
BIN
maps/berlin/11/1099/671.png
Normal file
After Width: | Height: | Size: 108 KiB |
BIN
maps/berlin/11/1099/672.png
Normal file
After Width: | Height: | Size: 104 KiB |
BIN
maps/berlin/11/1100/671.png
Normal file
After Width: | Height: | Size: 116 KiB |
BIN
maps/berlin/11/1100/672.png
Normal file
After Width: | Height: | Size: 103 KiB |
BIN
maps/berlin/11/1101/671.png
Normal file
After Width: | Height: | Size: 97 KiB |
BIN
maps/berlin/11/1101/672.png
Normal file
After Width: | Height: | Size: 87 KiB |
BIN
maps/berlin/12/2197/1342.png
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
maps/berlin/12/2197/1343.png
Normal file
After Width: | Height: | Size: 56 KiB |
BIN
maps/berlin/12/2197/1344.png
Normal file
After Width: | Height: | Size: 60 KiB |
BIN
maps/berlin/12/2197/1345.png
Normal file
After Width: | Height: | Size: 66 KiB |
BIN
maps/berlin/12/2198/1342.png
Normal file
After Width: | Height: | Size: 65 KiB |
BIN
maps/berlin/12/2198/1343.png
Normal file
After Width: | Height: | Size: 71 KiB |
BIN
maps/berlin/12/2198/1344.png
Normal file
After Width: | Height: | Size: 60 KiB |
BIN
maps/berlin/12/2198/1345.png
Normal file
After Width: | Height: | Size: 77 KiB |
BIN
maps/berlin/12/2199/1342.png
Normal file
After Width: | Height: | Size: 77 KiB |
BIN
maps/berlin/12/2199/1343.png
Normal file
After Width: | Height: | Size: 97 KiB |
BIN
maps/berlin/12/2199/1344.png
Normal file
After Width: | Height: | Size: 88 KiB |
BIN
maps/berlin/12/2199/1345.png
Normal file
After Width: | Height: | Size: 66 KiB |
BIN
maps/berlin/12/2200/1342.png
Normal file
After Width: | Height: | Size: 88 KiB |
BIN
maps/berlin/12/2200/1343.png
Normal file
After Width: | Height: | Size: 101 KiB |
BIN
maps/berlin/12/2200/1344.png
Normal file
After Width: | Height: | Size: 81 KiB |
BIN
maps/berlin/12/2200/1345.png
Normal file
After Width: | Height: | Size: 60 KiB |
BIN
maps/berlin/12/2201/1342.png
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
maps/berlin/12/2201/1343.png
Normal file
After Width: | Height: | Size: 86 KiB |
BIN
maps/berlin/12/2201/1344.png
Normal file
After Width: | Height: | Size: 76 KiB |
BIN
maps/berlin/12/2201/1345.png
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
maps/berlin/12/2202/1342.png
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
maps/berlin/12/2202/1343.png
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
maps/berlin/12/2202/1344.png
Normal file
After Width: | Height: | Size: 69 KiB |
BIN
maps/berlin/12/2202/1345.png
Normal file
After Width: | Height: | Size: 66 KiB |
BIN
maps/berlin/13/4395/2684.png
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
maps/berlin/13/4395/2685.png
Normal file
After Width: | Height: | Size: 76 KiB |
BIN
maps/berlin/13/4395/2686.png
Normal file
After Width: | Height: | Size: 67 KiB |
BIN
maps/berlin/13/4395/2687.png
Normal file
After Width: | Height: | Size: 58 KiB |
BIN
maps/berlin/13/4395/2688.png
Normal file
After Width: | Height: | Size: 65 KiB |
BIN
maps/berlin/13/4395/2689.png
Normal file
After Width: | Height: | Size: 50 KiB |
BIN
maps/berlin/13/4395/2690.png
Normal file
After Width: | Height: | Size: 75 KiB |
BIN
maps/berlin/13/4396/2684.png
Normal file
After Width: | Height: | Size: 71 KiB |
BIN
maps/berlin/13/4396/2685.png
Normal file
After Width: | Height: | Size: 78 KiB |
BIN
maps/berlin/13/4396/2686.png
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
maps/berlin/13/4396/2687.png
Normal file
After Width: | Height: | Size: 66 KiB |
BIN
maps/berlin/13/4396/2688.png
Normal file
After Width: | Height: | Size: 65 KiB |
BIN
maps/berlin/13/4396/2689.png
Normal file
After Width: | Height: | Size: 72 KiB |
BIN
maps/berlin/13/4396/2690.png
Normal file
After Width: | Height: | Size: 86 KiB |
BIN
maps/berlin/13/4397/2684.png
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
maps/berlin/13/4397/2685.png
Normal file
After Width: | Height: | Size: 85 KiB |
BIN
maps/berlin/13/4397/2686.png
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
maps/berlin/13/4397/2687.png
Normal file
After Width: | Height: | Size: 93 KiB |
BIN
maps/berlin/13/4397/2688.png
Normal file
After Width: | Height: | Size: 78 KiB |
BIN
maps/berlin/13/4397/2689.png
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
maps/berlin/13/4397/2690.png
Normal file
After Width: | Height: | Size: 79 KiB |
BIN
maps/berlin/13/4398/2684.png
Normal file
After Width: | Height: | Size: 92 KiB |
BIN
maps/berlin/13/4398/2685.png
Normal file
After Width: | Height: | Size: 62 KiB |
BIN
maps/berlin/13/4398/2686.png
Normal file
After Width: | Height: | Size: 92 KiB |
BIN
maps/berlin/13/4398/2687.png
Normal file
After Width: | Height: | Size: 96 KiB |
BIN
maps/berlin/13/4398/2688.png
Normal file
After Width: | Height: | Size: 76 KiB |
BIN
maps/berlin/13/4398/2689.png
Normal file
After Width: | Height: | Size: 76 KiB |
BIN
maps/berlin/13/4398/2690.png
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
maps/berlin/13/4399/2684.png
Normal file
After Width: | Height: | Size: 86 KiB |
BIN
maps/berlin/13/4399/2685.png
Normal file
After Width: | Height: | Size: 92 KiB |
BIN
maps/berlin/13/4399/2686.png
Normal file
After Width: | Height: | Size: 105 KiB |
BIN
maps/berlin/13/4399/2687.png
Normal file
After Width: | Height: | Size: 94 KiB |
BIN
maps/berlin/13/4399/2688.png
Normal file
After Width: | Height: | Size: 86 KiB |
BIN
maps/berlin/13/4399/2689.png
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
maps/berlin/13/4399/2690.png
Normal file
After Width: | Height: | Size: 67 KiB |
BIN
maps/berlin/13/4400/2684.png
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
maps/berlin/13/4400/2685.png
Normal file
After Width: | Height: | Size: 96 KiB |
BIN
maps/berlin/13/4400/2686.png
Normal file
After Width: | Height: | Size: 112 KiB |
BIN
maps/berlin/13/4400/2687.png
Normal file
After Width: | Height: | Size: 104 KiB |
BIN
maps/berlin/13/4400/2688.png
Normal file
After Width: | Height: | Size: 86 KiB |
BIN
maps/berlin/13/4400/2689.png
Normal file
After Width: | Height: | Size: 76 KiB |
BIN
maps/berlin/13/4400/2690.png
Normal file
After Width: | Height: | Size: 71 KiB |
BIN
maps/berlin/13/4401/2684.png
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
maps/berlin/13/4401/2685.png
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
maps/berlin/13/4401/2686.png
Normal file
After Width: | Height: | Size: 102 KiB |
BIN
maps/berlin/13/4401/2687.png
Normal file
After Width: | Height: | Size: 94 KiB |
BIN
maps/berlin/13/4401/2688.png
Normal file
After Width: | Height: | Size: 93 KiB |
BIN
maps/berlin/13/4401/2689.png
Normal file
After Width: | Height: | Size: 77 KiB |
BIN
maps/berlin/13/4401/2690.png
Normal file
After Width: | Height: | Size: 66 KiB |
BIN
maps/berlin/13/4402/2684.png
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
maps/berlin/13/4402/2685.png
Normal file
After Width: | Height: | Size: 77 KiB |
BIN
maps/berlin/13/4402/2686.png
Normal file
After Width: | Height: | Size: 95 KiB |
BIN
maps/berlin/13/4402/2687.png
Normal file
After Width: | Height: | Size: 98 KiB |
BIN
maps/berlin/13/4402/2688.png
Normal file
After Width: | Height: | Size: 90 KiB |
BIN
maps/berlin/13/4402/2689.png
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
maps/berlin/13/4402/2690.png
Normal file
After Width: | Height: | Size: 76 KiB |
BIN
maps/berlin/13/4403/2684.png
Normal file
After Width: | Height: | Size: 70 KiB |
BIN
maps/berlin/13/4403/2685.png
Normal file
After Width: | Height: | Size: 79 KiB |
BIN
maps/berlin/13/4403/2686.png
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
maps/berlin/13/4403/2687.png
Normal file
After Width: | Height: | Size: 94 KiB |
BIN
maps/berlin/13/4403/2688.png
Normal file
After Width: | Height: | Size: 94 KiB |
BIN
maps/berlin/13/4403/2689.png
Normal file
After Width: | Height: | Size: 94 KiB |
BIN
maps/berlin/13/4403/2690.png
Normal file
After Width: | Height: | Size: 86 KiB |
BIN
maps/berlin/13/4404/2684.png
Normal file
After Width: | Height: | Size: 72 KiB |