Giter Site home page Giter Site logo

elipousson / baltimoredata Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 6.52 MB

📄 R package with assorted data on Baltimore city, MD

Home Page: https://elipousson.github.io/baltimoredata/

License: Creative Commons Zero v1.0 Universal

R 100.00%
r r-package baltimore

baltimoredata's Introduction

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 and 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:

remotes::install_github("elipousson/baltimoredata")

Example

library(baltimoredata)
library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union
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:

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.

glimpse(vital_signs_indicators)
#> Rows: 177
#> Columns: 7
#> $ label                <chr> "Total Population", "Total Male Population", "Tot…
#> $ section              <chr> "Census Demographics", "Census Demographics", "Ce…
#> $ source               <chr> "U.S. Census Bureau", "U.S. Census Bureau", "U.S.…
#> $ normalization_source <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
#> $ definition           <chr> "The total number of persons of all ages that liv…
#> $ indicator            <chr> "total_population", "total_male_population", "tot…
#> $ years_available      <list> [2010, 2010, 2010, <2010, 2016, 2017, 2018>, <20…

baltimoredata's People

Contributors

elipousson avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.