{"id":20645592,"url":"https://github.com/ivelasq/leaidr","last_synced_at":"2025-06-23T19:05:16.630Z","repository":{"id":115672071,"uuid":"260057599","full_name":"ivelasq/leaidr","owner":"ivelasq","description":"An R Package for U.S. School District Shapefiles","archived":false,"fork":false,"pushed_at":"2021-12-24T15:02:51.000Z","size":2774,"stargazers_count":18,"open_issues_count":7,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-16T02:49:04.070Z","etag":null,"topics":["ggplot2","k12","k12education","leaflet","r","rstats","school-districts","shapefile"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ivelasq.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-29T22:15:40.000Z","updated_at":"2025-02-27T03:07:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"72f4c493-510a-4b0f-ab68-e58a0e68c23c","html_url":"https://github.com/ivelasq/leaidr","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ivelasq/leaidr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivelasq%2Fleaidr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivelasq%2Fleaidr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivelasq%2Fleaidr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivelasq%2Fleaidr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivelasq","download_url":"https://codeload.github.com/ivelasq/leaidr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivelasq%2Fleaidr/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261539318,"owners_count":23174135,"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":["ggplot2","k12","k12education","leaflet","r","rstats","school-districts","shapefile"],"created_at":"2024-11-16T16:20:36.365Z","updated_at":"2025-06-23T19:05:16.577Z","avatar_url":"https://github.com/ivelasq.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"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 = \"100%\"\n)\n```\n\n# leaidr \u003cimg src='man/figures/logo.png' align=\"right\" height=\"150\" /\u003e\n\n\u003c!-- badges: start --\u003e\n\u003c!-- badges: end --\u003e\n\nThe goal of leaidr is to provide an easy way to map U.S. school districts in R.\n\n## Installation\n\nYou can install the development version of this package from [GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"ivelasq/leaidr\")\n```\n\n## About\n\nSchool districts in the U.S. have associated local education agency identification numbers (LEAID) used in the [National Center for Education Statistics (NCES)](https://nces.ed.gov/) Common Core of Data. These are very useful because if you have other datasets with NCES ID’s, then you can (sometimes easily) join them.\n\nThe original shapefiles can be found on the [NCES](https://nces.ed.gov/programs/edge/Geographic/DistrictBoundaries) site. These files are from 2019. All the state-level shapefiles are saved [here](https://github.com/datalorax/us-district-shapefiles/tree/master/individ-districts).\n\n## Get the U.S. Shapefile\n\nLoad the shapefile for the entire U.S. using `lea_get()` and the state abbreviation. Loading may take a while. You will have to load the shapefile anytime you're in a new directory/project.\n\nIf you use `lea_get()` (i.e., with `state = NULL`), you get all the district shapefiles for the whole U.S. via ROpenSci's {piggyback}.\n\n**You must have a GITHUB_PAT before you can run `lea_get()`.** You can set a token in your [developer settings](https://github.com/settings/tokens) and save it in your R Environment. More info can be found in [Happy git with R](https://happygitwithr.com/github-pat.html).\n\n## Use the Data\n\nOnce you have the shapefile, you can plot using packages like {leaflet} and {ggplot2}.\n\n### {ggplot2} Example\n\n```{r, message = FALSE, dpi = 300}\nlibrary(leaidr)\n\ntn \u003c- lea_get(\"tn\")\n\ntn %\u003e% \n  sf::st_as_sf() %\u003e% \n  ggplot2::ggplot() +\n  ggplot2::geom_sf()\n```\n\n### Mapbox example\n\n\n\n## Acknowlegements\n\nMany thanks to [datalorax](https://github.com/datalorax) for the incredible improvements to this package.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivelasq%2Fleaidr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivelasq%2Fleaidr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivelasq%2Fleaidr/lists"}