background-image: url(https://user-images.githubusercontent.com/1825120/61066243-12dc6d80-a3fd-11e9-8805-826a47c553f6.png)
--
See https://docs.ropensci.org/stats19/
Actions speak louder than words...
Work through Section 2 of the exercises
Section 3.4 shows how to change classes in R
Time is represented by special classes:
library(lubridate) x = today() class(x) day(x) month(x) year(x) weekdays(x)
as.Date("2019-10-17") # works # as.Date("2019 10 17") # fails ymd("2019 10 17") # works dmy("17/10/2019") # works
c_sample = stats19::accidents_sample c_sample$date c_sample$date_formatted = dmy(c_sample$date) c_sample$date_formatted > ymd("2022-08-01")
library(sf) crashes = readr::read_csv("https://github.com/ropensci/stats19/releases/download/1.0.0/crashes.csv") crashes_sf = crashes # create copy of crashes dataset crashes_sf$longitude = c(-1.3, -1.2, -1.1) crashes_sf$latitude = c(50.7, 50.7, 50.68) crashes_sf = st_as_sf(crashes_sf, coords = c("longitude", "latitude"), crs = 4326) plot(crashes_sf)
Exercises: Section 6 of the handout
Further reading: Section 3.2 to 3.2.2 of handouts
Talk on Road Safety 1
Applying the methods to stats19 data - live demo
How to access data with stats19 Key stats19 functions Excercises: analysing road crash data on the Isle of Wight
Continue working through the handouts
--
See video: https://www.youtube.com/watch?v=7oyiPBjLAWY&feature=youtu.be&t=357
09:30-11:00 Point pattern analysis
11:15-12:30 Road network data
Lunch
13:30-15:00 Analysing crash data on road network
Break
15:15-15:30: Talk on Road Safety 3
15:30-16:30 Applying the methods to your own data
--
Merging, forecasting, network analysis
Making maps: try out the exercises in Section 7
From break until lunch, either:
Dive into processing large stats19 dataset (Section 8)
Sections 1:5 R vital
--
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.