library(tidyverse)
library(plotly)
library(knitr)
df <- read_csv("/Users/richpauloo/Downloads/740_Miller_personal_damages_log - Sheet1.csv")
df$Cost <- as.numeric(gsub(",","", substr(df$Cost, 2, 100)))
p <- filter(df, !is.na(Owner)) %>%
ggplot(aes(Owner, Cost, fill = Item)) +
geom_col()
ggplotly(p)
filter(df, !is.na(Owner)) %>%
group_by(Owner) %>%
summarise(`Total Cost` = sum(Cost, na.rm = T)) %>%
arrange(-`Total Cost`) %>%
kable()
| Ben |
1945 |
| Bree, Ben, Marisa |
590 |
| Marisa |
434 |
| Bree |
110 |
| Marisa (Rich) |
40 |