Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

GEP475GROUPINEEDANAP

Views: 1461
Kernel: Python 3 (Anaconda)

The final results

import pandas as pd import numpy as np

Here I'm reading in the 2016-2017 Combined Netatmo Data

PPM = pd.read_csv('Netatmo2016_2017CO2ppm.csv', parse_dates=True, index_col=1) #PPM.head()

Graph of CO2 concentrations of the year

%matplotlib inline PPM['ppm'].plot()
<matplotlib.axes._subplots.AxesSubplot at 0x7f94c35a03c8>
Image in a Jupyter notebook
df3 = PPM #df3.head(5)
Creating CO2 slope of Δ\Delta ppm / minute
delta_CO2 = df3['ppm'].diff(1) df3['Time'] = df3.index delta_time = df3['Time'].diff(1) / np.timedelta64(1,'m')
df3['slopes']= delta_CO2 / delta_time
#df3['neg_slopes'] = df3['slopes']<0
#df3.head()
%matplotlib inline df3['slopes'].plot()
<matplotlib.axes._subplots.AxesSubplot at 0x7f94c2edca58>
Image in a Jupyter notebook

using Equation:

Infiltration=CO2slopesETCVolume/(InsideppmOutsideppm)Infiltration = CO2 slopes* ETC Volume / (Inside ppm - Outside ppm)

df3['ETCVolume'] = 41000 df3['diff_ppm'] = df3['ppm']-400 #del df3['neg_slopes']
df3['infiltration'] = (df3['slopes']*df3['ETCVolume'])/df3['diff_ppm']
df3.head(5)
Unnamed: 0 ppm Time slopes ETCVolume diff_ppm infiltration
Time
2016-02-19 13:26:00 0 NaN 2016-02-19 13:26:00 NaN 41000 NaN NaN
2016-02-19 13:27:00 1 718.0 2016-02-19 13:27:00 NaN 41000 318.0 NaN
2016-02-19 13:27:00 2 NaN 2016-02-19 13:27:00 NaN 41000 NaN NaN
2016-02-19 13:31:00 3 337.0 2016-02-19 13:31:00 NaN 41000 -63.0 NaN
2016-02-19 13:36:00 4 332.0 2016-02-19 13:36:00 -1.0 41000 -68.0 602.941176
df3['ACH'] = (df3['infiltration']*60) / 41000
%matplotlib inline df3['ACH'].plot()
<matplotlib.axes._subplots.AxesSubplot at 0x7f94c2ec7fd0>
Image in a Jupyter notebook
%matplotlib inline df3['infiltration'].plot()
<matplotlib.axes._subplots.AxesSubplot at 0x7f94c352d6d8>
Image in a Jupyter notebook

Isolating Negative Slopes

infiltration = df3['infiltration']
neg_infiltration = infiltration[infiltration<0]
%matplotlib inline neg_infiltration.plot()
<matplotlib.axes._subplots.AxesSubplot at 0x7f94c39a8630>
Image in a Jupyter notebook
neg_infiltration.describe()
count 4.737700e+04 mean -inf std NaN min -inf 25% -1.245570e+03 50% -4.555556e+02 75% -1.763441e+02 max -4.313519e+00 Name: infiltration, dtype: float64