bcpss

R package to access data for Baltimore City Public School System (BCPSS)

https://github.com/elipousson/bcpss

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.5%) to scientific vocabulary

Keywords

baltimore r r-package
Last synced: 8 months ago · JSON representation ·

Repository

R package to access data for Baltimore City Public School System (BCPSS)

Basic Info
Statistics
  • Stars: 3
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
baltimore r r-package
Created about 5 years ago · Last pushed 10 months ago
Metadata Files
Readme Changelog License Citation Codemeta

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "90%"
)
```

# bcpss



[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Project Status: Active -- The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)



The goal of bcpss is to make data from the Baltimore City Public School system more consistent and accessible to R users. This package may pair well with the [mapbaltimore package](https://github.com/elipousson/mapbaltimore) that offers a broader range of Baltimore-specific datasets and functions for working with that data.

## Installation

You can install the development version from [GitHub](https://github.com/) with:

``` r
# install.packages("remotes")
remotes::install_github("elipousson/bcpss")
```

## Example

```{r setup}
library(bcpss)
library(tidyverse)
theme_set(theme_minimal())
```

Currently, this package includes datasets that include school and grade-level enrollment and demographic data, the published results from a parent survey, and the published results from a combined student and educator survey completed in 2019. This data can be used to answer questions, such as, what are the elementary schools with the greatest total student enrollment?

```{r enrollment_demographics}
top_5_es <- enrollment_demographics_SY1920 |>
  filter(
    grade_range == "All Grades",
    grade_band == "E"
  ) |>
  select(school_number, school_name, total_enrollment) |>
  top_n(5, total_enrollment) |>
  arrange(desc(total_enrollment))

top_5_es_caption <- "Five largest BCPSS elementary schools by total enrollment"

knitr::kable(top_5_es, caption = top_5_es_caption)
```

Both the enrollment/demographic data and the parent survey are available in both a wide and long format.

The package also includes spatial data for elementary school attendance zones and program locations for the 2020-2021 school year.

```{r bcps_es_zones}
bcps_es_zones_SY2021 |>
  ggplot() +
  geom_sf(aes(fill = zone_name)) +
  scale_fill_viridis_d() +
  guides(fill = "none") +
  labs(title = "BCPSS Elementary School Attendance Zones")
```

These two sources can be used in combinations by joining the `program_number` in the spatial data with the equivalent `school_number` used in the survey and demographic data.

```{r top_5_es_map}
top_5_es_map <- bcps_programs_SY2021 |>
  left_join(top_5_es, by = c("program_number" = "school_number")) |>
  filter(!is.na(total_enrollment)) |>
  ggplot() +
  geom_sf(data = bcps_es_zones_SY2021, fill = NA, color = "darkblue") +
  geom_sf(aes(color = school_name)) +
  geom_sf_label(aes(label = program_name_short, fill = school_name), color = "white") +
  scale_fill_viridis_d(end = 0.85) +
  guides(fill = "none", color = "none") +
  labs(title = top_5_es_caption)

top_5_es_map
```

The `bcpss_enrollment` data is a subset of the statewide data available through the `{marylandedu}` package (a tidied version of data downloads available from the Maryland State Department of Education).

Using the `marylandedu::md_nces_directory` data, you can summarise enrollment by year and grade span:

```{r}
baltimore_nces_directory <- marylandedu::md_nces_directory |>
  select(year, lss_name, school_number, grade_span)

bcpss_enrollment_summary <- bcpss_enrollment |>
  dplyr::filter(
    school_number != 0,
    race == "All",
    grade_range == "All Grades"
  ) |>
  left_join(
    baltimore_nces_directory,
    by = join_by(lss_name, year, school_number)
  ) |>
  summarise(
    n_schools = n_distinct(school_number),
    enrolled_count_mean = mean(enrolled_count, na.rm = TRUE),
    enrolled_count_total = sum(enrolled_count, na.rm = TRUE),
    .by = c(lss_name, year, grade_span)
  ) |>
  filter(
    # Exclude missing and uncommon grade span values
    !is.na(grade_span),
    !(grade_span %in% c("EMH", "MH"))
  )
