Last active
March 10, 2021 10:31
-
-
Save anielsen001/eb433ce3a8f965267238b6cd120dcb3e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this is a simple example of how to parse an Aranet4 CO2 sensor and plot the data using Julia | |
using Dates | |
using DataFrames | |
using CSV | |
using Plots | |
plotly() | |
fname = "Aranet4 017E9_2020-12-10T05_04_41.csv" | |
dateformat = DateFormat("mm/dd/yyyy HH:MM:SS p") | |
df= CSV.read(fname, DataFrame; dateformat = dateformat) | |
tstart = floor(df.Time[1], Dates.Minute) | |
tend = ceil(df.Time[end], Dates.Minute) | |
tm_tick = range(tstart,tend, step=Minute(30)) | |
ticks = Dates.format.(tm_tick,"mm/dd HH:MM p") | |
plot(df.Time, df[!,Symbol("CO₂(ppm)")], xticks=(tm_tick,ticks), xrot=60, label="CO₂(ppm)") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Initial example of how to parse and plot the csv file saved by the Aranet4 CO2 sensor using Julia.