Skip to content

Commit

Permalink
update region stats
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnaGoodman1 committed Oct 21, 2020
1 parent 3d7f914 commit 432c1f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions commute/lsoa/region_stats.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ if (region_aspect>=1.9 & region_aspect<2.3) {region_figwidth <- 3.5}
if (region_aspect>=2.3) {region_figwidth <- 2.5}
# Prepare data for Fig 3 line graph
dfscen <- dplyr::select(od_attributes, all, bicycle, contains("slc"), -contains("co2"), rf_dist_km)
dfscen <- dplyr::select(od_attributes, all, bicycle, govtarget_slc,govnearmkt_slc, gendereq_slc, dutch_slc, ebike_slc, rf_dist_km)
dfscen <- dfscen[!is.na(dfscen$rf_dist_km),] # Exclude no fixed workplace / Other
dfsp <- gather(dfscen, key = scenario, value = slc, -rf_dist_km)
dfsp$scenario <- factor(dfsp$scenario)
dfsp$scenario <- factor(dfsp$scenario, levels = levels(dfsp$scenario)[c(1, 4, 3, 6, 5, 2)])
dfsp$scenario <- factor(dfsp$scenario, levels = levels(dfsp$scenario)[c(1, 4, 3, 7, 6, 5, 2)]) # default = alphabetical. re-order
levels(dfsp$scenario)[1:7] <- c("Total no. commuters", "Cyclists in Ebikes", "Cyclists in Go Dutch", "Cyclists in Government Target (equality)", "Cyclists in Government Target (near market)", "Cyclists in Gender Equality", "Cyclists in Census 2011")
```
Expand Down
6 changes: 3 additions & 3 deletions commute/msoa/region_stats.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ if (region_aspect>=1.9 & region_aspect<2.3) {region_figwidth <- 3.5}
if (region_aspect>=2.3) {region_figwidth <- 2.5}
# Prepare data for Fig 3 line graph
dfscen <- dplyr::select(od_attributes, all, bicycle, contains("slc"), -contains("co2"), rf_dist_km)
dfscen <- dplyr::select(od_attributes, all, bicycle, govtarget_slc,govnearmkt_slc, gendereq_slc, dutch_slc, ebike_slc, rf_dist_km)
dfscen <- dfscen[!is.na(dfscen$rf_dist_km),] # Exclude no fixed workplace / Other
dfsp <- gather(dfscen, key = scenario, value = slc, -rf_dist_km)
dfsp$scenario <- factor(dfsp$scenario)
dfsp$scenario <- factor(dfsp$scenario, levels = levels(dfsp$scenario)[c(1, 4, 3, 6, 5, 2)])
levels(dfsp$scenario)[1:6] <- c("Total no. commuters", "Cyclists in Ebikes", "Cyclists in Go Dutch", "Cyclists in Government Target (equality)", "Cyclists in Government Target (near market)", "Cyclists in Gender Equality", "Cyclists in Census 2011")
dfsp$scenario <- factor(dfsp$scenario, levels = levels(dfsp$scenario)[c(1, 4, 3, 7, 6, 5, 2)]) # default = alphabetical. re-order
levels(dfsp$scenario)[1:7] <- c("Total no. commuters", "Cyclists in Ebikes", "Cyclists in Go Dutch", "Cyclists in Government Target (equality)", "Cyclists in Government Target (near market)", "Cyclists in Gender Equality", "Cyclists in Census 2011")
```

Expand Down

0 comments on commit 432c1f1

Please sign in to comment.