This repository was archived by the owner on May 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREaDME.Rmd
More file actions
90 lines (68 loc) · 2.74 KB
/
REaDME.Rmd
File metadata and controls
90 lines (68 loc) · 2.74 KB
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
---
title: "README"
output: github_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Survey of JSON Affiliated R Packages
Need a package to help parse or explore the organization of keys within JSON that might be messy, complex, large, or **unknown**
### Conversion/Processing
- [jsonlite](https://www.opencpu.org/posts/jsonlite-a-smarter-json-encoder)
- [tidyjson](https://github.com/sailthru/tidyjson)
- [rjson](https://mran.microsoft.com/web/packages/rjson/rjson.pdf)
- [rjsonio](https://mran.microsoft.com/web/packages/RJSONIO/RJSONIO.pdf)
- [df2json](http://github.com/nachocab/df2json)
- [jqr](https://github.com/ropensci/jqr)
- [ndjson](http://gitlab.com/hrbrmstr/ndjson)
### API Consumer
- [rjsonapi]( https://github.com/ropensci/rjsonapi)
### Schema Validation
- [ajv](https://github.com/jdthorpe/ajvr)
- [geojsonlint](https://github.com/ropenscilabs/geojsonlint)
- [jsonvalidate](https://github.com/ropenscilabs/jsonvalidate)
- [validatejsonr](https://mran.microsoft.com/web/packages/validatejsonr/validatejsonr.pdf)
### Configuration Files
- [configr](https://github.com/Miachol/configr)
### GeoJSON
- [geojson](https://github.com/ropensci/geojson)
- [geojsonio](https://github.com/ropensci/geojsonio)
- [geojsonlint](https://github.com/ropenscilabs/geojsonlint)
- [geojsonR](https://github.com/mlampros/geojsonR)
- [randgeo](https://github.com/ropensci/randgeo)
- [rmapshaper](https://github.com/ateucher/rmapshaper)
- [wellknown](https://github.com/ropensci/wellknown)
### Mapping
- [leaflet](http://rstudio.github.io/leaflet/)
- [leafletCN](https://mran.microsoft.com/web/packages/leafletCN/leafletCN.pdf)
### Helpers
- [listviewer (htmlwidget for interactive views of R lists)](https://github.com/timelyportfolio/listviewer)
### Other
- [jsonId (linking data)](https://github.com/ropensci/jsonld#readme)
- [repijson (epidemiology data)](https://mran.microsoft.com/web/packages/repijson/repijson.pdf)
- [rjstat (JSON-stat data)](https://github.com/ajschumacher/rjstat)
- [rtson (typed JSON)](https://github.com/tercen/TSON)
# package JSOmetaN
- provides high level meta data for JSON
- useful if you're not sure what the object structure is
- uses two functions: fetch and dig
- iteratively give information about nested key value relationships
### fetch
provides meta information: \
- key names \
- number of documents with those keys \
- whether the key is terminal or contains further nested structure

### dig
subsets the data by a specific keyname, dropping down a level in organization

---
```{r include=FALSE}
library(jsonlite)
library(JSOmetaN)
library(dplyr)
```
```{r}
data1 <- fromJSON("https://api.github.com/users/hadley/repos")
data1 %>% fetch() %>% dig("owner") %>% fetch()
```