Skip to content

Instantly share code, notes, and snippets.

@FrieseWoudloper
Last active September 14, 2019 14:23
Show Gist options
  • Save FrieseWoudloper/221f98116940701e3889b3cfaf077afc to your computer and use it in GitHub Desktop.
Save FrieseWoudloper/221f98116940701e3889b3cfaf077afc to your computer and use it in GitHub Desktop.
test met arrondissementen
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<style>
</style>
</head>
<body>
<script type='text/javascript'>
var w = 600;
var h = 400;
//setup our display area
var svg = d3.select('body')
.append('svg')
.attr('w',w+'px')
.attr('h',h+'px');
//make an path object to convert from geojson paths to svg paths
var path = d3.geo.path();
//load the data
// url = "https://geodata.nationaalgeoregister.nl/cbsgebiedsindelingen/wfs?service=wfs&request=GetFeature&typeName=cbs_arrondissementsgebied_2019_gegeneraliseerd&outputFormat=json&srsName=EPSG:4326";
d3.json("arrondissementen.json", function(json) {
//when the json file is loaded
// set up the paths for each state
svg.selectAll('path')
.data(json.features)
.enter()
.append("path")
.attr('d',path) //bind the converter
;
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment