library(tidyverse)
library(janitor)
04-report-template-oyo
Set up
Import your files
<- read_rds("data-processed-power/power_outages.rds")
all_outages
|> glimpse() all_outages
Rows: 526,165
Columns: 14
$ state_event <chr> "Arkansas", "Arkansas", "Arkansas", "Arkansas", "…
$ datetime_event_began <dttm> 2014-11-24 00:00:00, 2014-11-24 00:00:00, 2014-1…
$ datetime_restoration <dttm> 2014-11-24 00:00:00, 2014-11-24 00:00:00, 2014-1…
$ event_type <chr> "Fuel Supply Emergency - Coal", "Fuel Supply Emer…
$ fips <dbl> 5021, 5035, 5051, 5069, 5093, 5119, 5121, 5121, 5…
$ state <chr> "Arkansas", "Arkansas", "Arkansas", "Arkansas", "…
$ county <chr> "Clay", "Crittenden", "Garland", "Jefferson", "Mi…
$ start_time <dttm> 2014-11-24 09:30:00, 2014-11-24 09:30:00, 2014-1…
$ duration <dbl> 5.75, 1.25, 0.75, 1.25, 0.75, 1.25, 5.25, 0.75, 6…
$ end_time <dttm> 2014-11-24 15:15:00, 2014-11-24 10:45:00, 2014-1…
$ min_customers <dbl> 456, 755, 279, 252, 301, 523, 223, 229, 588, 287,…
$ max_customers <dbl> 1803, 755, 293, 256, 301, 523, 401, 229, 700, 287…
$ mean_customers <dbl> 1301.4783, 755.0000, 287.3333, 254.0000, 301.0000…
$ event_category <chr> "Fuel Supply Issue", "Fuel Supply Issue", "Fuel S…
OYO:
Create parameter list and filter for parameters
# state_list <-
#
# state_list
States: Texas
# outages <- all_outages |>
#
# outages
Some analysis:
Common cause of outages
# outages |>
# group_by (event_category) |>
# summarize(total_events = n()) |>
# arrange(total_events |> desc())
Cause of longest outages
# outages |>
# group_by (event_category) |>
# summarize(avg_outage_length = mean(duration), total_occurences = n()) |>
# arrange(avg_outage_length |> desc(), total_occurences)