In [1]:
import pandas as pd
import time
In [1]:
url='http://geoport.whoi.edu/thredds/ncss/grid/coawst_4/use/fmrc/coawst_4_use_best.ncd?\
var=zeta&latitude=41.07&longitude=-68.29&\
time_start=2013-05-01T01%3A00%3A00Z&time_end=2013-05-10T00%3A00%3A00Z&\
vertCoord=&accept=csv'
In [4]:
# Load the CSV data directly into Pandas
df = pd.read_csv(url,index_col='date',parse_dates=True) # skip the units row
In [29]:
df['zeta[unit="meter"]'].tail(5)
Out[29]:
In [30]:
df['zeta[unit="meter"]'].plot(figsize=(10,4))
Out[30]:
In [31]:
df['zeta[unit="meter"]'].std()
Out[31]:
In [33]:
url='http://geoport.whoi.edu/thredds/ncss/grid/bbleh/spring2013?\
var=temp,salt&latitude=39.93&longitude=-74.12&\
time_start=2012-05-01T00%3A30%3A00Z&time_end=2012-05-10T00%3A00%3A00Z&\
vertCoord=7&accept=csv'
# Load the CSV data directly into Pandas
time0=time.time()
df = pd.read_csv(url,index_col='date',parse_dates=True) # skip the units row
print('Elapsed time=%d seconds' % (time.time()-time0))
In [34]:
df2=df.ix[:,-2:] # last two columns of data
In [38]:
df2.plot(figsize=(12,4));
In [35]:
df2.head()
Out[35]:
In [18]:
time()
In [ ]: