Skip to content

Instantly share code, notes, and snippets.

View FrieseWoudloper's full-sized avatar

Willy Tadema FrieseWoudloper

View GitHub Profile
@FrieseWoudloper
FrieseWoudloper / index.html
Created September 14, 2019 14:34
ZONDER TURFFFFF
<!DOCTYPE html>
<script src="https://d3js.org/d3.v4.min.js"></script>
<div class="graph"></div>
<script>
var width = 700, height = 400;
var svg = d3.select(".graph").append("svg")
.attr("viewBox", "0 0 " + (width) + " " + (height))
.style("max-width", "700px");
var url = "https://geodata.nationaalgeoregister.nl/cbsgebiedsindelingen/wfs?service=wfs&request=GetFeature&typeName=cbs_arrondissementsgebied_2019_gegeneraliseerd&outputFormat=json&srsName=EPSG:4326";
d3.json(url, function(error, mapdata) {
@FrieseWoudloper
FrieseWoudloper / index.html
Created September 14, 2019 14:29
arrondissementen zonder turf
<!DOCTYPE html>
<head>
<style>
path {
fill: #ccc;
stroke: #fff;
stroke-width: .5px;
}
path:hover {
fill: orange;
@FrieseWoudloper
FrieseWoudloper / arrondissementen.json
Last active September 14, 2019 14:23
test met arrondissementen
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'>
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<style>
svg {
border: 1px solid red;
width: 600px;
height: 400px;
}
@FrieseWoudloper
FrieseWoudloper / README.md
Created September 14, 2019 14:02 — forked from michellechandra/README.md
Basic US State Map - D3
<!DOCTYPE html>
<head>
<style>
path {
fill: #ccc;
stroke: #fff;
stroke-width: .5px;
}
path:hover {
fill: orange;
@FrieseWoudloper
FrieseWoudloper / index.html
Last active September 14, 2019 11:14
Arrondissementsgebieden
<!DOCTYPE html>
<head>
<style>
path {
fill: #ccc;
stroke: #fff;
stroke-width: .5px;
}
path:hover {
fill: orange;
@FrieseWoudloper
FrieseWoudloper / api-request-omdb.py
Last active August 5, 2019 19:59
HTTP GET request in Python
# Import package
import requests
# Assign URL to variable: url
url = 'http://www.omdbapi.com/?apikey=72bc447a&t=social+network'
# Package the request, send the request and catch the response: r
r = requests.get(url)
# Decode the JSON data into a dictionary: json_data
@FrieseWoudloper
FrieseWoudloper / download-csv.py
Created August 4, 2019 16:31
Python code voor het downloaden van een bestand
# Import package
from urllib.request import urlretrieve
# Import pandas
import pandas as pd
# Assign url of file: url
url = 'https://s3.amazonaws.com/assets.datacamp.com/production/course_1606/datasets/winequality-red.csv'
# Save file locally