Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor alteration #12

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions R/weekendweekday.R
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
3 changes: 2 additions & 1 deletion reports/fullReport/EVBB_report.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down