-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
70 lines (47 loc) · 2.38 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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
# cincy <img src="man/figures/logo.svg" align="right" height="200" />
<!-- badges: start -->
[](https://github.com/geomarker-io/cincy/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->
The `cincy` package contains simple feature geographic polygon files (`sf` objects) that define Cincinnati Neighborhood, Tract, County, and ZIP Code Geographies.
#### Installing
```{r, eval = FALSE}
# install.packages("remotes")
remotes::install_github("geomarker-io/cincy")
```
#### Data
Data objects are `data.frame`s of class `sf` and are named by geography, source, and optionally vintage:
```{r, echo = FALSE, warning = FALSE}
options(knitr.kable.NA = "")
data(package = "cincy")$results[, "Item"] |>
tibble::as_tibble() |>
dplyr::rename(name = value) |>
tidyr::separate(name, into = c("geography", "source", "vintage"), remove = FALSE) |>
dplyr::filter(! name == "dep_index") |>
dplyr::arrange(rev(name), vintage) |>
dplyr::mutate(name = paste0("`", name, "`")) |>
knitr::kable(align = c("lccc")) |>
suppressWarnings()
```
Use autocomplete functionality at the `R` prompt (e.g., typing `cincy::` and pressing `TAB` twice) to find the needed `sf` object, narrowing first based on geography (`tract`, `zcta`, `neigh`, `county`), then by source, and then optionally by vintage.
Consult the help file for any object for more information on the data within it:
```{r, eval = FALSE}
?cincy::neigh_ccc
```
Or explore the data documentation online at [https://geomarker.io/cincy/reference](https://geomarker.io/cincy/reference)
#### Examples
Data are returned as [simple features](https://r-spatial.org/sf) objects. For example, to get Cincinnati neighborhoods, as defined by the most recent version of community council boundaries from CAGIS:
```{r}
cincy::neigh_ccc
```
Or to get Cincinnati ZIP Codes, as defined by the Census Bureau as ZIP Code Tabulation Areas (ZCTAs), from 2000:
```{r}
cincy::zcta_tigris_2000
```
Alternatively, get the 2010 Counties in Cincinnati's 7-county catchment area:
```{r}
cincy::county_7cc_2010
```