-
Notifications
You must be signed in to change notification settings - Fork 8
/
gis4ta-pres.Rmd
135 lines (92 loc) · 3.11 KB
/
gis4ta-pres.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
---
title: "GIS for Transport Applications"
author: "Robin Lovelace"
date: "April 14, 2015"
output:
ioslides_presentation:
transition: slower
---
```{r, echo=FALSE, include=FALSE}
pkgs <- c("grid", "png")
lapply(pkgs, library, character.only = T)
# bibliography: "~/Documents/R.bib"
```
## Welcome and housekeeping
09:30 – 10:00 Registration and refreshments
10:00 – 11:00 Introduction to R and QGIS for transport applications
11:00 – 12:00 Route analysis using R and Routino
12:00 – 12:30 Presentation of maps
**12:30 – 13:30 Lunch**
13:30 – 14:30 Collecting, processing and analysing large GPS and Smartphone datasets
14:30 – 16:30 Hackathon
16:30 – 17:00 Best map prize announcement.
# QGIS for transport applications
## The uptake of QGIS
```{r, echo=FALSE}
grid.raster(readPNG("/home/robin/Pictures/Selection_178.png"))
```
## Flexible and user friendly
```{r, echo=FALSE}
grid.raster(readPNG("~/repos/bikeR/figures/wy-overview.png"))
```
## Compared with R...
```{r, echo=FALSE}
grid.raster(readPNG("~/repos/bikeR/figures/seriousWY.png"))
```
# R for transport applications
## Why R?
See the free, open source, online tutorial [github.com/robinlovelace/Creating-maps-in-R](https://github.com/Robinlovelace/Creating-maps-in-R).
```{r, echo=FALSE}
f <- "/home/robin/repos/Creating-maps-in-R/figure/facet_london.png"
grid.raster(readPNG(f))
```
## The packages used
Can be installed and loaded in 6 lines of code:
```{r, eval=FALSE}
pkgs <- c("devtools", "rgdal", "raster", "ggmap") # official packages
install.packages(pkgs)
library(devtools) # enables installation of leaflet
gh_pkgs <- c("rstudio/leaflet", "robinlovelace/stplanr")
install_github(gh_pkgs) # install packages on github
lapply(c(pkgs, "leaflet", "stplanr"), library, character.only = T) # load all
```
## RStudio
RStudio Desktop is highly recommended.
```{r, echo=FALSE}
img <- readPNG("/home/robin/repos/robinlovelace.github.io/img/rstudio-shiny-button.png")
grid.raster(img)
```
```{r, echo=FALSE, include=FALSE}
pkgs <- c("devtools", "shiny", "rgdal", "rgeos", "ggmap") # official packages
gh_pkgs <- c("rstudio/leaflet", "robinlovelace/stplanr")
lapply(c(pkgs, "leaflet", "stplanr"), library, character.only = T) # load all
```
## Leaflet
An R interface to the Leaflet JavaScript library, compatible with Shiny.
```{r, eval=FALSE}
cent <- geocode("Leeds")
leaflet() %>%
addTiles() %>%
addCircleMarkers(data = cent)
```
# III: National Propensity to Cycle Tool (NPCT)
## Early user testing
```{r, echo=FALSE}
grid.raster(readPNG("~/Pictures/Selection_115.png"))
```
## Genius additions: zoom dependent selection; freeze Scope
```{r, echo=FALSE}
grid.raster(readPNG("~/Pictures/Selection_156.png"))
```
## Running the app for different cities
```{r, eval=FALSE}
runApp("~/repos/pct-shiny/norwich/", launch.browser = T)
runApp("~/repos/pct-shiny/cambridge/", launch.browser = T)
runApp("~/repos/pct-shiny/manchester/", launch.browser = T)
```
# IV: Get your hands dirty
## Working through **Introduction to R and QGIS**
- Don't worry if you don't finish
- Prioritise either R or QGIS
- Interact with us and others
- Any questions