mapbaltimore

πŸ—ΊπŸ™ Map Baltimore neighborhoods and local open data

https://github.com/elipousson/mapbaltimore

Science Score: 26.0%

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

  • β—‹
    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 (21.3%) to scientific vocabulary

Keywords

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

Repository

πŸ—ΊπŸ™ Map Baltimore neighborhoods and local open data

Basic Info
Statistics
  • Stars: 18
  • Watchers: 2
  • Forks: 1
  • Open Issues: 14
  • Releases: 0
Topics
baltimore r r-package rspatial
Created over 5 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License Codemeta

README.Rmd

---
output: github_document
---



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

# mapbaltimore 


[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![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)
[![Codecov test coverage](https://codecov.io/gh/elipousson/mapbaltimore/branch/main/graph/badge.svg)](https://app.codecov.io/gh/elipousson/mapbaltimore?branch=main)


The goal of the mapbaltimore package is to provide an easy way to create maps of Baltimore neighborhoods, Council districts, and other areas using open data on schools, housing, parks, and public transit.

## Installation

You can install this development version (including Suggested packages) from [GitHub](https://github.com/) with:

``` r
# install.packages("pak")
pak::pkg_install("elipousson/mapbaltimore", dependencies = TRUE)
```

## Data and reproducibility

The intent for this package is to always provide the most current version of the included administrative data. If the underlying data is updated on an rolling basis, the corresponding dataset for mapbaltimore will be updated with changes noted in the changelog. If the underlying data is updated less frequently or requires some special review, the older versions may be archived with a year appended to the end of the dataset name.

Package datasets that are currently known to be outdated included:

- `csas`: Multiple attribute names are outdated.
- `neighborhoods`: A new version is now included as `neighborhoods_2020`
- `police_districts`: A new version is now included as `police_districts_2023`

Users are encouraged to flag outdated datasets by opening an issue on [the package repository](https://github.com/elipousson/mapbaltimore).

## Examples

```{r setup}
library(sf)
library(ggplot2)
library(mapbaltimore)

theme_set(theme_void())
```

mapbaltimore is most useful for convenient access to Baltimore spatial data from neighborhoods to streets to parks.

You can download a neighborhood boundary:

```{r}
downtown <- get_baltimore_area(
  type = "neighborhood",
  name = "Downtown"
)

downtown_boundary <- geom_sf(
  data = downtown,
  color = "darkorange",
  fill = NA,
  linewidth = 0.75,
  linetype = "dashed"
)

dplyr::glimpse(downtown)
```

And then use the neighborhood (or another location) to filter data for that area:

```{r}
downtown_streets <- get_area_streets(downtown)

downtown_map <- ggplot() +
  geom_sf(data = downtown_streets, color = "gray70") +
  downtown_boundary
```

The package datasets are typically based on official city or state sources but have been updated to remove outdated information and incorporate related information. For example, the parks data includes alternate names and OpenStreetMap identifiers:

```{r}
downtown_parks <- getdata::get_location_data(downtown, data = parks)
```
zoning data has been labelled and categorized based on the city zoning code:

```{r}
downtown_zoning <- getdata::get_location_data(downtown, data = zoning, dist = 500, unit = "m")

ggplot() +
  geom_sf(data = downtown_zoning, aes(fill = category_zoning), alpha = 0.3) +
  downtown_boundary
```

The package includes a few bundled GeoPackage files with data on trees, vegetated areas, and unimproved properties. It also includes functions for caching even larger datasets with edge of pavement geometry, parcel boundaries, and street centerline data for the Baltimore metro area.

```{r}
downtown_trees <- getdata::get_location_data(downtown, data = "trees", package = "mapbaltimore", dist = 100, unit = "m")

ggplot() +
  geom_sf(data = downtown_trees, color = "darkgreen", alpha = 0.25) +
  downtown_boundary
```

Note, while the code for this package is released under an MIT license, the data is a mix of public domain and [CC0](https://creativecommons.org/publicdomain/zero/1.0/) sources.

## Required packages

mapbaltimore relies on a several other non-CRAN packages that I am actively developing. I split off many of the mapping and data access functions originally created for mapbaltimore into three more general packages that are imported by mapbaltimore:

-   [sfext](https://elipousson.github.io/sfext/)
-   [getdata](https://elipousson.github.io/getdata/)
-   [maplayer](https://elipousson.github.io/maplayer/)

The package uses [my fork of the esri2sf R package](https://github.com/elipousson/esri2sf/) to access city and state FeatureLayers for building permit data, crime data, and 311 service requests and other data sources.

## Related packages
### Baltimore and Maryland data packages

After starting the mapbaltimore package in 2020, I've created two additional data packages:

-   [bcpss](https://elipousson.github.io/bcpss/): Tabular and spatial data from the Baltimore City School system.
-   [mapmaryland](https://elipousson.github.io/mapmaryland/): Statewide spatial data from the U.S. Census Bureau and other sources along with data access functions for working with the Maryland Open Data portal and Maryland iMap service.
-   [baltimorecensus](https://elipousson.github.io/baltimorecensus/): Data downloaded with the tigris package.

### Inspirational packages

The development of mapbaltimore was inspired in part by a handful of other "place-based" R packages for cities:

-   [nycgeo](https://nycgeo.mattherman.info/index.html) for New York City
-   [gateway](https://github.com/slu-openGIS/gateway) for Saint Louis

At the national level, [tigris](https://github.com/walkerke/tigris) provides access to boundary data for all geographies used by the U.S. Census Bureau. mapbaltimore uses tigris to download all of the U.S. Census geographies that are included with the package.

Outside the U.S., there are similar packages that provide access to varied boundary data for Brazil [geobr](https://github.com/ipeaGIT/geobr), Uruguay [geouy](https://github.com/RichDeto/geouy), Chile [chilemapas](https://github.com/pachamaltese/chilemapas) and Mexico [mxmaps](https://github.com/diegovalle/mxmaps).

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

CodeMeta (codemeta.json)

{
  "@context": "https://doi.org/10.5063/schema/codemeta-2.0",
  "@type": "SoftwareSourceCode",
  "identifier": "mapbaltimore",
  "description": "This package provides data from the Baltimore City, the state of Maryland, and other sources, functions to access additional data, and function to create and modify simple maps of Baltimore neighborhoods using sf and ggplot2.",
  "name": "mapbaltimore: Make maps for Baltimore City with open data",
  "relatedLink": "https://elipousson.github.io/mapbaltimore/",
  "codeRepository": "https://github.com/elipousson/mapbaltimore",
  "issueTracker": "https://github.com/elipousson/mapbaltimore/issues",
  "license": "https://spdx.org/licenses/MIT",
  "version": "0.1.1.9001",
  "programmingLanguage": {
    "@type": "ComputerLanguage",
    "name": "R",
    "url": "https://r-project.org"
  },
  "runtimePlatform": "R version 4.3.0 (2023-04-21)",
  "author": [
    {
      "@type": "Person",
      "givenName": "Eli",
      "familyName": "Pousson",
      "email": "eli.pousson@gmail.com",
      "@id": "https://orcid.org/0000-0001-8280-1706"
    }
  ],
  "copyrightHolder": [
    {
      "@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": "covr",
      "name": "covr",
      "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=covr"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "forcats",
      "name": "forcats",
      "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=forcats"
    },
    {
      "@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": "ggrepel",
      "name": "ggrepel",
      "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=ggrepel"
    },
    {
      "@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": "maplayer",
      "name": "maplayer",
      "sameAs": "https://github.com/elipousson/maplayer"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "naniar",
      "name": "naniar",
      "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=naniar"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "osmdata",
      "name": "osmdata",
      "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=osmdata"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "progress",
      "name": "progress",
      "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=progress"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "readr",
      "name": "readr",
      "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=readr"
    },
    {
      "@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": "RSocrata",
      "name": "RSocrata",
      "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=RSocrata"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "testthat",
      "name": "testthat",
      "version": ">= 3.0.0",
      "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=testthat"
    }
  ],
  "softwareRequirements": {
    "1": {
      "@type": "SoftwareApplication",
      "identifier": "R",
      "name": "R",
      "version": ">= 2.10"
    },
    "2": {
      "@type": "SoftwareApplication",
      "identifier": "cli",
      "name": "cli",
      "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=cli"
    },
    "3": {
      "@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"
    },
    "4": {
      "@type": "SoftwareApplication",
      "identifier": "esri2sf",
      "name": "esri2sf",
      "version": ">= 0.1.1",
      "sameAs": "https://github.com/elipousson/esri2sf"
    },
    "5": {
      "@type": "SoftwareApplication",
      "identifier": "getdata",
      "name": "getdata",
      "version": ">= 0.1.0.9002",
      "sameAs": "https://github.com/elipousson/getdata"
    },
    "6": {
      "@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"
    },
    "7": {
      "@type": "SoftwareApplication",
      "identifier": "janitor",
      "name": "janitor",
      "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=janitor"
    },
    "8": {
      "@type": "SoftwareApplication",
      "identifier": "lifecycle",
      "name": "lifecycle",
      "version": ">= 1.0.3",
      "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=lifecycle"
    },
    "9": {
      "@type": "SoftwareApplication",
      "identifier": "lubridate",
      "name": "lubridate",
      "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=lubridate"
    },
    "10": {
      "@type": "SoftwareApplication",
      "identifier": "magrittr",
      "name": "magrittr",
      "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=magrittr"
    },
    "11": {
      "@type": "SoftwareApplication",
      "identifier": "pkgconfig",
      "name": "pkgconfig",
      "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=pkgconfig"
    },
    "12": {
      "@type": "SoftwareApplication",
      "identifier": "purrr",
      "name": "purrr",
      "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=purrr"
    },
    "13": {
      "@type": "SoftwareApplication",
      "identifier": "rappdirs",
      "name": "rappdirs",
      "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=rappdirs"
    },
    "14": {
      "@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"
    },
    "15": {
      "@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"
    },
    "16": {
      "@type": "SoftwareApplication",
      "identifier": "sfext",
      "name": "sfext",
      "version": ">= 0.1.1",
      "sameAs": "https://github.com/elipousson/sfext"
    },
    "17": {
      "@type": "SoftwareApplication",
      "identifier": "snakecase",
      "name": "snakecase",
      "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=snakecase"
    },
    "18": {
      "@type": "SoftwareApplication",
      "identifier": "stringr",
      "name": "stringr",
      "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=stringr"
    },
    "19": {
      "@type": "SoftwareApplication",
      "identifier": "tibble",
      "name": "tibble",
      "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=tibble"
    },
    "20": {
      "@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"
    },
    "21": {
      "@type": "SoftwareApplication",
      "identifier": "tidyselect",
      "name": "tidyselect",
      "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=tidyselect"
    },
    "22": {
      "@type": "SoftwareApplication",
      "identifier": "utils",
      "name": "utils"
    },
    "SystemRequirements": null
  },
  "fileSize": "84894.437KB",
  "releaseNotes": "https://github.com/elipousson/mapbaltimore/blob/master/NEWS.md",
  "readme": "https://github.com/elipousson/mapbaltimore/blob/main/README.md",
  "contIntegration": "https://app.codecov.io/gh/elipousson/mapbaltimore?branch=main",
  "developmentStatus": [
    "https://lifecycle.r-lib.org/articles/stages.html#experimental",
    "https://www.repostatus.org/#active"
  ],
  "keywords": [
    "baltimore",
    "rspatial",
    "r-package",
    "r"
  ]
}

GitHub Events

Total
  • Watch event: 1
  • Push event: 7
Last Year
  • Watch event: 1
  • Push event: 7

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 578
  • Total Committers: 1
  • Avg Commits per committer: 578.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 26
  • Committers: 1
  • Avg Commits per committer: 26.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Eli Pousson e****n@g****m 578

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 14
  • Total pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: 11 minutes
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 0.21
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • 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
  • elipousson (12)
Pull Request Authors
  • elipousson (1)
Top Labels
Issue Labels
data (11) enhancement (5) documentation (5) question (1)
Pull Request Labels

Dependencies

DESCRIPTION cran
  • R >= 2.10 depends
  • cli * imports
  • dplyr * imports
  • forcats * imports
  • getdata * imports
  • ggplot2 * imports
  • ggrepel * imports
  • glue * imports
  • janitor * imports
  • lubridate * imports
  • magrittr * imports
  • maplayer * imports
  • naniar * imports
  • pkgconfig * imports
  • progress * imports
  • purrr * imports
  • rappdirs * imports
  • readr * imports
  • rlang * imports
  • sf * imports
  • sfext * imports
  • snakecase * imports
  • stringr * imports
  • tibble * imports
  • tidyr * imports
  • tidyselect * imports
  • units * imports
  • usethis * imports
  • utils * imports
  • RSocrata * suggests
  • esri2sf * suggests
  • knitr * suggests
  • osmdata * suggests
  • rmarkdown * suggests
  • testthat >= 3.0.0 suggests
.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
.github/workflows/test-coverage.yaml actions
  • actions/checkout v3 composite
  • actions/upload-artifact v3 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite