%matplotlib inline
import matplotlib
import numpy as np
import pandas as pd
import os
import matplotlib.pylab as plt
files = [f for f in os.listdir("/sw/apps/nasa") if f.endswith('csv')]
frames = []
idx = 0
for f in files:
print(f)
frames.append(pd.read_csv("/sw/apps/nasa/{}".format(f), header=None, names=["position","unixepoc","sdate", "stime", "metric", "val"]))
frames[idx] = frames[idx].assign(timestamp=lambda x: x.sdate+" "+x.stime)
frames[idx].timestamp = pd.to_datetime(frames[idx].timestamp)
frames[idx] = frames[idx].drop(['sdate','stime','position','unixepoc','val'], axis=1)
frames[idx] = frames[idx].set_index(['timestamp'])
frames[idx].sort_index(inplace=True)
idx += 1
barometric pressure.csv
humidity.csv
solar radiation.csv
sunrise.csv
sunset.csv
temperature.csv
wind direction in degrees.csv
wind speed.csv
Barometric Pressure
frames[0].metric.plot(figsize=(16,5))
<matplotlib.axes._subplots.AxesSubplot at 0x11c9a3198>
Humidity
frames[1].metric.plot(figsize=(16,5))
<matplotlib.axes._subplots.AxesSubplot at 0x1193dca90>
Solar Radiation
frames[2].metric.plot(figsize=(16,5))
<matplotlib.axes._subplots.AxesSubplot at 0x1193f6278>
Sunrise
frames[3].metric.plot(figsize=(16,5))
<matplotlib.axes._subplots.AxesSubplot at 0x11d7ec940>
Sunset
frames[4].metric.plot(figsize=(16,5))
<matplotlib.axes._subplots.AxesSubplot at 0x11d7885f8>
Temperature
frames[5][frames[5].index.month==12].plot(figsize=(16,5))
<matplotlib.axes._subplots.AxesSubplot at 0x12379cda0>
frames[5][frames[5].index.month==12].metric.describe()
count 8164.000000
mean 47.608893
std 4.994597
min 34.000000
25% 45.000000
50% 47.000000
75% 50.000000
max 62.000000
Name: metric, dtype: float64
frames[5].metric.plot(figsize=(16,5))
<matplotlib.axes._subplots.AxesSubplot at 0x11d17a550>
Wind Direction
frames[6].metric.plot(figsize=(16,5))
<matplotlib.axes._subplots.AxesSubplot at 0x11d0c6cf8>
Wind Speed
frames[7].metric.plot(figsize=(16,5))
<matplotlib.axes._subplots.AxesSubplot at 0x11d7aec88>