Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
| Download

GEP475GROUPINEEDANAP

Views: 1463
Kernel: Python 3 (Anaconda)

NetAtmo Data 2017

%matplotlib notebook #%matplotlib inline import matplotlib.pyplot as plt import numpy as np import pandas as pd data = pd.read_csv('NetAtmo_2017.csv', index_col=1, # use column 1 as the dates to index the data parse_dates=True) # convert the date string into a date object data[-5:]
--------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last) <ipython-input-2-4282bb2de908> in <module>() 6 data = pd.read_csv('NetAtmo_2017.csv', 7 index_col=1, # use column 1 as the dates to index the data ----> 8 parse_dates=True) # convert the date string into a date object 9 data[-5:] /projects/anaconda3/lib/python3.5/site-packages/pandas/io/parsers.py in parser_f(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, squeeze, prefix, mangle_dupe_cols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, dayfirst, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, escapechar, comment, encoding, dialect, tupleize_cols, error_bad_lines, warn_bad_lines, skipfooter, skip_footer, doublequote, delim_whitespace, as_recarray, compact_ints, use_unsigned, low_memory, buffer_lines, memory_map, float_precision) 644 skip_blank_lines=skip_blank_lines) 645 --> 646 return _read(filepath_or_buffer, kwds) 647 648 parser_f.__name__ = name /projects/anaconda3/lib/python3.5/site-packages/pandas/io/parsers.py in _read(filepath_or_buffer, kwds) 387 388 # Create the parser. --> 389 parser = TextFileReader(filepath_or_buffer, **kwds) 390 391 if (nrows is not None) and (chunksize is not None): /projects/anaconda3/lib/python3.5/site-packages/pandas/io/parsers.py in __init__(self, f, engine, **kwds) 728 self.options['has_index_names'] = kwds['has_index_names'] 729 --> 730 self._make_engine(self.engine) 731 732 def close(self): /projects/anaconda3/lib/python3.5/site-packages/pandas/io/parsers.py in _make_engine(self, engine) 921 def _make_engine(self, engine='c'): 922 if engine == 'c': --> 923 self._engine = CParserWrapper(self.f, **self.options) 924 else: 925 if engine == 'python': /projects/anaconda3/lib/python3.5/site-packages/pandas/io/parsers.py in __init__(self, src, **kwds) 1388 kwds['allow_leading_cols'] = self.index_col is not False 1389 -> 1390 self._reader = _parser.TextReader(src, **kwds) 1391 1392 # XXX pandas/parser.pyx in pandas.parser.TextReader.__cinit__ (pandas/parser.c:4184)() pandas/parser.pyx in pandas.parser.TextReader._setup_parser_source (pandas/parser.c:8449)() FileNotFoundError: File b'NetAtmo_2017.csv' does not exist

Above, we have a sample of how the data we are using is organized and the type of results we acquired for each category.

inside_concentration = data['CO2'] concentration_slope = data['CO2'].diff()/data['Timestamp'].diff() concentration_slope.plot()

The graph above demonstrates the amount of CO2 over the span of the year 2017. This will be useful in finding how quickly the CO2 levels decay according to what we find the infiltration rate is with the blower door test.

concentration_slope = concentration_slope.where(concentration_slope<0, 0) concentration_slope = concentration_slope.where(data['CO2']>450, 0) concentration_slope.plot()

Here, we can see the rate at which the CO2 levels fall.

infiltration_rate = concentration_slope/((inside_concentration - 400.).abs())*3600 infiltration_rate.plot()
ax = infiltration_rate.plot() ax.set_ylim((-1,1)) ax.grid() plt.savefig('test.pdf')
infiltration_rate.describe()
infiltration_rate.hist(bins=50)
data['CO2'].plot()
time2 = '2017-01-23 11:00:00' time1 = '2017-02-6 11:00:00' data[time2:time1]
#time2 = '2017-01-23 11:00:00' #time1 = '2017-02-6 11:00:00' rise = data['CO2'][time2] - data['CO2'][time1] run = (data['Timestamp'][time2] - data['Timestamp'][time1]) print(data['CO2'][time2]) print(rise) print('run =',run) print('slope =', rise/run) rise / run * 3600 / (data['CO2'][time2]-400)