-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
67 lines (46 loc) · 1.88 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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
options(warn=-1)
```
# tidygeoRSS 🌎 🌍 🌏
![R-CMD-check](https://github.com/RobertMyles/tidygeoRSS/workflows/R-CMD-check/badge.svg)
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/tidygeoRSS)](https://cran.r-project.org/package=tidygeoRSS)
The idea of tidygeoRSS is to parse 'geo' feeds -- RSS, Atom and JSON -- and return them as tibbles complete with the geographical information in a way that is compatible with the [sf](https://r-spatial.github.io/sf/articles/sf1.html) library.
For more information on these formats, see:
- geoRSS & geoAtom: [http://www.georss.org/](http://www.georss.org/)
- geoJSON: [https://geojson.org/](https://geojson.org/)
## Installation
You can install the released version of tidygeoRSS from [CRAN](https://CRAN.R-project.org) with:
``` {r eval = FALSE}
install.packages("tidygeoRSS")
```
And the development version from [GitHub](https://github.com/RobertMyles/tidygeoRSS) with:
```{r eval = FALSE}
# install.packages("remotes")
remotes::install_github("RobertMyles/tidygeoRSS")
```
### Installing sf
tidygeoRSS relies on sf, which also relies on some system dependencies, so you will most likely have to install certain things before using tidygeoRSS. More information is available [here](https://r-spatial.github.io/sf/index.html#installing).
## Usage
### geoJSON example
```{r}
library(tidygeoRSS)
tidygeo("https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_day.geojson")
```
### geo-Atom example
```{r}
tidygeo("https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_hour.atom")
```
### geoRSS example
```{r}
tidygeo("http://www.geograph.org.uk/syndicator.php?format=GeoRSS")
```