Published
Edited
Mar 30, 2021
Insert cell
Insert cell
Insert cell
data = FileAttachment("ExportCHB20210325013014.xml.gz-amsterdam.json").json()

// Due to filesize I wrote a node script to transform the XML to JSON, and filtered in all stop places in Amsterdam. See https://github.com/jurb/ndovhaltes-a11yjson/ for the script.

// Een dagelijkse update van het bestand is te vinden op https://data.ndovloket.nl/haltes/. Documentatie met uitleg kolommen staat op https://github.com/BISONNL/CHB.
Insert cell
data[0].quays.quay[0]
Insert cell
Insert cell
Insert cell
[...new Set(quays.map(el => el.quaystatus))]
Insert cell
Insert cell
Insert cell
getSlopeAngle = (height, length) =>
Number.isFinite(height) && Number.isFinite(length)
? (Math.atan(height / length) * 180) / Math.PI
: null

// calculate slope, return null on error
Insert cell
quays.filter(el => el.quaycode.slice(5, 8) !== '300')
Insert cell
quays.map(el => el)
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more