wide <- long %>% pivot_wider(names_from = "bus_type",
values_from = "number_of_individuals")
wide
# A tibble: 1,146 × 15
day date daily orangeBoardings orangeAlightings orangeAverage
<chr> <chr> <dbl> <dbl> <dbl> <dbl>
1 Monday 01/11/2010 952 877 1027 952
2 Tuesday 01/12/2010 796 777 815 796
3 Wednesday 01/13/2010 1212. 1203 1220 1212.
4 Thursday 01/14/2010 1214. 1194 1233 1214.
5 Friday 01/15/2010 1644 1645 1643 1644
6 Saturday 01/16/2010 1490. 1457 1524 1490.
7 Sunday 01/17/2010 888. 839 938 888.
8 Monday 01/18/2010 1000. 999 1000 1000.
9 Tuesday 01/19/2010 1035 1023 1047 1035
10 Wednesday 01/20/2010 1396. 1375 1416 1396.
# … with 1,136 more rows, and 9 more variables: purpleBoardings <dbl>,
# purpleAlightings <dbl>, purpleAverage <dbl>, greenBoardings <dbl>,
# greenAlightings <dbl>, greenAverage <dbl>, bannerBoardings <dbl>,
# bannerAlightings <dbl>, bannerAverage <dbl>