- Wifi password: ullyfo
- Network: UoLConferences
2017-03-31 See rpubs.com/Robinlovelace for slides and GitHub for code
Aditional material
Coffee & set-up: 09:00 - 09:15
Coffee break: 10:45 - 11:00
LUNCH and looking at your data: 12:30 - 13:30
Coffee break: 14:45 - 15:00
Point pattern analysis and models (online tutorial): 15:15 - 16:00
Your data or additional tutorials: 16:15 onwards
"With the advent of “modern” GIS software, most people want to point and click their way through life. That’s good, but there is a tremendous amount of flexibility and power waiting for you with the command line. Many times you can do something on the command line in a fraction of the time you can do it with a GUI (Sherman 2008, p. 283)
If you cannot visualise your data, it is very difficult to understand your data. Conversely, visualisation will greatly aid in communicating your results.
Human beings are remarkably adept at discerning relationships from visual representations. A well-crafted graph can help you make meaningful comparisons among thousands of pieces of information, extracting patterns not easily found through other methods. … Data analysts need to look at their data, and this is one area where R shines. (Kabacoff, 2009, p. 45).
base graphics
Source: Cheshire and Lovelace (2014) - available online
ggplot2 way
Source: This tutorial!
census
Before progressing further: Any questions?
Course materials are all available online from a GitHub repository. Click "Download ZIP" to download all the test data, ready to procede.
The main document to accompany this tutorial is a pdf within the main repository. This is to be made available for free worldwide - any comments/corrections welcome.
All course material can be found online at github.com/Robinlovelace/Creating-maps-in-R
In there course notes for today can be found in a file called 2017-03-31-spatial data-lnd.Rmd in the course-info folder.
# get data (if you don't have it already)
u = "https://github.com/Robinlovelace/Creating-maps-in-R/archive/master.zip"
download.file(u, "master.zip")
unzip("master.zip")
.Rproj file in the resulting folderlibrary(rgdal)
lnd = readOGR("data/london_sport.shp")
install.packages("devtools") # if not already installed
devtools::install_github("nowosad/spData")
library(dplyr)
lnd@data %>%
filter(grepl("s", name)) %>%
arrange(Partic_Per)
install.packages("rnaturalearth")
countries = rnaturalearth::countries110
plot(countries)
library(stplanr) r = route_cyclestreet(from = "Senate House, London", to = "Leeds") qtm(r) rg = route_graphhopper(from = "Senate House, London", "London King's cross") rg = route_graphhopper(from = "Senate House, London", "London King's cross") rc = route_graphhopper(from = "Senate House, London", "London King's cross", vehicle = "car") qtm(rg)+ qtm(rc, lines.col = "green")