Danish weather

Import some plotting libraries and set some defaults:

%config InlineBackend.figure_formats = ['svg'] 
from IPython.display import display, Markdown
import matplotlib.pyplot as plt
import seaborn as sns
sns.set()
sns.set_style("whitegrid")
import random
import numpy as np
import pandas as pd

Here is some computation:

nr_project_days = 150
df = pd.DataFrame({'day': list(range(nr_project_days)), 
              'wind': [random.random()+1 for i in range(nr_project_days)], 
              'precipitation': [random.random()+1 for i in range(nr_project_days)]})
df
day wind precipitation
0 0 1.747650 1.115449
1 1 1.452317 1.134909
2 2 1.783481 1.239925
3 3 1.837637 1.460844
4 4 1.308335 1.890218
... ... ... ...
145 145 1.801730 1.499466
146 146 1.434560 1.981628
147 147 1.394330 1.913791
148 148 1.122685 1.730421
149 149 1.478548 1.712684

150 rows × 3 columns

Weather data

Weather data was collected… blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah

long_format = df.melt(id_vars=['day'], value_vars=['wind', 'precipitation'], var_name='weather', value_name='value')
long_format
day weather value
0 0 wind 1.747650
1 1 wind 1.452317
2 2 wind 1.783481
3 3 wind 1.837637
4 4 wind 1.308335
... ... ... ...
295 145 precipitation 1.499466
296 146 precipitation 1.981628
297 147 precipitation 1.913791
298 148 precipitation 1.730421
299 149 precipitation 1.712684

300 rows × 3 columns

sns.lineplot(data=long_format, x='day', y='value', hue='weather')
plt.ylim(bottom=0) ;
Figure 1.1: Danish weather: This is the weather forcast for your project

From this plot, it seems Danish weather is quite unpredictable.