This repository has been archived by the owner on Jan 13, 2022. It is now read-only.
/
README.Rmd
71 lines (47 loc) · 2.03 KB
/
README.Rmd
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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# bigosm
[![Travis build status](https://travis-ci.org/cmu-lib/bigosm.svg?branch=master)](https://travis-ci.org/cmu-lib/bigosm)
[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/cmu-lib/bigosm?branch=master&svg=true)](https://ci.appveyor.com/project/cmu-lib/bigosm)
[![Coverage status](https://codecov.io/gh/cmu-lib/bigosm/branch/master/graph/badge.svg)](https://codecov.io/github/c/bigosm?branch=master)
bigosm reads in particularly large OSM XML exports (>400MB) that cause [osmar]'s XML reader to choke.
## Installation
You can install the development version of bigosm from GitHub with:
```{r, eval = FALSE}
# install.packages("devtools")
install_github("cmu-lib/bigosm")
```
## Usage
`read_big_osm` does what it says on the label. By specifying required keys for both [Ways] and [Relations] you can pre-filter the XML that ends up getting pulled into R.
```{r, include = FALSE}
library(bigosm)
library(osmar)
```
```{r}
boston_xml <- system.file("extdata/boston.xml.zip", package = "bigosm")
boston_osm <- read_big_osm(file = boston_xml, way_keys = "highway")
summary(boston_osm)
```
[osmar]: https://cran.r-project.org/package=osmar
[Ways]: https://wiki.openstreetmap.org/wiki/Way
[Relations]: https://wiki.openstreetmap.org/wiki/Relation
## Context
This package is one of several originally developed by [Matthew Lincoln](https://github.com/mdlincoln) for use by Carnegie Mellon University's ["Bridges of Pittsburgh"](http://bridgesofpittsburgh.net/) project:
- [konigsberger] (end-user package)
- [pathfinder]
- [bigosm]
- [simplygraph]
[konigsberger]: https://cmu-lib.github.io/konigsbergr/index.html
[pathfinder]: https://github.com/cmu-lib/pathfinder/
[simplygraph]: https://github.com/cmu-lib/simplygraph
[bigosm]: https://github.com/cmu-lib/bigosm