```

The summary data can be plottted:

```{r}
# Create a convenience plotting function
bcpss_enrollment_summary_plot <- function(data = NULL, mapping = aes(), ...) {
  ggplot(data = data, mapping = mapping) +
    geom_point() +
    geom_line() +
    labs(
      x = "Year",
      ...,
      color = "Grade span",
      caption = paste0(
        "Note that schools with ",
        knitr::combine_words(c("missing", "EMH", "MH")),
        " grade spans are excluded.\nData: Maryland State Department of Education."
      )
    ) +
    scale_y_continuous(labels = scales::label_number()) +
    scale_color_viridis_d(end = 0.85)
}

bcpss_enrollment_summary |>
  bcpss_enrollment_summary_plot(
    aes(x = year, y = enrolled_count_mean, color = grade_span),
    y = "Average enrollment",
    title = "Average Baltimore City public school enrollment by grade span, 2003-2023"
  )
```

Note that this summary is incomplete without the accompanying total enrollment count showing the shift from elementary to elementary middle schools

```{r}
bcpss_enrollment_summary |>
  bcpss_enrollment_summary_plot(
    aes(x = year, y = enrolled_count_total, color = grade_span),
    y = "Total enrollment",
    title = "Total Baltimore City public school enrollment by grade span, 2003-2023"
  )
