**at [FMI](http://en.ilmatieteenlaitos.fi/download-observations#!/). Plot radiation **
pip install -r requirements.txt
#Import libraries
import pandas as pd #https://pandas.pydata.org/
import matplotlib.pyplot as plt #https://matplotlib.org/
import matplotlib.dates as mdates #https://matplotlib.org/
import numpy as np #http://www.numpy.org/
#from datetime import date #https://docs.python.org/3/library/datetime.html
#Uploading the temperature from this day in Lappeenranta
#http://en.ilmatieteenlaitos.fi/download-observations#!/
#Note parse_dates to combine the first columns, also note that the separator from
#decimal is "." and data separator is ","
Temperature = pd.read_csv("sjk_temp.csv",dayfirst=True,sep=",",
header=0,decimal=b".",index_col=0,
parse_dates= [[0, 1, 2, 3]],usecols=[0,1,2,3,5])
Temperature.info()
#Uploading the temperature from this day in Lappeenranta
#http://en.ilmatieteenlaitos.fi/download-observations#!/
#Note parse_dates to combine the first columns, also note that the separator from
#decimal is "." and data separator is ","
Prec = pd.read_csv("sjk_prec.csv",dayfirst=True,sep=",",
header=0,decimal=b".",index_col=0,
parse_dates= [[0, 1, 2, 3]],usecols=[0,1,2,3,5])
Prec.info()
#plotting
plt.figure(figsize=(16,6))
plt.plot(Temperature,color='blue', marker='x',linestyle='-')
plt.title("Air temperature in 2019-2020, at Seinajoki")
plt.ylabel("Temperature in [°C]")
plt.grid(True)
plt.show()
#plotting
plt.figure(figsize=(16,6))
plt.plot(Prec,color='black', marker='x',linestyle='-')
plt.title("Precipitation amount in 2019-2020, at Seinajoki")
plt.ylabel("Precipitation amount in [mm/h]")
plt.grid(True)
plt.show()
3#plotting
aux=(Temperature['2019-11'].values<5) | (Prec['2019-11'].values>1)
#aux2=(Temperature['2019-11'].values>5) | (Prec['2019-11'].values>0.5)
plt.figure(figsize=(16,6))
plt.title("11-2019 / the need for heating ")
plt.plot(Temperature['2019-11'].index, aux,color='black', marker='*',linestyle='')
#plt.plot(Prec['2019-11'].index, aux2, color='green', marker='*',linestyle='')
plt.grid(True)
plt.show()
3#plotting
aux=(Temperature['2019-12'].values<5) | (Prec['2019-12'].values>1)
#aux2=(Temperature['2019-11'].values>5) | (Prec['2019-11'].values>0.5)
plt.figure(figsize=(16,6))
plt.title("12-2019 / the need for heating ")
plt.plot(Temperature['2019-12'].index, aux,color='black', marker='*',linestyle='')
#plt.plot(Prec['2019-11'].index, aux2, color='green', marker='*',linestyle='')
plt.grid(True)
plt.show()
3#plotting
aux=(Temperature['2020-1'].values<5) | (Prec['2020-1'].values>1)
#aux2=(Temperature['2019-11'].values>5) | (Prec['2019-11'].values>0.5)
plt.figure(figsize=(16,6))
plt.title("1-2020 / the need for heating ")
plt.plot(Temperature['2020-1'].index, aux,color='red', marker='*',linestyle='')
#plt.plot(Prec['2019-11'].index, aux2, color='green', marker='*',linestyle='')
plt.grid(True)
plt.show()
3#plotting
aux=(Temperature['2020-2'].values<5) | (Prec['2020-2'].values>1)
#aux2=(Temperature['2019-11'].values>5) | (Prec['2019-11'].values>0.5)
plt.figure(figsize=(16,6))
plt.title("2-2020 / the need for heating ")
plt.plot(Temperature['2020-2'].index, aux,color='red', marker='*',linestyle='')
#plt.plot(Prec['2019-11'].index, aux2, color='green', marker='*',linestyle='')
plt.grid(True)
plt.show()
#install missing libraries
! pip install --upgrade networkx
! pip install --upgrade scipy
#Import libraries -->> If an error happens (no library), you need to install the missing libraries (see above)
import networkx as nx #https://networkx.github.io/
import matplotlib.pyplot as plt #https://matplotlib.org/
import scipy as sp
import numpy as np
#checking versions
print(nx.__version__)
#Adding nodes in different ways
#Creating a graph
G = nx.Graph()
#Adding nodes in different ways
#One node
G.add_node(1)
#Two or more nodes
G.add_nodes_from([2, 3, 4, 5, 6, 7])
G.add_edge(1, 7)
G.add_edge(1, 6)
G.add_edge(1, 5)
G.add_edge(1, 4)
G.add_edge(1, 3)
G.add_edge(1, 2)
#Plot the graph
nx.draw_networkx(G, node_color='black', font_color='white', edge_color='black', font_weight='bold', node_size=700)
plt.axis('off')
plt.show()
#Adding a new node number 0 to node 1
G.add_node(0)
G.add_edge(0, 1)
#
nx.draw_networkx(G, node_color='black', font_color='white', edge_color='black', font_weight='bold', node_size=700)
plt.axis('off')
plt.show()
A=nx.adjacency_matrix(G)
print(A.todense())
G.degree()
nx.clustering(G)
nx.diameter(G)