/
data.R
170 lines (161 loc) · 4.36 KB
/
data.R
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
#' Example OD data
#'
#' Zone datasets for packages examples
#'
#' @note The schema data can be (re-)generated using code in the
#' `data-raw` directory.
#'
#' @docType data
#' @keywords datasets
#' @name od_data_zones
#' @aliases od_data_csa_zones od_data_zones_min
NULL
#' Origin-destination datasets
#'
#' Datasets representing top commuter desire lines
#' in Leeds based on the 2011 Census.
#' The first two variables of the data frame are the zone code of origin and destination, respectively.
#' The other columns record the number of people who travel by different modes, including
#' `all`, `train`, `bus`, `bicycle` and by `foot`.
#'
#' `od_data_df_medium` is a larger dataset with the same variables, with around 10k rows.
#'
#' @note The schema data can be (re-)generated using code in the
#' `data-raw` directory.
#'
#' @docType data
#' @keywords datasets
#' @name od_data_df
#' @aliases od_data_df_medium
#' @examples
#' od_data_df
NULL
#' Datasets reporesenting zone centroids
#'
#' These are provided as a geographic (sf) object and a simple
#' data frame with longitude (`X`) and latitude (`Y`) columns.
#'
#' @note The schema data can be (re-)generated using code in the
#' `data-raw` directory.
#'
#' @docType data
#' @keywords datasets
#' @name od_data_centroids
#' @aliases od_data_coordinates
#' @examples
#' head(od_data_coordinates)
NULL
#' Route network data for Leeds
#'
#' @note The schema data can be (re-)generated using code in the
#' `data-raw` directory.
#'
#' @docType data
#' @keywords datasets
#' @name od_data_network
#' @examples
#' head(od_data_network)
NULL
#' Origin-destination data with destinations in a different layer than origins
#'
#' This dataset represents commuter flows between Output Areas
#' and Workplace Zones, the most detailed open OD data in the UK.
#' See https://wicid.ukdataservice.ac.uk/ and the script
#' `data-raw/od_wpz.R` in the `od` package's GitHub repo.
#'
#' The dataset reports (in the 3rd column) the number of people travelling
#' between origins and destinations.
#'
#' @note The schema data can be (re-)generated using code in the
#' `data-raw` directory.
#'
#' @docType data
#' @keywords datasets
#' @name od_data_df2
#' @examples
#' head(od_data_df2)
NULL
#' Output area centroids
#'
#' This dataset represents geographic centroids of Output Areas in Leeds, UK.
#'
#' @note The schema data can be (re-)generated using code in the
#' `data-raw` directory.
#'
#' @docType data
#' @keywords datasets
#' @name od_data_centroids2
#' @examples
#' head(od_data_centroids2)
NULL
#' Residential (origin) 'Output Area' centroids
#'
#' This dataset represents geographic centroids of Output Areas in Leeds, UK.
#'
#' @note The schema data can be (re-)generated using code in the
#' `data-raw` directory.
#'
#' @docType data
#' @keywords datasets
#' @name od_data_centroids2
#' @examples
#' head(od_data_centroids2)
NULL
#' Workplace zone (destination) centroids
#'
#' This dataset represents geographic centroids of Output Areas in Leeds, UK.
#'
#' @note The schema data can be (re-)generated using code in the
#' `data-raw` directory.
#'
#' @docType data
#' @keywords datasets
#' @name od_data_destinations
#' @examples
#' nrow(od_data_destinations)
#' head(od_data_destinations)
NULL
#' Small zones dataset
#'
#' This dataset represents geographic zones of Lower Super Output Areas in Leeds, UK.
#' They fit completely within the `od_data_zones_min` dataset.
#'
#' @note The schema data can be (re-)generated using code in the
#' `data-raw` directory.
#'
#' @docType data
#' @keywords datasets
#' @name od_data_zones_small
#' @examples
#' nrow(od_data_zones_small)
#' head(od_data_zones_small)
#' plot(od_data_zones_small$geometry)
#' plot(od_data_zones_min$geometry, lwd = 3, col = NULL, add = TRUE)
NULL
#' Simple buildings dataset
#'
#' Building data from OSM for testing od_disaggregate.
#'
#' @docType data
#' @keywords datasets
#' @name od_data_buildings
#' @examples
#' nrow(od_data_buildings)
#' head(od_data_buildings)
#' plot(od_data_buildings$geometry)
#' plot(od_data_zones_min$geometry, lwd = 3, col = NULL, add = TRUE)
NULL
#' Simple road network dataset
#'
#' Road network data from OSM for testing od_disaggregate.
#'
#' @docType data
#' @keywords datasets
#' @name od_road_network
#' @examples
#' library(sf)
#' nrow(od_road_network)
#' head(od_road_network)
#' plot(od_road_network$geometry)
#' plot(od_data_zones_min$geometry, lwd = 3, col = NULL, add = TRUE)
NULL