```

## Related projects

### U.S. Education data

-   [educationdata](https://github.com/UrbanInstitute/education-data-package-r): Retrieve data from the Urban Institute\'s [Education Data API](https://educationdata.urban.org/) as a `data.frame` for easy analysis.
-   [EdSurvey](https://www.air.org/project/nces-data-r-project-edsurvey): EdSurvey is an R statistical package designed for the analysis of national and international education data from the National Center for Education Statistics (NCES).
-   [edbuildr](https://github.com/EdBuild/edbuildr): Import EdBuild's master dataset of school district finance, student demographics, and community economic indicators for every school district in the United States.
-   [Elementary School Operating Status + NCES 2019-2020 School District Boundaries](https://github.com/hrbrmstr/2021-esos-nces)

### Baltimore City data

-   [mapbaltimore](https://elipousson.github.io/mapbaltimore/)
-   [baltimoredata](https://elipousson.github.io/baltimoredata/)
-   [mapmaryland](https://elipousson.github.io/mapmaryland/)

### Other local area education data

-   [CPSenrollpack](https://github.com/cymack/CPSenrollpack): "R package of enrollment data for Chicago Public High Schools, 2006-07 to 2018-19"

Owner

  • Name: Eli Pousson
  • Login: elipousson
  • Kind: user
  • Location: Baltimore, MD
  • Company: Baltimore City Department of Planning

I love old buildings and bicycles. Planner with the Baltimore City Department of Planning. Former preservationist @baltimoreheritage

Citation (CITATION.cff)

# -----------------------------------------------------------
# CITATION file created with {cffr} R package, v0.4.1
# See also: https://docs.ropensci.org/cffr/
# -----------------------------------------------------------
 
cff-version: 1.2.0
message: 'To cite package "bcpss" in publications use:'
type: software
license: CC0-1.0
title: 'bcpss: Baltimore City Public Schools'
version: 0.1.0.9001
abstract: Provides access to demographic, enrollment, and survey data on Baltimore
  City Public School System (BCPSS).
authors:
- family-names: Pousson
  given-names: Eli
  email: eli.pousson@gmail.com
  orcid: https://orcid.org/0000-0001-8280-1706
repository-code: https://github.com/elipousson/bcpss
url: https://elipousson.github.io/bcpss/
contact:
- family-names: Pousson
  given-names: Eli
  email: eli.pousson@gmail.com
  orcid: https://orcid.org/0000-0001-8280-1706
keywords:
- baltimore
- r
- r-package
references:
- type: software
  title: 'R: A Language and Environment for Statistical Computing'
  notes: Depends
  url: https://www.R-project.org/
  authors:
  - name: R Core Team
  location:
    name: Vienna, Austria
  year: '2023'
  institution:
    name: R Foundation for Statistical Computing
  version: '>= 2.10'
- type: software
  title: glue
  abstract: 'glue: Interpreted String Literals'
  notes: Imports
  url: https://glue.tidyverse.org/
  repository: https://CRAN.R-project.org/package=glue
  authors:
  - family-names: Hester
    given-names: Jim
    orcid: https://orcid.org/0000-0002-2739-7082
  - family-names: Bryan
    given-names: Jennifer
    email: jenny@rstudio.com
    orcid: https://orcid.org/0000-0002-6983-2759
  year: '2023'
- type: software
  title: rlang
  abstract: 'rlang: Functions for Base Types and Core R and ''Tidyverse'' Features'
  notes: Imports
  url: https://rlang.r-lib.org
  repository: https://CRAN.R-project.org/package=rlang
  authors:
  - family-names: Henry
    given-names: Lionel
    email: lionel@posit.co
  - family-names: Wickham
    given-names: Hadley
    email: hadley@posit.co
  year: '2023'
- type: software
  title: dplyr
  abstract: 'dplyr: A Grammar of Data Manipulation'
  notes: Suggests
  url: https://dplyr.tidyverse.org
  repository: https://CRAN.R-project.org/package=dplyr
  authors:
  - family-names: Wickham
    given-names: Hadley
    email: hadley@posit.co
    orcid: https://orcid.org/0000-0003-4757-117X
  - family-names: François
    given-names: Romain
    orcid: https://orcid.org/0000-0002-2444-4226
  - family-names: Henry
    given-names: Lionel
  - family-names: Müller
    given-names: Kirill
    orcid: https://orcid.org/0000-0002-1416-3412
  - family-names: Vaughan
    given-names: Davis
    email: davis@posit.co
    orcid: https://orcid.org/0000-0003-4777-038X
  year: '2023'
- type: software
  title: ggplot2
  abstract: 'ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics'
  notes: Suggests
  url: https://ggplot2.tidyverse.org
  repository: https://CRAN.R-project.org/package=ggplot2
  authors:
  - family-names: Wickham
    given-names: Hadley
    email: hadley@posit.co
    orcid: https://orcid.org/0000-0003-4757-117X
  - family-names: Chang
    given-names: Winston
    orcid: https://orcid.org/0000-0002-1576-2126
  - family-names: Henry
    given-names: Lionel
  - family-names: Pedersen
    given-names: Thomas Lin
    email: thomas.pedersen@posit.co
    orcid: https://orcid.org/0000-0002-5147-4711
  - family-names: Takahashi
    given-names: Kohske
  - family-names: Wilke
    given-names: Claus
    orcid: https://orcid.org/0000-0002-7470-9261
  - family-names: Woo
    given-names: Kara
    orcid: https://orcid.org/0000-0002-5125-4188
  - family-names: Yutani
    given-names: Hiroaki
    orcid: https://orcid.org/0000-0002-3385-7233
  - family-names: Dunnington
    given-names: Dewey
    orcid: https://orcid.org/0000-0002-9415-4582
  year: '2023'
- type: software
  title: knitr
  abstract: 'knitr: A General-Purpose Package for Dynamic Report Generation in R'
  notes: Suggests
  url: https://yihui.org/knitr/
  repository: https://CRAN.R-project.org/package=knitr
  authors:
  - family-names: Xie
    given-names: Yihui
    email: xie@yihui.name
    orcid: https://orcid.org/0000-0003-0645-5666
  year: '2023'
- type: software
  title: rmarkdown
  abstract: 'rmarkdown: Dynamic Documents for R'
  notes: Suggests
  url: https://pkgs.rstudio.com/rmarkdown/
  repository: https://CRAN.R-project.org/package=rmarkdown
  authors:
  - family-names: Allaire
    given-names: JJ
    email: jj@posit.co
  - family-names: Xie
    given-names: Yihui
    email: xie@yihui.name
    orcid: https://orcid.org/0000-0003-0645-5666
  - family-names: Dervieux
    given-names: Christophe
    email: cderv@posit.co
    orcid: https://orcid.org/0000-0003-4474-2498
  - family-names: McPherson
    given-names: Jonathan
    email: jonathan@posit.co
  - family-names: Luraschi
    given-names: Javier
  - family-names: Ushey
    given-names: Kevin
    email: kevin@posit.co
  - family-names: Atkins
    given-names: Aron
    email: aron@posit.co
  - family-names: Wickham
    given-names: Hadley
    email: hadley@posit.co
  - family-names: Cheng
    given-names: Joe
    email: joe@posit.co
  - family-names: Chang
    given-names: Winston
    email: winston@posit.co
  - family-names: Iannone
    given-names: Richard
    email: rich@posit.co
    orcid: https://orcid.org/0000-0003-3925-190X
  year: '2023'
- type: software
  title: sf
  abstract: 'sf: Simple Features for R'
  notes: Suggests
  url: https://r-spatial.github.io/sf/
  repository: https://CRAN.R-project.org/package=sf
  authors:
  - family-names: Pebesma
    given-names: Edzer
    email: edzer.pebesma@uni-muenster.de
    orcid: https://orcid.org/0000-0001-8049-7069
  year: '2023'
- type: software
  title: tidyr
  abstract: 'tidyr: Tidy Messy Data'
  notes: Suggests
  url: https://tidyr.tidyverse.org
  repository: https://CRAN.R-project.org/package=tidyr
  authors:
  - family-names: Wickham
    given-names: Hadley
    email: hadley@posit.co
  - family-names: Vaughan
    given-names: Davis
    email: davis@posit.co
  - family-names: Girlich
    given-names: Maximilian
  year: '2023'

CodeMeta (codemeta.json)

{
  "@context": "https://doi.org/10.5063/schema/codemeta-2.0",
  "@type": "SoftwareSourceCode",
  "identifier": "bcpss",
  "description": "Provides access to demographic, enrollment, and survey data on Baltimore City Public School System (BCPSS).",
  "name": "bcpss: Baltimore City Public Schools",
  "relatedLink": "https://elipousson.github.io/bcpss/",
  "codeRepository": "https://github.com/elipousson/bcpss",
  "issueTracker": "https://github.com/elipousson/bcpss/issues",
  "license": "https://spdx.org/licenses/CC0-1.0",
  "version": "0.1.0.9001",
  "programmingLanguage": {
    "@type": "ComputerLanguage",
    "name": "R",
    "url": "https://r-project.org"
  },
  "runtimePlatform": "R version 4.2.3 (2023-03-15)",
  "author": [
    {
      "@type": "Person",
      "givenName": "Eli",
      "familyName": "Pousson",
      "email": "eli.pousson@gmail.com",
      "@id": "https://orcid.org/0000-0001-8280-1706"
    }
  ],
  "maintainer": [
    {
      "@type": "Person",
      "givenName": "Eli",
      "familyName": "Pousson",
      "email": "eli.pousson@gmail.com",
      "@id": "https://orcid.org/0000-0001-8280-1706"
    }
  ],
  "softwareSuggestions": [
    {
      "@type": "SoftwareApplication",
      "identifier": "dplyr",
      "name": "dplyr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=dplyr"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "ggplot2",
      "name": "ggplot2",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=ggplot2"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "knitr",
      "name": "knitr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=knitr"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "rmarkdown",
      "name": "rmarkdown",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=rmarkdown"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "sf",
      "name": "sf",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=sf"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "tidyr",
      "name": "tidyr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=tidyr"
    }
  ],
  "softwareRequirements": {
    "1": {
      "@type": "SoftwareApplication",
      "identifier": "R",
      "name": "R",
      "version": ">= 2.10"
    },
    "2": {
      "@type": "SoftwareApplication",
      "identifier": "glue",
      "name": "glue",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=glue"
    },
    "3": {
      "@type": "SoftwareApplication",
      "identifier": "rlang",
      "name": "rlang",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=rlang"
    },
    "SystemRequirements": null
  },
  "fileSize": "4372.067KB",
  "releaseNotes": "https://github.com/elipousson/bcpss/blob/master/NEWS.md",
  "readme": "https://github.com/elipousson/bcpss/blob/master/README.md",
  "developmentStatus": [
    "https://lifecycle.r-lib.org/articles/stages.html#stable",
    "https://www.repostatus.org/#active"
  ],
  "keywords": [
    "r",
    "r-package",
    "baltimore"
  ]
}

GitHub Events

Total
  • Push event: 2
Last Year
  • Push event: 2

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 82
  • Total Committers: 1
  • Avg Commits per committer: 82.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 3
  • Committers: 1
  • Avg Commits per committer: 3.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Eli Pousson e****n@g****m 82

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Dependencies

.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.4.1 composite
  • actions/checkout v3 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION cran
  • R >= 2.10 depends
  • glue * imports
  • rlang * imports
  • dplyr * suggests
  • ggplot2 * suggests
  • knitr * suggests
  • rmarkdown * suggests
  • sf * suggests
  • tidyr * suggests