diff --git a/R/weekendweekday.R b/R/weekendweekday.R index 5260509..9589021 100644 --- a/R/weekendweekday.R +++ b/R/weekendweekday.R @@ -1,6 +1,8 @@ # This shows differences in charging patterns between the weekend and weekdays. # Currently not accurate because charge_power_kw = 0 are not included # thus data doesn't include times where the car is not charging +# Still informative, but needs to be thought of as "average charge when car +# is charging", not average over all times p <- ggplot2::ggplot(df, aes(x = time, y = charge_power_kw, group = halfHour)) + density(alpha = 0.5) # <- make the plot in an object first diff --git a/README.md b/README.md index cb11c1a..9b09abb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # evAnalysis Code used to analyse various EV performance & power flow datasets. +Upstream version found [here](https://github.com/CfSOtago/evAnalysis). ## Analysis diff --git a/reports/fullReport/EVBB_report.Rmd b/reports/fullReport/EVBB_report.Rmd index 766f1ec..d10f8e0 100644 --- a/reports/fullReport/EVBB_report.Rmd +++ b/reports/fullReport/EVBB_report.Rmd @@ -615,7 +615,8 @@ kableExtra::kable(addmargins(t), kable_styling() ``` -Table \@ref(tab:seqCodeTable) shows the results of this coding for all clean observations within the selected dates (`r min(cleanDT$date)` - `r max(cleanDT$date)`). As we can see most observations were coded using this scheme and we obtained `r tidyNum(nChBegins)` instances of charging starting, and `r tidyNum(nChEnds)` instances of charge ending. The additional `r nChEnds - nChBegins` instances of charge ending than there are of the charge beginning may be due to the first (or last) instance of data collection occurring during mid-charge for some vehicles. +Table \@ref(tab:seqCodeTable) shows the results of this coding for all clean observations within the selected dates (`r min(cleanDT$date)` - `r max(cleanDT$date)`). As we can see most observations were coded using this scheme and we obtained `r tidyNum(nChBegins)` instances of charging starting, and `r tidyNum(nChEnds)` instances of charge ending. +The additional `r abs(nChEnds - nChBegins)` instances of charge `r if(nChBegins < nChEnds){"ending"} else {"beginning"}` than there are of the charge `r if(nChBegins < nChEnds){"beginning"} else {"ending"}` may be due to the first (or last) instance of data collection occurring during mid-charge for some vehicles. An alternative classification method, tested in Section \@ref(chargeFlagTest), added a 120 second maximim threshold to sequences of observations but was not used as it failed to identify sparse sequences of charging events.