{"id":16472940,"url":"https://github.com/elipousson/bcpss","last_synced_at":"2025-07-13T08:08:49.013Z","repository":{"id":83966625,"uuid":"338443606","full_name":"elipousson/bcpss","owner":"elipousson","description":"R package to access data for Baltimore City Public School System (BCPSS)","archived":false,"fork":false,"pushed_at":"2025-07-03T22:24:30.000Z","size":22135,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-03T23:26:09.962Z","etag":null,"topics":["baltimore","r","r-package"],"latest_commit_sha":null,"homepage":"https://elipousson.github.io/bcpss/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elipousson.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":"codemeta.json","zenodo":null}},"created_at":"2021-02-12T22:03:43.000Z","updated_at":"2025-07-03T22:20:10.000Z","dependencies_parsed_at":"2024-11-12T05:47:30.429Z","dependency_job_id":null,"html_url":"https://github.com/elipousson/bcpss","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/elipousson/bcpss","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elipousson%2Fbcpss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elipousson%2Fbcpss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elipousson%2Fbcpss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elipousson%2Fbcpss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elipousson","download_url":"https://codeload.github.com/elipousson/bcpss/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elipousson%2Fbcpss/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265108514,"owners_count":23712466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["baltimore","r","r-package"],"created_at":"2024-10-11T12:19:05.108Z","updated_at":"2025-07-13T08:08:48.992Z","avatar_url":"https://github.com/elipousson.png","language":"R","readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"90%\"\n)\n```\n\n# bcpss\n\n\u003c!-- badges: start --\u003e\n\n[![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)\n\n\u003c!-- badges: end --\u003e\n\nThe 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.\n\n## Installation\n\nYou can install the development version from [GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"remotes\")\nremotes::install_github(\"elipousson/bcpss\")\n```\n\n## Example\n\n```{r setup}\nlibrary(bcpss)\nlibrary(tidyverse)\ntheme_set(theme_minimal())\n```\n\nCurrently, 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?\n\n```{r enrollment_demographics}\ntop_5_es \u003c- enrollment_demographics_SY1920 |\u003e\n  filter(\n    grade_range == \"All Grades\",\n    grade_band == \"E\"\n  ) |\u003e\n  select(school_number, school_name, total_enrollment) |\u003e\n  top_n(5, total_enrollment) |\u003e\n  arrange(desc(total_enrollment))\n\ntop_5_es_caption \u003c- \"Five largest BCPSS elementary schools by total enrollment\"\n\nknitr::kable(top_5_es, caption = top_5_es_caption)\n```\n\nBoth the enrollment/demographic data and the parent survey are available in both a wide and long format.\n\nThe package also includes spatial data for elementary school attendance zones and program locations for the 2020-2021 school year.\n\n```{r bcps_es_zones}\nbcps_es_zones_SY2021 |\u003e\n  ggplot() +\n  geom_sf(aes(fill = zone_name)) +\n  scale_fill_viridis_d() +\n  guides(fill = \"none\") +\n  labs(title = \"BCPSS Elementary School Attendance Zones\")\n```\n\nThese 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.\n\n```{r top_5_es_map}\ntop_5_es_map \u003c- bcps_programs_SY2021 |\u003e\n  left_join(top_5_es, by = c(\"program_number\" = \"school_number\")) |\u003e\n  filter(!is.na(total_enrollment)) |\u003e\n  ggplot() +\n  geom_sf(data = bcps_es_zones_SY2021, fill = NA, color = \"darkblue\") +\n  geom_sf(aes(color = school_name)) +\n  geom_sf_label(aes(label = program_name_short, fill = school_name), color = \"white\") +\n  scale_fill_viridis_d(end = 0.85) +\n  guides(fill = \"none\", color = \"none\") +\n  labs(title = top_5_es_caption)\n\ntop_5_es_map\n```\n\nThe `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).\n\nUsing the `marylandedu::md_nces_directory` data, you can summarise enrollment by year and grade span:\n\n```{r}\nbaltimore_nces_directory \u003c- marylandedu::md_nces_directory |\u003e\n  select(year, lss_name, school_number, grade_span)\n\nbcpss_enrollment_summary \u003c- bcpss_enrollment |\u003e\n  dplyr::filter(\n    school_number != 0,\n    race == \"All\",\n    grade_range == \"All Grades\"\n  ) |\u003e\n  left_join(\n    baltimore_nces_directory,\n    by = join_by(lss_name, year, school_number)\n  ) |\u003e\n  summarise(\n    n_schools = n_distinct(school_number),\n    enrolled_count_mean = mean(enrolled_count, na.rm = TRUE),\n    enrolled_count_total = sum(enrolled_count, na.rm = TRUE),\n    .by = c(lss_name, year, grade_span)\n  ) |\u003e\n  filter(\n    # Exclude missing and uncommon grade span values\n    !is.na(grade_span),\n    !(grade_span %in% c(\"EMH\", \"MH\"))\n  )\n```\n\nThe summary data can be plottted:\n\n```{r}\n# Create a convenience plotting function\nbcpss_enrollment_summary_plot \u003c- function(data = NULL, mapping = aes(), ...) {\n  ggplot(data = data, mapping = mapping) +\n    geom_point() +\n    geom_line() +\n    labs(\n      x = \"Year\",\n      ...,\n      color = \"Grade span\",\n      caption = paste0(\n        \"Note that schools with \",\n        knitr::combine_words(c(\"missing\", \"EMH\", \"MH\")),\n        \" grade spans are excluded.\\nData: Maryland State Department of Education.\"\n      )\n    ) +\n    scale_y_continuous(labels = scales::label_number()) +\n    scale_color_viridis_d(end = 0.85)\n}\n\nbcpss_enrollment_summary |\u003e\n  bcpss_enrollment_summary_plot(\n    aes(x = year, y = enrolled_count_mean, color = grade_span),\n    y = \"Average enrollment\",\n    title = \"Average Baltimore City public school enrollment by grade span, 2003-2023\"\n  )\n```\n\nNote that this summary is incomplete without the accompanying total enrollment count showing the shift from elementary to elementary middle schools\n\n```{r}\nbcpss_enrollment_summary |\u003e\n  bcpss_enrollment_summary_plot(\n    aes(x = year, y = enrolled_count_total, color = grade_span),\n    y = \"Total enrollment\",\n    title = \"Total Baltimore City public school enrollment by grade span, 2003-2023\"\n  )\n```\n\n## Related projects\n\n### U.S. Education data\n\n-   [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.\n-   [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).\n-   [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.\n-   [Elementary School Operating Status + NCES 2019-2020 School District Boundaries](https://github.com/hrbrmstr/2021-esos-nces)\n\n### Baltimore City data\n\n-   [mapbaltimore](https://elipousson.github.io/mapbaltimore/)\n-   [baltimoredata](https://elipousson.github.io/baltimoredata/)\n-   [mapmaryland](https://elipousson.github.io/mapmaryland/)\n\n### Other local area education data\n\n-   [CPSenrollpack](https://github.com/cymack/CPSenrollpack): \"R package of enrollment data for Chicago Public High Schools, 2006-07 to 2018-19\"\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felipousson%2Fbcpss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felipousson%2Fbcpss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felipousson%2Fbcpss/lists"}