Skip to content

Instantly share code, notes, and snippets.

@jze
Last active April 17, 2020 08:53
Show Gist options
  • Save jze/33cbdd47a129402797104e86109fc373 to your computer and use it in GitHub Desktop.
Save jze/33cbdd47a129402797104e86109fc373 to your computer and use it in GitHub Desktop.
Cemeteries of the Nordkirche
# 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