stlcsb

R Package for Processing City of St. Louis Citizens Service Bureau Data

https://github.com/slu-opengis/stlcsb

Science Score: 20.0%

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

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    3 of 5 committers (60.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (19.3%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

R Package for Processing City of St. Louis Citizens Service Bureau Data

Basic Info
Statistics
  • Stars: 7
  • Watchers: 4
  • Forks: 2
  • Open Issues: 2
  • Releases: 0
Archived
Created over 8 years ago · Last pushed over 2 years ago
Metadata Files
Readme License Code of conduct

README.Rmd

---
output: github_document
---



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

[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)
[![Travis-CI Build Status](https://travis-ci.org/slu-openGIS/stlcsb.svg?branch=master)](https://travis-ci.org/slu-openGIS/stlcsb)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/slu-openGIS/stlcsb?branch=master&svg=true)](https://ci.appveyor.com/project/chris-prener/stlcsb)
[![Coverage status](https://codecov.io/gh/slu-openGIS/stlcsb/branch/master/graph/badge.svg)](https://codecov.io/github/slu-openGIS/stlcsb?branch=master)
[![DOI](https://zenodo.org/badge/120821460.svg)](https://zenodo.org/badge/latestdoi/120821460)
[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/stlcsb)](https://cran.r-project.org/package=stlcsb)

The goal of `stlcsb` is to provide access to data from the City of St. Louis [Citizens’ Service Bureau](https://www.stlouis-mo.gov/government/departments/public-safety/neighborhood-stabilization-office/citizens-service-bureau/index.cfm) (CSB), the [3-1-1 service](https://en.wikipedia.org/wiki/3-1-1) for the City of Saint Louis. Residents can contact the number with non-emergency service requests, and the CSB will dispatch these requests to the appropriate City agency. `stlcsb` also includes functions for cleaning and manipulating these data.

## Installation
### Installing Dependencies
You should check the [`sf` package website](https://r-spatial.github.io/sf/) and the [`stlcsb` package website](https://slu-openGIS.github.io/stlcsb/) for the latest details on installing dependencies for that package. Instructions vary significantly by operating system. For best results, have `sf` installed before you install `stlcsb`. Other dependencies, like `dplyr`, will be installed automatically with `stlcsb` if they are not already present.

### Installing stlcsb
The easiest way to get `stlcsb` is to install it from CRAN:

``` r
install.packages("stlcsb")
```

The development version of `stlcsb` can be accessed from GitHub with `remotes`:

```r
# install.packages("remotes")
remotes::install_github("slu-openGIS/stlcsb")
```

## Example Usage 

`stlcsb` is used for simplified acquisition and processing of St. Louis CSB Data. In the following example, data is downloaded from the City of St. Louis, filtered to identify only calls related to waste disposal, and then projected to an sf object for mapping.

```r
> library(stlcsb)
> library(dplyr)
>
> csb <- csb_get_data(year = 2017)
trying URL 'https://www.stlouis-mo.gov/data/upload/data-files/csb.zip'
Content type 'application/x-zip-compressed' length 60999726 bytes (58.2 MB)
==================================================
downloaded 58.2 MB

>
> csb_filter(csb, var = problemcode, category = cat_waste) %>%
+   csb_missingXY(varX = srx, varY = sry, newVar = "missing") %>%
+   filter(missing == FALSE) %>%
+   csb_projectXY(varX = srx, varY = sry) -> waste_2017
```

Notice that variable names can be either quoted or unquoted, since `stlcsb` makes full use of non-standard evaluation.

Once the data are projected, they can be explored with packages like `mapview`:

```r
> library(mapview)
> mapview(waste_2017)
```
```{r exampleMap1, echo=FALSE, out.width = '60%'}
knitr::include_graphics("man/figures/waste_mapview.png")
```

These data can also be mapped using `ggplot2` once they have been projected:

```r
> library(ggplot2)
> ggplot() + 
+   geom_sf(data = waste_2017, color = "red", fill = NA, size = .5)
```
```{r exampleMap2, echo=FALSE, out.width = '60%'}
knitr::include_graphics("man/figures/waste_example.png")
```

## Contributor Code of Conduct
Please note that this project is released with a [Contributor Code of Conduct](.github/CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.

Owner

  • Name: SLU Data Science Seminar openGIS Project
  • Login: slu-openGIS
  • Kind: organization
  • Email: chris.prener@slu.edu
  • Location: St. Louis, MO

Creating Publicly Available GIS Data and Tools for the St. Louis Region

GitHub Events

Total
Last Year

Committers

Last synced: over 3 years ago

All Time
  • Total Commits: 250
  • Total Committers: 5
  • Avg Commits per committer: 50.0
  • Development Distribution Score (DDS): 0.348
Top Committers
Name Email Commits
bransonf 3****f@u****m 163
Christopher Prener c****r@s****u 73
Christopher Prener, PhD p****g@s****u 9
bransonf b****x@s****u 4
Walker Hamilton 3****r@u****m 1
Committer Domains (Top 20 + Academic)
slu.edu: 3

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
cran.r-project.org: stlcsb

Tidy Manipulation of CSB Data for St. Louis

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 0
Rankings
Forks count: 17.8%
Stargazers count: 19.8%
Dependent packages count: 29.8%
Dependent repos count: 35.5%
Average: 38.5%
Downloads: 89.7%
Last synced: over 2 years ago

Dependencies

DESCRIPTION cran
  • R >= 3.3 depends
  • dplyr * imports
  • lubridate * imports
  • purrr * imports
  • readr * imports
  • readxl * imports
  • rlang * imports
  • rvest * imports
  • sf * imports
  • stringr * imports
  • tibble * imports
  • tools * imports
  • xml2 * imports
  • covr * suggests
  • ggplot2 * suggests
  • knitr * suggests
  • mapview * suggests
  • rmarkdown * suggests
  • testthat * suggests