-
Notifications
You must be signed in to change notification settings - Fork 0
/
Stelling2_Randstad.py
31 lines (29 loc) · 985 Bytes
/
Stelling2_Randstad.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from plotly.offline import init_notebook_mode, iplot
import plotly.graph_objs as go
init_notebook_mode(connected=True)
import pandas as pd
import numpy as np
df = pd.read_csv('Bestaande_koopwoningen_regio_2015_100_11062019_105814.csv', sep=';')
test=df[df["Regions"]=="Nederland"]
data=[]
for provincie in df['Regions'].unique():
randstad=["Noord-Holland (PV)","Utrecht (PV)"]
if '(PV)'in provincie:
test=df[df["Regions"]==provincie]
if provincie in randstad:
data.append(go.Scatter(
x = test["Periods"],
y = test["gemiddelde huizenprijs"],
name=provincie,
line = dict(
width = 5,
dash = 'dashdot'),
))
else:
data.append(go.Scatter(
x = test["Periods"],
y = test["gemiddelde huizenprijs"],
name=provincie))
line = dict(
dash = 'dash')
iplot(data)