Professional Documents
Culture Documents
Visualisation Practical
Electronic notebook
Cristina Tocu - 328579
Andrei Iessensky -328573
co2
1 of 9
http://localhost:8888/nbconvert/html/co2.ipynb?download=false
06.04.2016 11:42
co2
2 of 9
http://localhost:8888/nbconvert/html/co2.ipynb?download=false
In [3]: co2=list()
time=list()
filelist=list()
nameSensor=list()
os.chdir(r'D:\Year 2\visualisation\CO2')#the location where all the csv files
from CO2 station are stored
for file in glob.glob("*.csv"):# the program should read all the documents in
that file with csv format
filelist.append(file) #program loads the file in the working space
for index in range(len(filelist)):
with open(filelist[index]) as f:
reader = csv.reader(f, delimiter=';')#program reads the data between
the semicolons
reader.next()
for row in reader:
if row[1]== '020-CO-1':#if the name of variable in row[1] matches
the name of the station introduced by the user, the program gets the data in
all files only related to that specific station
nameSensor.append(row[1]) #station
co2.append(row[2]) #co2
time.append(datetime.strptime(row[0], '%Y-%m-%d %H:%M:%S')) #
time
CO2=np.array(co2,dtype=np.int16) # define the co2 data as integer numbers
plt.figure(figsize=(130, 20))
# the size of the graph
plt.tick_params(labelsize=90)# the size of the axis labels
blue_line = mlines.Line2D([], [], color='orange', marker= '_',
markersize=80, label='CO2 20th node') # the legend
of the graph is defined
plt.legend(handles=[blue_line], prop={"size":80}) #legend is printed on the g
raph with the selected size
plot (time, CO2, 'orange') # program plots the time series of CO2
Out[3]: [<matplotlib.lines.Line2D at 0x856eb70>]
06.04.2016 11:42
co2
3 of 9
http://localhost:8888/nbconvert/html/co2.ipynb?download=false
In [4]: co2=list()
time=list()
filelist=list()
nameSensor=list()
os.chdir(r'D:\Year 2\visualisation\CO2')
for file in glob.glob("*.csv"):
filelist.append(file)
for index in range(len(filelist)):
with open(filelist[index]) as f:
reader = csv.reader(f, delimiter=';')
reader.next() #skip header
for row in reader:
if row[1]== '170-CO-1':
nameSensor.append(row[1])
co2.append(row[2])
time.append(datetime.strptime(row[0], '%Y-%m-%d %H:%M:%S'))
CO2=np.array(co2,dtype=np.int16)
#print nameSensor
#print time
plt.figure(figsize=(130, 20))
plt.tick_params(labelsize=90)
blue_line = mlines.Line2D([], [], color='orange', marker= '_',
markersize=80, label='CO2 170th node')
plt.legend(handles=[blue_line], prop={"size":80})
plot (time, CO2, 'orange')
06.04.2016 11:42
co2
4 of 9
http://localhost:8888/nbconvert/html/co2.ipynb?download=false
In [5]: co2=list()
time=list()
filelist=list()
nameSensor=list()
os.chdir(r'D:\Year 2\visualisation\CO2')
for file in glob.glob("*.csv"):
filelist.append(file)
for index in range(len(filelist)):
with open(filelist[index]) as f:
reader = csv.reader(f, delimiter=';')
reader.next() #skip header
for row in reader:
if row[1]== '068-CO-1':
nameSensor.append(row[1])
co2.append(row[2])
time.append(datetime.strptime(row[0], '%Y-%m-%d %H:%M:%S'))
CO2=np.array(co2,dtype=np.int16)
#print nameSensor
#print time
plt.figure(figsize=(130, 20))
plt.tick_params(labelsize=90)
blue_line = mlines.Line2D([], [], color='orange', marker= '_',
markersize=80, label='CO2 68th node')
plt.legend(handles=[blue_line], prop={"size":80})
plot (time, CO2, 'orange')
Out[5]: [<matplotlib.lines.Line2D at 0x12cd4160>]
06.04.2016 11:42
co2
5 of 9
http://localhost:8888/nbconvert/html/co2.ipynb?download=false
In [6]: co2=list()
time=list()
filelist=list()
nameSensor=list()
os.chdir(r'D:\Year 2\visualisation\CO2')
for file in glob.glob("*.csv"):
filelist.append(file)
for index in range(len(filelist)):
with open(filelist[index]) as f:
reader = csv.reader(f, delimiter=';')
reader.next() #skip header
for row in reader:
if row[1]== '098-CO-1':
nameSensor.append(row[1])
co2.append(row[2])
time.append(datetime.strptime(row[0], '%Y-%m-%d %H:%M:%S'))
CO2=np.array(co2,dtype=np.int16)
#print nameSensor
#print time
plt.figure(figsize=(130, 20))
plt.tick_params(labelsize=90)
blue_line = mlines.Line2D([], [], color='orange', marker= '_',
markersize=80, label='CO2 98th node')
plt.legend(handles=[blue_line], prop={"size":80})
plot (time, CO2, 'orange')
Out[6]: [<matplotlib.lines.Line2D at 0x1dc55d68>]
06.04.2016 11:42
co2
6 of 9
http://localhost:8888/nbconvert/html/co2.ipynb?download=false
In [7]: co2=list()
time=list()
filelist=list()
nameSensor=list()
os.chdir(r'D:\Year 2\visualisation\CO2')
for file in glob.glob("*.csv"):
filelist.append(file)
for index in range(len(filelist)):
with open(filelist[index]) as f:
reader = csv.reader(f, delimiter=';')
reader.next() #skip header
for row in reader:
if row[1]== '014-CO-1':
nameSensor.append(row[1])
co2.append(row[2])
time.append(datetime.strptime(row[0], '%Y-%m-%d %H:%M:%S'))
CO2=np.array(co2,dtype=np.int16)
#print nameSensor
#print time
plt.figure(figsize=(130, 20))
plt.tick_params(labelsize=90)
blue_line = mlines.Line2D([], [], color='orange', marker= '_',
markersize=80, label='CO2 14th node')
plt.legend(handles=[blue_line], prop={"size":80})
plot (time, CO2, 'orange')
Out[7]: [<matplotlib.lines.Line2D at 0x31945048>]
06.04.2016 11:42
co2
7 of 9
http://localhost:8888/nbconvert/html/co2.ipynb?download=false
In [8]: co2=list()
time=list()
filelist=list()
nameSensor=list()
os.chdir(r'D:\Year 2\visualisation\CO2')
for file in glob.glob("*.csv"):
filelist.append(file)
for index in range(len(filelist)):
with open(filelist[index]) as f:
reader = csv.reader(f, delimiter=';')
reader.next() #skip header
for row in reader:
if row[1]== '041-CO-1':
nameSensor.append(row[1])
co2.append(row[2])
time.append(datetime.strptime(row[0], '%Y-%m-%d %H:%M:%S'))
CO2=np.array(co2,dtype=np.int16)
#print nameSensor
#print time
plt.figure(figsize=(130, 20))
plt.tick_params(labelsize=90)
blue_line = mlines.Line2D([], [], color='orange', marker= '_',
markersize=80, label='CO2 41st node')
plt.legend(handles=[blue_line], prop={"size":80})
plot (time, CO2, 'orange')
Out[8]: [<matplotlib.lines.Line2D at 0x3ed82e80>]
06.04.2016 11:42
co2
8 of 9
http://localhost:8888/nbconvert/html/co2.ipynb?download=false
In [9]: co2=list()
time=list()
filelist=list()
nameSensor=list()
os.chdir(r'D:\Year 2\visualisation\CO2')
for file in glob.glob("*.csv"):
filelist.append(file)
for index in range(len(filelist)):
with open(filelist[index]) as f:
reader = csv.reader(f, delimiter=';')
reader.next() #skip header
for row in reader:
if row[1]== '029-CO-1':
nameSensor.append(row[1])
co2.append(row[2])
time.append(datetime.strptime(row[0], '%Y-%m-%d %H:%M:%S'))
CO2=np.array(co2,dtype=np.int16)
#print nameSensor
#print time
plt.figure(figsize=(130, 20))
plt.tick_params(labelsize=90)
blue_line = mlines.Line2D([], [], color='orange', marker= '_',
markersize=80, label='CO2 29th node')
plt.legend(handles=[blue_line], prop={"size":80})
plot (time, CO2, 'orange')
Out[9]: [<matplotlib.lines.Line2D at 0x3fb4a2e8>]
06.04.2016 11:42
co2
9 of 9
http://localhost:8888/nbconvert/html/co2.ipynb?download=false
In [10]: co2=list()
time=list()
filelist=list()
nameSensor=list()
os.chdir(r'D:\Year 2\visualisation\CO2')
for file in glob.glob("*.csv"):
filelist.append(file)
for index in range(len(filelist)):
with open(filelist[index]) as f:
reader = csv.reader(f, delimiter=';')
reader.next() #skip header
for row in reader:
if row[1]== '053-CO-1':
nameSensor.append(row[1])
co2.append(row[2])
time.append(datetime.strptime(row[0], '%Y-%m-%d %H:%M:%S'))
CO2=np.array(co2,dtype=np.int16)
#print nameSensor
#print time
plt.figure(figsize=(130, 20))
plt.tick_params(labelsize=90)
blue_line = mlines.Line2D([], [], color='orange', marker= '_',
markersize=80, label='CO2 53th node')
plt.legend(handles=[blue_line], prop={"size":80})
plot (time, CO2, 'orange')
Out[10]: [<matplotlib.lines.Line2D at 0x71ea0b8>]
In [ ]:
06.04.2016 11:42
co2 - spectrogram
1 of 8
http://localhost:8888/nbconvert/html/co2 - spectrogram.ipynb?downloa...
CO2=np.array(co2,dtype=np.int16)
yCO2=fft(CO2)
fs = 0.1
plt.tick_params(labelsize=5)
f,t,Sxx = signal.spectrogram(CO2, fs, nperseg=128)
plt.pcolormesh(t,f,Sxx)
plt.xlabel(u"Time ")
plt.ylabel(u"Frequency [Hz]")
plt.colorbar()
plt.show()
06.04.2016 11:51
co2 - spectrogram
2 of 8
http://localhost:8888/nbconvert/html/co2 - spectrogram.ipynb?downloa...
06.04.2016 11:51
co2 - spectrogram
3 of 8
http://localhost:8888/nbconvert/html/co2 - spectrogram.ipynb?downloa...
CO2=np.array(co2,dtype=np.int16)
yCO2=fft(CO2)
fs =0.1
plt.tick_params(labelsize=5)
f,t,Sxx = signal.spectrogram(CO2, fs, nperseg=128)
plt.pcolormesh(t,f,Sxx)
plt.xlabel(u"Time ")
plt.ylabel(u"Frequency [Hz]")
plt.colorbar()
plt.show()
06.04.2016 11:51
co2 - spectrogram
4 of 8
http://localhost:8888/nbconvert/html/co2 - spectrogram.ipynb?downloa...
CO2=np.array(co2,dtype=np.int16)
yCO2=fft(CO2)
fs =0.1
plt.tick_params(labelsize=5)
f,t,Sxx = signal.spectrogram(CO2, fs, nperseg=128)
plt.pcolormesh(t,f,Sxx)
plt.xlabel(u"Time ")
plt.ylabel(u"Frequency [Hz]")
plt.colorbar()
plt.show()
06.04.2016 11:51
co2 - spectrogram
5 of 8
http://localhost:8888/nbconvert/html/co2 - spectrogram.ipynb?downloa...
CO2=np.array(co2,dtype=np.int16)
yCO2=fft(CO2)
fs=0.1
plt.tick_params(labelsize=5)
f,t,Sxx = signal.spectrogram(CO2, fs, nperseg=128)
plt.pcolormesh(t,f,Sxx)
plt.xlabel(u"Time ")
plt.ylabel(u"Frequency [Hz]")
plt.colorbar()
plt.show()
06.04.2016 11:51
co2 - spectrogram
6 of 8
http://localhost:8888/nbconvert/html/co2 - spectrogram.ipynb?downloa...
CO2=np.array(co2,dtype=np.int16)
yCO2=fft(CO2)
fs=0.1
plt.tick_params(labelsize=5)
f,t,Sxx = signal.spectrogram(CO2, fs, nperseg=128)
plt.pcolormesh(t,f,Sxx)
plt.xlabel(u"Time ")
plt.ylabel(u"Frequency [Hz]")
plt.colorbar()
plt.show()
06.04.2016 11:51
co2 - spectrogram
7 of 8
http://localhost:8888/nbconvert/html/co2 - spectrogram.ipynb?downloa...
CO2=np.array(co2,dtype=np.int16)
yCO2=fft(CO2)
fs=0.1
plt.tick_params(labelsize=5)
f,t,Sxx = signal.spectrogram(CO2, fs, nperseg=128)
plt.pcolormesh(t,f,Sxx)
plt.xlabel(u"Time ")
plt.ylabel(u"Frequency [Hz]")
plt.colorbar()
plt.show()
06.04.2016 11:51
co2 - spectrogram
8 of 8
http://localhost:8888/nbconvert/html/co2 - spectrogram.ipynb?downloa...
CO2=np.array(co2,dtype=np.int16)
yCO2=fft(CO2)
fs=0.1
plt.tick_params(labelsize=5)
f,t,Sxx = signal.spectrogram(CO2, fs, nperseg=128)
plt.pcolormesh(t,f,Sxx)
plt.xlabel(u"Time ")
plt.ylabel(u"Frequency [Hz]")
plt.colorbar()
plt.show()
In [ ]:
06.04.2016 11:51
air_temperature
1 of 9
http://localhost:8888/nbconvert/html/air_temperature.ipynb?download=...
06.04.2016 11:40
air_temperature
2 of 9
http://localhost:8888/nbconvert/html/air_temperature.ipynb?download=...
In [3]: weather=list()
time=list()
filelist=list()
nameSensor=list()
os.chdir("D:\\Year 2\\visualisation\\data")
for file in glob.glob("*.csv"):
filelist.append(file)
for index in range(len(filelist)):
with open(filelist[index]) as f:
reader = csv.reader(f, delimiter=';')
reader.next() #skip header
for row in reader:
if row[1]== '020-WE-1':
nameSensor.append(row[1])
weather.append(row[4])
time.append(datetime.strptime(row[0], '%Y-%m-%d %H:%M:%S'))
Weather=np.array(weather,dtype=np.float32)
#print nameSensor
#print time
plt.figure(figsize=(130, 20))
plt.tick_params(labelsize=90)
plot (time, Weather, 'bo')
Out[3]: [<matplotlib.lines.Line2D at 0x13105b00>]
06.04.2016 11:40
air_temperature
3 of 9
http://localhost:8888/nbconvert/html/air_temperature.ipynb?download=...
In [4]: weather=list()
time=list()
filelist=list()
nameSensor=list()
os.chdir("D:\\Year 2\\visualisation\\data")
for file in glob.glob("*.csv"):
filelist.append(file)
for index in range(len(filelist)):
with open(filelist[index]) as f:
reader = csv.reader(f, delimiter=';')
reader.next() #skip header
for row in reader:
if row[1]== '170-WE-1':
nameSensor.append(row[1])
weather.append(row[4])
time.append(datetime.strptime(row[0], '%Y-%m-%d %H:%M:%S'))
Weather=np.array(weather,dtype=np.float32)
#print nameSensor
#print time
plt.figure(figsize=(130, 20))
plt.tick_params(labelsize=90)
plot (time, Weather, 'bo')
Out[4]: [<matplotlib.lines.Line2D at 0x13202668>]
06.04.2016 11:40
air_temperature
4 of 9
http://localhost:8888/nbconvert/html/air_temperature.ipynb?download=...
In [5]: weather=list()
time=list()
filelist=list()
nameSensor=list()
os.chdir("D:\\Year 2\\visualisation\\data")
for file in glob.glob("*.csv"):
filelist.append(file)
for index in range(len(filelist)):
with open(filelist[index]) as f:
reader = csv.reader(f, delimiter=';')
reader.next() #skip header
for row in reader:
if row[1]== '068-WE-1':
nameSensor.append(row[1])
weather.append(row[4])
time.append(datetime.strptime(row[0], '%Y-%m-%d %H:%M:%S'))
Weather=np.array(weather,dtype=np.float32)
#print nameSensor
#print time
plt.figure(figsize=(130, 20))
plt.tick_params(labelsize=90)
plot (time, Weather, 'bo')
Out[5]: [<matplotlib.lines.Line2D at 0x171cf320>]
06.04.2016 11:40
air_temperature
5 of 9
http://localhost:8888/nbconvert/html/air_temperature.ipynb?download=...
In [6]: weather=list()
time=list()
filelist=list()
nameSensor=list()
os.chdir("D:\\Year 2\\visualisation\\data")
for file in glob.glob("*.csv"):
filelist.append(file)
for index in range(len(filelist)):
with open(filelist[index]) as f:
reader = csv.reader(f, delimiter=';')
reader.next() #skip header
for row in reader:
if row[1]== '098-WE-1' :
nameSensor.append(row[1])
weather.append(row[4])
time.append(datetime.strptime(row[0], '%Y-%m-%d %H:%M:%S'))
Weather=np.array(weather,dtype=np.float32)
#print nameSensor
#print time
plt.figure(figsize=(130, 20))
plt.tick_params(labelsize=90)
plot (time, Weather, 'bo')
Out[6]: [<matplotlib.lines.Line2D at 0x1bc68470>]
06.04.2016 11:40
air_temperature
6 of 9
http://localhost:8888/nbconvert/html/air_temperature.ipynb?download=...
In [7]: weather=list()
time=list()
filelist=list()
nameSensor=list()
os.chdir("D:\\Year 2\\visualisation\\data")
for file in glob.glob("*.csv"):
filelist.append(file)
for index in range(len(filelist)):
with open(filelist[index]) as f:
reader = csv.reader(f, delimiter=';')
reader.next() #skip header
for row in reader:
if row[1]== '041-WE-1':
nameSensor.append(row[1])
weather.append(row[4])
time.append(datetime.strptime(row[0], '%Y-%m-%d %H:%M:%S'))
Weather=np.array(weather,dtype=np.float32)
#print nameSensor
#print time
plt.figure(figsize=(130, 20))
plt.tick_params(labelsize=90)
plot (time, Weather, 'bo')
Out[7]: [<matplotlib.lines.Line2D at 0x17288400>]
06.04.2016 11:40
air_temperature
7 of 9
http://localhost:8888/nbconvert/html/air_temperature.ipynb?download=...
In [8]: weather=list()
time=list()
filelist=list()
nameSensor=list()
os.chdir("D:\\Year 2\\visualisation\\data")
for file in glob.glob("*.csv"):
filelist.append(file)
for index in range(len(filelist)):
with open(filelist[index]) as f:
reader = csv.reader(f, delimiter=';')
reader.next() #skip header
for row in reader:
if row[1]== '029-WE-1' :
nameSensor.append(row[1])
weather.append(row[4])
time.append(datetime.strptime(row[0], '%Y-%m-%d %H:%M:%S'))
Weather=np.array(weather,dtype=np.float32)
#print nameSensor
#print time
plt.figure(figsize=(130, 20))
plt.tick_params(labelsize=90)
plot (time, Weather, 'bo')
Out[8]: [<matplotlib.lines.Line2D at 0x25c116d8>]
06.04.2016 11:40
air_temperature
8 of 9
http://localhost:8888/nbconvert/html/air_temperature.ipynb?download=...
In [9]: weather=list()
time=list()
filelist=list()
nameSensor=list()
os.chdir("D:\\Year 2\\visualisation\\data")
for file in glob.glob("*.csv"):
filelist.append(file)
for index in range(len(filelist)):
with open(filelist[index]) as f:
reader = csv.reader(f, delimiter=';')
reader.next() #skip header
for row in reader:
if row[1]== '053-WE-1' :
nameSensor.append(row[1])
weather.append(row[4])
time.append(datetime.strptime(row[0], '%Y-%m-%d %H:%M:%S'))
Weather=np.array(weather,dtype=np.float32)
#print nameSensor
#print time
plt.figure(figsize=(130, 20))
plt.tick_params(labelsize=90)
plot (time, Weather, 'bo')
Out[9]: [<matplotlib.lines.Line2D at 0x1be53748>]
06.04.2016 11:40
air_temperature
9 of 9
http://localhost:8888/nbconvert/html/air_temperature.ipynb?download=...
In [10]: weather=list()
time=list()
filelist=list()
nameSensor=list()
os.chdir("D:\\Year 2\\visualisation\\data")
for file in glob.glob("*.csv"):
filelist.append(file)
for index in range(len(filelist)):
with open(filelist[index]) as f:
reader = csv.reader(f, delimiter=';')
reader.next() #skip header
for row in reader:
if row[1]== '187-WE-1' :
nameSensor.append(row[1])
weather.append(row[4])
time.append(datetime.strptime(row[0], '%Y-%m-%d %H:%M:%S'))
Weather=np.array(weather,dtype=np.float32)
#print nameSensor
#print time
plt.figure(figsize=(130, 20))
plt.tick_params(labelsize=90)
plot (time, Weather, 'bo')
Out[10]: [<matplotlib.lines.Line2D at 0x2d71c0b8>]
In [ ]:
In [ ]:
In [ ]:
06.04.2016 11:40
airtemp spectrogram
1 of 9
http://localhost:8888/nbconvert/html/airtemp spectrogram.ipynb?downl...
06.04.2016 11:49
airtemp spectrogram
2 of 9
http://localhost:8888/nbconvert/html/airtemp spectrogram.ipynb?downl...
WEATHER=np.array(weather,dtype=np.float32)
yWEATHER=fft(WEATHER)
fs=0.1
plt.tick_params(labelsize=5)
f,t,Sxx = signal.spectrogram(WEATHER, fs, nperseg=128)
plt.pcolormesh(t,f,Sxx)
plt.xlabel(u"Time ")
plt.ylabel(u"Frequency [Hz]")
plt.colorbar()
plt.show()
06.04.2016 11:49
airtemp spectrogram
3 of 9
http://localhost:8888/nbconvert/html/airtemp spectrogram.ipynb?downl...
WEATHER=np.array(weather,dtype=np.float32)
yWEATHER=fft(WEATHER)
fs=0.1
plt.tick_params(labelsize=5)
f,t,Sxx = signal.spectrogram(WEATHER, fs, nperseg=128)
plt.pcolormesh(t,f,Sxx)
plt.xlabel(u"Time ")
plt.ylabel(u"Frequency [Hz]")
plt.colorbar()
plt.show()
06.04.2016 11:49
airtemp spectrogram
4 of 9
http://localhost:8888/nbconvert/html/airtemp spectrogram.ipynb?downl...
WEATHER=np.array(weather,dtype=np.float32)
yWEATHER=fft(WEATHER)
fs=0.1
plt.tick_params(labelsize=5)
f,t,Sxx = signal.spectrogram(WEATHER, fs, nperseg=128)
plt.pcolormesh(t,f,Sxx)
plt.xlabel(u"Time ")
plt.ylabel(u"Frequency [Hz]")
plt.colorbar()
plt.show()
06.04.2016 11:49
airtemp spectrogram
5 of 9
http://localhost:8888/nbconvert/html/airtemp spectrogram.ipynb?downl...
WEATHER=np.array(weather,dtype=np.float32)
yWEATHER=fft(WEATHER)
fs=0.1
plt.tick_params(labelsize=5)
f,t,Sxx = signal.spectrogram(WEATHER, fs, nperseg=128)
plt.pcolormesh(t,f,Sxx)
plt.xlabel(u"Time ")
plt.ylabel(u"Frequency [Hz]")
plt.colorbar()
plt.show()
06.04.2016 11:49
airtemp spectrogram
6 of 9
http://localhost:8888/nbconvert/html/airtemp spectrogram.ipynb?downl...
WEATHER=np.array(weather,dtype=np.float32)
yWEATHER=fft(WEATHER)
fs=0.1
plt.tick_params(labelsize=5)
f,t,Sxx = signal.spectrogram(WEATHER, fs, nperseg=128)
plt.pcolormesh(t,f,Sxx)
plt.xlabel(u"Time ")
plt.ylabel(u"Frequency [Hz]")
plt.colorbar()
plt.show()
06.04.2016 11:49
airtemp spectrogram
7 of 9
http://localhost:8888/nbconvert/html/airtemp spectrogram.ipynb?downl...
WEATHER=np.array(weather,dtype=np.float32)
yWEATHER=fft(WEATHER)
fs=0.1
plt.tick_params(labelsize=5)
f,t,Sxx = signal.spectrogram(WEATHER, fs, nperseg=128)
plt.pcolormesh(t,f,Sxx)
plt.xlabel(u"Time ")
plt.ylabel(u"Frequency [Hz]")
plt.colorbar()
plt.show()
06.04.2016 11:49
airtemp spectrogram
8 of 9
http://localhost:8888/nbconvert/html/airtemp spectrogram.ipynb?downl...
WEATHER=np.array(weather,dtype=np.float32)
yWEATHER=fft(WEATHER)
fs=0.1
plt.tick_params(labelsize=5)
f,t,Sxx = signal.spectrogram(WEATHER, fs, nperseg=128)
plt.pcolormesh(t,f,Sxx)
plt.xlabel(u"Time ")
plt.ylabel(u"Frequency [Hz]")
plt.colorbar()
plt.show()
06.04.2016 11:49
airtemp spectrogram
9 of 9
http://localhost:8888/nbconvert/html/airtemp spectrogram.ipynb?downl...
WEATHER=np.array(weather,dtype=np.float32)
yWEATHER=fft(WEATHER)
fs=0.1
plt.tick_params(labelsize=5)
f,t,Sxx = signal.spectrogram(WEATHER, fs, nperseg=128)
plt.pcolormesh(t,f,Sxx)
plt.xlabel(u"Time ")
plt.ylabel(u"Frequency [Hz]")
plt.colorbar()
plt.show()
In [ ]:
06.04.2016 11:49