Science Score: 23.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
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 2 committers (50.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.6%) to scientific vocabulary
Last synced: 11 months ago
·
JSON representation
Repository
Compute Diversity and Segregation Indices
Basic Info
- Host: GitHub
- Owner: christopherkenny
- License: other
- Language: R
- Default Branch: main
- Homepage: https://christophertkenny.com/divseg/
- Size: 563 KB
Statistics
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
- Releases: 0
Created about 5 years ago
· Last pushed 11 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%'
)
```
# divseg
[](https://CRAN.R-project.org/package=divseg)
[](https://github.com/christopherkenny/divseg/actions/workflows/R-CMD-check.yaml)
[](https://lifecycle.r-lib.org/articles/stages.html#stable)
[](https://christopherkenny.r-universe.dev/divseg)
`divseg` implements common measures of diversity (within-geography) and segregation (across-geographies).
## Installation
You can install the released version of divseg from [CRAN](https://CRAN.R-project.org) with:
``` r
install.packages("divseg")
```
You can install the released version of divseg from [GitHub](https://github.com/christopherkenny/divseg/) with:
``` r
pak::pak('christopherkenny/divseg')
```
## Example
The basic workflow relies on a `tibble` where each row represents a geography and has columns that represent some form of population data.
```{r lib}
library(divseg)
```
`divseg` comes with two example datasets. `de_county` contains 2010 Census data on the counties in Delaware. `de_tract` likewise has 2010 Census data on the tracts in Delaware.
```{r data}
data('de_county')
data('de_tract')
```
A pretty standard function call returns a vector, where the first entry is a `tibble` and the second is `tidyselect` language.
```{r example}
ds_blau(.data = de_county, .cols = starts_with('pop_'))
```
More importantly, if you specify an argument to `.name`, all functions are pipe-able.
```{r pipe}
de_county |>
ds_blau(starts_with('pop_'), .name = 'blau') |>
ds_delta(starts_with('pop_'), .name = 'delta') |>
dplyr::relocate(blau, delta)
```
Each function has a partner that can go inside calls to `dplyr::mutate()` by dropping the `ds_` prefix:
```{r}
de_county |>
dplyr::mutate(herf = hhi(starts_with('pop_'))) |>
dplyr::relocate(herf)
```
Owner
- Name: Christopher T. Kenny
- Login: christopherkenny
- Kind: user
- Location: Cambridge, MA
- Company: Harvard University
- Website: https://www.christophertkenny.com
- Twitter: chris_t_kenny
- Repositories: 78
- Profile: https://github.com/christopherkenny
Redistricting and rstats. Harvard University, PhD Candidate, Department of Government. Cornell '19.
GitHub Events
Total
- Push event: 4
Last Year
- Push event: 4
Committers
Last synced: almost 3 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Christopher Kenny | c****4@c****u | 32 |
| Lionel Henry | l****y@g****m | 6 |
Committer Domains (Top 20 + Academic)
cornell.edu: 1
Issues and Pull Requests
Last synced: 12 months ago
All Time
- Total issues: 0
- Total pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: 1 day
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 1.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
Pull Request Authors
- lionel- (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 281 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
cran.r-project.org: divseg
Calculate Diversity and Segregation Indices
- Homepage: https://github.com/christopherkenny/divseg/
- Documentation: http://cran.r-project.org/web/packages/divseg/divseg.pdf
- License: MIT + file LICENSE
-
Latest release: 0.0.5
published over 3 years ago
Rankings
Forks count: 17.8%
Dependent packages count: 29.8%
Stargazers count: 31.7%
Average: 32.0%
Dependent repos count: 35.5%
Downloads: 45.2%
Maintainers (1)
Last synced:
11 months ago
Dependencies
DESCRIPTION
cran
- R >= 2.10 depends
- dplyr * imports
- magrittr * imports
- rlang >= 0.1.2 imports
- sf imports
- tibble * imports
- tidyselect * imports
- units * imports
- roxygen2 * suggests
- testthat >= 3.0.0 suggests
.github/workflows/R-CMD-check.yaml
actions
- actions/cache v2 composite
- actions/checkout v2 composite
- actions/upload-artifact main composite
- r-lib/actions/setup-pandoc v1 composite
- r-lib/actions/setup-r v1 composite
.github/workflows/pkgdown.yaml
actions
- actions/cache v2 composite
- actions/checkout v2 composite
- r-lib/actions/setup-pandoc v1 composite
- r-lib/actions/setup-r v1 composite