Browse Source

2018 data appears incomplete

Petra Lamborn 4 years ago
parent
commit
20900c60ad
1 changed files with 8 additions and 1 deletions
  1. 8
    1
      expl.R

+ 8
- 1
expl.R View File

@@ -1,9 +1,16 @@
1 1
 # Exploration on data
2 2
 
3
+# Libraries
4
+library(ggplot2)
5
+
3 6
 # Load data from Rdata file
4 7
 load("crashdata.Rdata")
5 8
 
6 9
 # Alternative way to load data
7 10
 #dat <- read.csv("finaldata_201809.csv")
8 11
 
9
-str(dat)
12
+str(dat)
13
+
14
+yeartab <- table(dat$CRASH_YEAR)
15
+
16
+ggplot(dat) + geom_bar(aes(x=CRASH_YEAR))