Last active
April 17, 2020 08:53
-
-
Save jze/33cbdd47a129402797104e86109fc373 to your computer and use it in GitHub Desktop.
Cemeteries of the Nordkirche
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Data from https://opendata.schleswig-holstein.de/dataset/gebaude | |
const d = require('./gemeinden_gebaeude.json') | |
const cemeteries = d.data.filter( it => it.relationships.institution_type.data.id === "6" ); | |
const addresses = d.included.filter( it => it.type === 'addresses' ); | |
console.log( "name\tlongitude\tlatitude"); | |
for( cemetery of cemeteries ) { | |
const addressId = cemetery.relationships.address.data.id | |
const address = addresses.filter( it => it.id === addressId )[0]; | |
const latitude = address.attributes.latitude | |
const longitude = address.attributes.longitude | |
console.log( cemetery.attributes.name +"\t"+ longitude + "\t" + latitude); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment