findSVI
findSVI: an R package to calculate the Social Vulnerability Index at multiple geographical levels - Published in JOSS (2024)
Science Score: 93.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
Found 4 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org -
○Committers with academic emails
-
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Scientific Fields
Engineering
Computer Science -
40% confidence
Last synced: 6 months ago
·
JSON representation
Repository
Calculate CDC/ATSDR Social Vulnerability Index
Basic Info
- Host: GitHub
- Owner: heli-xu
- License: other
- Language: R
- Default Branch: main
- Homepage: https://heli-xu.github.io/findSVI/
- Size: 18.9 MB
Statistics
- Stars: 14
- Watchers: 3
- Forks: 3
- Open Issues: 1
- Releases: 3
Created about 3 years ago
· Last pushed 8 months ago
Metadata Files
Readme
Changelog
License
README.Rmd
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# findSVI
[](https://github.com/heli-xu/findSVI/actions/workflows/R-CMD-check.yaml)
[](https://doi.org/10.21105/joss.06525)
The goal of findSVI is to calculate regional CDC/ATSDR Social Vulnerability Index (SVI) (former site: www.atsdr.cdc.gov/placeandhealth/svi/index.html) at a geographic level of interest using US census data from American Community Survey.
## Overview
CDC/ATSDR releases SVI biannually at the counties/census tracts level for US or an individual state. findSVI aims to support more flexible and specific SVI analysis with additional options for years (2012-2022) and geographic levels (e.g., ZCTA/places, combining multiple states).
To find SVI for one or multiple year-state pair(s):
- `find_svi()`: retrieves US census data (Census API key required) and calculates SVI based on CDC/ATSDR SVI documentation (www.atsdr.cdc.gov/placeandhealth/svi/data_documentation_download.html) for each year-state pair at the same geography level.
In most cases, `find_svi()` would be the easiest option. If you'd like to include simple feature geometry or have more customized requests for census data retrieval (e.g., different geography level for each year-state pair, multiple states for one year), you can process individual entry using the following:
- `get_census_data()`: retrieves US census data (Census API key required);
- `get_svi()`: calculates SVI from the census data supplied.
Essentially, `find_svi()` is a wrapper function for `get_census_data()` and `get_svi()` that also supports iteration over 1-year-and-1-state pairs at the same geography level.
## Installation
Install the findSVI package via CRAN:
```{r, eval=FALSE}
install.packages("findSVI")
```
Alternatively, you can install the development version of findSVI from GitHub with:
```{r, eval=FALSE}
# install.packages("devtools")
devtools::install_github("heli-xu/findSVI")
```
## Usage
**To find county-level SVI for New Jersey (NJ) for 2017, and for Pennsylvania (PA) for 2018:**
```{r find_svi, eval=FALSE, warning=FALSE}
library(findSVI)
library(dplyr)
summarise_results <- find_svi(
year = c(2017, 2018),
state = c("NJ", "PA"),
geography = "county"
)
summarise_results %>%
group_by(year, state) %>%
slice_head(n = 5)
```
```{r summarise_results, echo=FALSE, warning=FALSE, message=FALSE}
library(findSVI)
library(dplyr)
load(system.file("extdata", "summarise_results.rda", package = "findSVI"))
summarise_results %>%
group_by(year, state) %>%
slice_head(n = 5)
```
(First 5 rows of results for 2017-NJ and 2018-PA are shown. 'RPL_themes\` indicates overall SVI, and 'RPL_theme1' to 'RPL_theme4' indicate theme-specific SVIs.)
**To retrieve county-level census data *and then* get SVI for PA for 2020:**
```{r get_census_data, eval=FALSE}
data <- get_census_data(2020, "county", "PA")
data[1:10, 1:10]
```
```{r censusdata, echo=FALSE}
load(system.file("testdata","pa_cty_raw2020.rda",package = "findSVI"))
pa_cty_raw2020[1:10, 1:10]
```
(First 10 rows and columns are shown, with the rest of columns being other census variables for SVI calculation.)
```{r get_svi, eval = FALSE}
result <- get_svi(2020, data)
glimpse(result)
```
```{r svi, echo=FALSE}
load(system.file("testdata", "pa_cty_result2020.rda", package = "findSVI"))
glimpse(pa_cty_result2020)
```
**To find SVI for custom geographic boundaries:**
```{r, eval=FALSE}
cz_svi <- find_svi_x(
year = 2020,
geography = "county",
xwalk = cty_cz_2020_xwalk #county-commuting zone crosswalk
)
```
...where `xwalk` is supplied by users to define the relationship between a Census geography ('GEOID') and the custom geographic level ('GEOID2'). The Census geography should be fully nested in the custom geographic level of interest. As an example, first 10 rows of the county-commuting zone crosswalk are shown below:
```{r}
cty_cz_2020_xwalk %>% head(10)
```
With the crosswalk, county-level census data are aggregated to the commuting zone-level, and SVI is calculated for each commuting zone. Below shows the overall and theme-specific SVI of the first 10 rows, with GEOIDs representing the commuting zone IDs.
```{r, eval=FALSE}
cz_svi %>%
select(GEOID, contains("RPL")) %>%
head(10)
```
```{r, echo=FALSE}
load(system.file("extdata","cz_svi2020.rda",package = "findSVI"))
cz_svi2020
```
Owner
- Login: heli-xu
- Kind: user
- Repositories: 3
- Profile: https://github.com/heli-xu
JOSS Publication
findSVI: an R package to calculate the Social Vulnerability Index at multiple geographical levels
Published
July 05, 2024
Volume 9, Issue 99, Page 6525
Authors
Heli Xu
Urban Health Collaborative, Drexel Dornsife School of Public Health, Philadelphia, PA, United States of America
Urban Health Collaborative, Drexel Dornsife School of Public Health, Philadelphia, PA, United States of America
Tags
social vulnerability census data community resilience spatial inequityGitHub Events
Total
- Create event: 1
- Commit comment event: 1
- Release event: 1
- Issues event: 15
- Watch event: 11
- Issue comment event: 8
- Push event: 35
- Pull request event: 1
Last Year
- Create event: 1
- Commit comment event: 1
- Release event: 1
- Issues event: 15
- Watch event: 11
- Issue comment event: 8
- Push event: 35
- Pull request event: 1
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 27
- Total pull requests: 6
- Average time to close issues: 2 months
- Average time to close pull requests: 3 days
- Total issue authors: 8
- Total pull request authors: 4
- Average comments per issue: 2.81
- Average comments per pull request: 0.83
- Merged pull requests: 3
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 8
- Pull requests: 2
- Average time to close issues: 16 days
- Average time to close pull requests: 7 days
- Issue authors: 5
- Pull request authors: 1
- Average comments per issue: 0.88
- Average comments per pull request: 1.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- ran-codes (9)
- heli-xu (8)
- usamabilal (4)
- osorensen (2)
- epiben (1)
- brendensm (1)
- rsbivand (1)
- hschoi11 (1)
- sabohashem (1)
Pull Request Authors
- ran-codes (2)
- eltociear (2)
- nightwatch-analytics (2)
- heli-xu (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 234 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
cran.r-project.org: findSVI
Calculate Social Vulnerability Index for Communities
- Homepage: https://github.com/heli-xu/findSVI
- Documentation: http://cran.r-project.org/web/packages/findSVI/findSVI.pdf
- License: MIT + file LICENSE
-
Latest release: 0.2.0
published about 1 year ago
Rankings
Forks count: 21.5%
Dependent packages count: 28.4%
Stargazers count: 31.3%
Dependent repos count: 37.0%
Average: 41.2%
Downloads: 87.9%
Maintainers (1)
Last synced:
6 months ago
Dependencies
.github/workflows/R-CMD-check.yaml
actions
- actions/checkout v3 composite
- r-lib/actions/check-r-package v2 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/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
- cli * imports
- dplyr * imports
- magrittr * imports
- purrr * imports
- rlang * imports
- stringr * imports
- tidycensus * imports
- tidyr * imports
- tidyselect * imports
- utils * imports
- ggplot2 * suggests
- glue * suggests
- htmltools * suggests
- knitr * suggests
- leaflet * suggests
- reactable * suggests
- rmarkdown * suggests
- sf * suggests
- testthat >= 3.0.0 suggests
- tmap * suggests