Revision a19ff1c55edca3d01e2c66898a67f077c4269f8f authored by Jakub Nowosad on 15 November 2022, 18:30:06 UTC, committed by cran-robot on 15 November 2022, 18:30:06 UTC
1 parent ac4f6ab
cycle_hire_osm.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cycle_hire_osm.R
\docType{data}
\name{cycle_hire_osm}
\alias{cycle_hire_osm}
\title{Cycle hire points in London from OSM}
\format{
\itemize{
\item{osm_id} {The OSM ID}
\item{name} {The name of the cycle point}
\item{capacity} {How many bikes it can take}
\item{cyclestreets_id} {The ID linked to cyclestreets' photomap}
\item{description} {Additional description of points}
\item{geometry} {sfc_POINT}
}
}
\source{
\url{https://www.openstreetmap.org}
}
\usage{
cycle_hire_osm
}
\description{
Dataset downloaded using the osmdata package
representing cycle hire points accross London.
}
\examples{
if (requireNamespace("sf", quietly = TRUE)) {
library(sf)
data(cycle_hire_osm)
# or
cycle_hire_osm <- st_read(system.file("shapes/cycle_hire_osm.geojson", package="spData"))
plot(cycle_hire_osm)
}
# Code used to download the data:
\dontrun{
library(osmdata)
library(dplyr)
library(sf)
q = add_osm_feature(opq = opq("London"), key = "network", value = "tfl_cycle_hire")
lnd_cycle_hire = osmdata_sf(q)
cycle_hire_osm = lnd_cycle_hire$osm_points
nrow(cycle_hire_osm)
plot(cycle_hire_osm)
cycle_hire_osm = dplyr::select(cycle_hire_osm, osm_id, name, capacity,
cyclestreets_id, description) \%>\%
mutate(capacity = as.numeric(capacity))
names(cycle_hire_osm)
nrow(cycle_hire_osm)
}
}
\seealso{
See the osmdata package: https://cran.r-project.org/package=osmdata
}
\keyword{datasets}
\keyword{sf}
Computing file changes ...