Here’s my dash app for figure Friday.
Spent a bit of time handling data cleaning. There are a lot of zeros for range in the data. I was able to recover many of them by applying the average of non-zero ranges for models that have multiple unique ranges. The others I simply dropped costing about 20% of the data. Because we are exploring range, I decided that EVs with no listed range wasn’t helping matters.
I stratified the data by year selectable with a slider and by EV type (BEV vs PHEV) with a multi-value dropdown.
The map shows what percentage of the statewide total EV type for a given county and year. I used a log color scale to allow differentiation of the less populous counties. The sunburst plot responds to the year selected, the EV type and the county by clicking on the map. It breaks the data down by manu and model. I find it interesting to see the dominance of Tesla beginning in the late 20-teens.
Scroll down to the bottom to see how the range has changed by model year via a box plot. The boxplot responds to the selected EV type and shows that range has been increasing over the years for BEVs, but not much for PHEVs.
I used some styling elements from @Avacsiglo21 's app because CSS and web dev isn’t at all my forte and their app looked so danged good.
I’ll toss the code on github.
If you want to play with it, It’s hosted here (with limited resources, so it will be slow):