traffic_volumes | R Documentation |
See data.cdrc.ac.uk/dataset/southwark-traffic-counts
This dataset represents travel levels at the point locations stored in
traffic
traffic_volumes
An object of class tbl_df
(inherits from tbl
, data.frame
) with 1522 rows and 20 columns.
## Not run:
f = "/tmp/2010-2016-allaveragedailytrafficflowcdrcmapreducedfile.xlsx"
traffic_volumes = readxl::read_excel(f)
summary(traffic_volumes$ID %in% traffic$cp)
pryr::object_size(traffic_volumes)
usethis::use_data(traffic_volumes)
library(dplyr)
traffic_agg = traffic_volumes %>%
group_by(cp = ID) %>%
summarise(
total = sum(`TOTAL FLOW`),
cycle_or_motorcycle = sum(`ARX PEDAL-MOTORCYCLE`),
av_speed = mean(AVERAGE_SPEED),
year = mean(YEAR)
)
if(ncol(traffic) < 8) {
traffic = left_join(traffic, traffic_agg)
usethis::use_data(traffic, overwrite = TRUE)
}
mapview::mapview(traffic, zcol = "total")
sf:::plot.sf(traffic)
## End(Not run)
summary(traffic_volumes)
plot(traffic$total, traffic$cycle_or_motorcycle)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.