Skip to content

Commit 3e73815

Browse files
committed
Update files - more reproducibility
1 parent 83faf60 commit 3e73815

41 files changed

Lines changed: 62 additions & 62 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

vignettes/point-pattern.Rmd

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
---
22
title: 'Point Pattern analysis and spatial interpolation with R'
33
output:
4-
github_document:
5-
toc: yes
4+
pdf_document
65
bibliography: references.bib
6+
always_allow_html: yes
77
---
88

9-
```{r, echo=FALSE}
10-
knitr::opts_knit$set(root.dir = "..")
11-
```
12-
139
# Introduction
1410

1511
This tutorial teaches the basics of point pattern analysis in R.
@@ -32,12 +28,12 @@ This tutorial assumes you have downloaded the GitHub repo [`robinlovelace/Creati
3228

3329
<!-- Could say how to this with download.file... -->
3430

35-
The input datasets, cunningly stored in the `data/` directory, are on 'Boris Bikes' docking stations around London, and can be read-in and visualised with the following commands:
31+
The input datasets, cunningly stored in the `../data/` directory, are on 'Boris Bikes' docking stations around London, and can be read-in and visualised with the following commands:
3632

3733
```{r cycle-hire1}
38-
lnd = rgdal::readOGR("data/lnd.geojson")
39-
cycle_hire = rgdal::readOGR("data/cycle_hire.geojson")
40-
cycle_hire_osm = rgdal::readOGR("data/cycle_hire-osm.geojson")
34+
lnd = rgdal::readOGR("../data/lnd.geojson")
35+
cycle_hire = rgdal::readOGR("../data/cycle_hire.geojson")
36+
cycle_hire_osm = rgdal::readOGR("../data/cycle_hire-osm.geojson")
4137
plot(cycle_hire)
4238
points(cycle_hire_osm, col = "red")
4339
plot(lnd, add = TRUE)
@@ -103,6 +99,8 @@ We can aggregate the points per zone and provide summary statistics.
10399
Starting with the number of points per polygon, this would calculated as follows:
104100

105101
```{r}
102+
proj4string(cycle_hire) = proj4string(lnd)
103+
106104
cycle_hire_ag = aggregate(cycle_hire["id"], lnd, FUN = "length")
107105
```
108106

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)