Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elipousson/baltimoredata
📄 R package with assorted data on Baltimore city, MD
https://github.com/elipousson/baltimoredata
baltimore r r-package
Last synced: 27 days ago
JSON representation
📄 R package with assorted data on Baltimore city, MD
- Host: GitHub
- URL: https://github.com/elipousson/baltimoredata
- Owner: elipousson
- License: cc0-1.0
- Created: 2021-02-28T05:13:52.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-04-26T02:40:11.000Z (7 months ago)
- Last Synced: 2024-04-27T02:38:56.560Z (6 months ago)
- Topics: baltimore, r, r-package
- Language: R
- Homepage: https://elipousson.github.io/baltimoredata/
- Size: 5.46 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE.md
Awesome Lists containing this project
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```# baltimoredata
The goal of baltimoredata is to make data related to Baltimore City, Maryland more accessible and consistent for R users. The package is designed to work well with the [mapbaltimore](https://elipousson.github.io/mapbaltimore/) and [bcpss](https://elipousson.github.io/bcpss/) packages that I am also developing.
Currently, this package only includes two data sets: the Baltimore Neighborhood Indicators Alliance (BNIA) Vital Signs data between 2010 and 2018 and the definitions for the variables included in the Vital Signs data.
## Installation
You can install baltimoredata with the remotes package:
``` r
remotes::install_github("elipousson/baltimoredata")
```## Example
```{r example}
library(baltimoredata)
library(dplyr)
library(ggplot2)
```The BNIA Vital Signs data is useful for making comparisons between different areas of the city, between multiple years, and multiple related variables. For example, see the beeswarm plot below comparing the BNIA affordability indices for rent and mortgage:
```{r vital_signs}
vital_signs_2010_2018 %>%
filter(indicator %in% c("affordability_index_mortgage", "affordability_index_rent"),
year == 2015) %>%
ggplot(aes(x = label, y = value, color = value)) +
ggbeeswarm::geom_quasirandom(alpha = 0.5, size = 3) +
coord_flip() +
theme_minimal() +
scale_color_viridis_c(guide = FALSE) +
labs(title = "Rent and mortgage affordability indices, 2015",
x = "",
y = "Value",
caption = "Data courtesy Baltimore Neighborhood Indicators Alliance Vital Signs, 2015")```
Note that all BNIA Vital Signs Indicators are available for all years. The `vital_signs_indicators` provides labels, definitions, and the years available for all BNIA Vital Signs.
```{r indicators}
glimpse(vital_signs_indicators)
```