charging
Binary flag indicating whether the vehicle is currently charging
High-Level Explanation
charging is True when the electric vehicle's battery is charging from a charger and charging is False when the electric vehicle's battery is charging from a charger. This will not be True when the vehicle is utilizing regenerative braking.
Enables
Charging event identification
Example code:
gdf['charging_event_id'] = gdf['charging'].fillna(False).diff().cumsum().fillna(0)This code finds where the
chargingsignal changes and starts a new identifier at each change. Half of these identifiers will be associated with the time between charges, so only values ofcharging_event_idwherechargingisTruefor all values are actually charging events.Note that this logic can be done in SQL equivalently.
Enabled By
Known Quirks
This signal is actually quite well behaved
Visualizations with Explanations
This is an example of the charging signal (in blue) going from False (0) to True (1) during which time two distinct charging sessions take place. The cumsum (i.e. cumulative sum) increments every time charging changes from True to False or from False to True. Charging Event IDs: 0 and 2 occur when no charging is taking place (the IDs exist only because the value of charging has changed), and Charging Event IDs 1 and 3 take place during charging sessions.
Generally, odd Charging Event IDs will be charging sessions, but, in cases where the very first data point occurs when the vehicle is charging (which is uncommon), then even Charging Event IDs will be charging sessions. If there is missing data, some charging sessions can be even and some odd. The best way to differentiate Charging Event IDs where charging is taking place is to group by Charging Event ID and find the average value of charging, which will be 1 (i.e. True) when charging is taking place and 0 (i.e. False) when no charging is taking place



charging Last updated