granolarr v1
GRANOLARR is a geogGRaphic dAta scieNce, reprOducibLe teAching resouRce in R
First version: last updated 17 January 2020.
This work is licensed under the GNU General Public License v3.0 except where specified. Contains public sector information licensed under the Open Government Licence v3.0, see Data / README.md
. See Lectures / Images / README.md
, Practicals / Images / README.md
and Utils / IOSlides / README.md
for information regarding the images used in the materials.
This repository contains reproducible materials to teach geographic information and data science in R. Part of the materials are derived from the lectures and practical sessions for the module GY7702 Practical Programming in R of the MSc in Geographic Information Science at the School of Geography, Geology, and the Environment of the University of Leicester, by Dr Stefano De Sabbata.
This content was created using R, RStudio, RMarkdown, Bookdown, and GitHub.
Table of contents
Materials by topic
All the materials are available through the lectures bookdown and practical sessions bookdown pages. Links to the lecture slides and bookdown chapters for each week are listed below.
- Programming, a practical introduction
- 101 Introduction
- 102 Data types
- 111 Control structures and functions
- Data wrangling
- 201 Selection and manipulation
- 202 Table operations
- Reproducibility
- Data visualisation
- Coming soon
- Data analysis
- 501 Exploratory data analysis
- 502 Regression models
- Machine learning
Suggested schedule
The lectures and practical sessions have been designed to follow the schedule below:
- Programming, a practical introduction
- 101 Introduction
- 102 Data types
- Data wrangling
- 201 Selection and manipulation
- 202 Table operations
- Reproducibility
- 301 Reproducible analysis
- Programming
- 111 Control structures and functions
- Data analysis
- 501 Exploratory data analysis
- 502 Regression models
- Machine learning
- 601 Unsupervised
Reference books
Suggested reading
- Programming Skills for Data Science: Start Writing Code to Wrangle, Analyze, and Visualize Data with R by Michael Freeman and Joel Ross, Addison-Wesley, 2019. See book webpage and repository.
- Machine Learning with R: Expert techniques for predictive modeling by Brett Lantz, Packt Publishing, 2019. See book webpage.
Further reading
- The Art of R Programming: A Tour of Statistical Software Design by Norman Matloff, No Starch Press, 2011. See book webpage
- Discovering Statistics Using R by Andy Field, Jeremy Miles and Zoë Field, SAGE Publications Ltd, 2012. See book webpage.
- R for Data Science by Garrett Grolemund and Hadley Wickham, O’Reilly Media, 2016. See online book.
- An Introduction to R for Spatial Analysis and Mapping by Chris Brunsdon and Lex Comber, Sage, 2015. See book webpage
Reproducibility
To reproduce these materials:
- install R, RStudio and Git
- install the following R libraries
tidyverse
,magrittr
knitr
,stargazer
nycflights13
pastecs
,car
,psych
,lmtest
,lm.beta
e1071
,dbscan
sp
,rgdal
,tmap
- install tinytex
- clone this repository as an RStudio project
- open RStudio
- make sure Git is correctly set up in
Tools > Global Options... > Git/SVN
- make sure that the selected option for
Typeset LaTeX into PDF using
isXeLaTeX
inTools > Global Options... > Sweave
(practicals are also compiled locally as PDF files) - select
File > New Project...
, thenVersion Control
and finallyGit
- copy
https://github.com/sdesabbata/granolarr.git
in theRepository URL
field, select a folder for the fieldCreate project as subdirectory of
and click onCreate Project
- execute
Make.R
Credits and acknowledgements
This work is licensed under the GNU General Public License v3.0.
This repository includes teaching materials that were created by Dr Stefano De Sabbata for the module GY7702 Practical Programming in R, while working at the School of Geography, Geology, and the Environment of the University of Leicester. Stefano would also like to acknowledge the contributions made to parts of these materials by Prof Chris Brunsdon and Prof Lex Comber (see also An Introduction to R for Spatial Analysis and Mapping, Sage, 2015), Dr Marc Padilla, and Dr Nick Tate, who conveened previous versions of the module (GY7022) at the University of Leicester.
Files in the Data folder have been derived from data by sources such as the Office for National Statistics, Ministry of Housing, Communities & Local Government, Ofcom, and other institutions of the UK Government under the Open Government License v3 – see linked webpage above on the National Archives website or the LICENSE file in this folder).