In [20]:
%matplotlib inline
import os
import matplotlib
import pandas as pd
# set matplotlib style
matplotlib.style.use('ggplot')
# setup file path
archive_dir = './phenocamdata'
sitename = 'bartlettir'
roiname = 'DB_0001'
infile = "{}_{}_timeseries.csv".format(sitename, roiname)
inpath = os.path.join(archive_dir, sitename, 'ROI', infile)
print inpath
# read in file
with open(inpath,'r') as fd:
df = pd.read_csv(fd, comment='#', parse_dates=[[0,1]])
# check the data
df.head()
Out[20]:
In [10]:
# plot the data frame gcc values
df.index = df.date_local_std_time
ax = df.gcc.plot(style='k.', markersize=.5, figsize=[16,4])
ax.set_ylabel('gcc')
ax.set_xlabel('date')
Out[10]:
In [22]:
infile2 = "{}_{}_3day.csv".format(sitename, roiname)
inpath2 = os.path.join(archive_dir, sitename, 'ROI', infile2)
# read in file
print inpath
print inpath2
with open(inpath2,'r') as fd:
df2 = pd.read_csv(fd, comment='#', parse_dates=[0])
# check the data
df2.head()
Out[22]:
In [19]:
# plot the data frame gcc values
df.index = df.date_local_std_time
ax = df.gcc.plot(style='k.', markersize=.5, figsize=[16,4])
df2.plot('date','gcc_90', grid=True, style=['g'], ax=ax)
ax.set_ylabel('gcc')
ax.set_xlabel('date')
Out[19]:
In [ ]: