SpatialEpi

R Package of methods and data for spatial epidemiology

https://github.com/rudeboybert/spatialepi

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: researchgate.net
  • Committers with academic emails
    3 of 8 committers (37.5%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.9%) to scientific vocabulary
Last synced: 11 months ago · JSON representation

Repository

R Package of methods and data for spatial epidemiology

Basic Info
  • Host: GitHub
  • Owner: rudeboybert
  • Language: R
  • Default Branch: master
  • Homepage:
  • Size: 30.9 MB
Statistics
  • Stars: 34
  • Watchers: 1
  • Forks: 8
  • Open Issues: 1
  • Releases: 4
Created about 12 years ago · Last pushed over 3 years ago
Metadata Files
Readme

README.Rmd

---
output: github_document
---



```{r, echo = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README_figure/README-"
)
```

# SpatialEpi

[![R-CMD-check](https://github.com/rudeboybert/SpatialEpi/workflows/R-CMD-check/badge.svg)](https://github.com/rudeboybert/SpatialEpi/actions)
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/SpatialEpi)](https://cran.r-project.org/package=SpatialEpi) [![CRAN RStudio mirror downloads](https://cranlogs.r-pkg.org/badges/SpatialEpi)](https://www.r-pkg.org/pkg/SpatialEpi)

Package of data and methods for spatial epidemiology. 

## Installation

Get the released version from CRAN:

```{r, eval=FALSE}
install.packages("SpatialEpi")
```

Or the development version from GitHub:

```{r, eval=FALSE}
# If you haven't installed devtools yet, do so:
# install.packages("devtools")
devtools::install_github("rudeboybert/SpatialEpi")
```

Note: In order for all C++ code to compile correctly you may need to

1. Install the `cpp11` package
1. Install an older version of `RcppArmadillo` by running  
    ```{r, eval=FALSE}
    packageurl <- "https://cran.r-project.org/src/contrib/Archive/RcppArmadillo/RcppArmadillo_0.9.900.3.0.tar.gz"
install.packages(packageurl, repos=NULL, type="source")
    ```



## Example

We load the data and convert the coordinate system from latitude/longitude to a grid-based system.

```{r, message=FALSE, warning=FALSE}
library(SpatialEpi)
```

```{r, message=FALSE, warning=FALSE}
data(NYleukemia)
sp.obj <- NYleukemia$spatial.polygon
centroids <- latlong2grid(NYleukemia$geo[, 2:3])
population <- NYleukemia$data$population
cases <- NYleukemia$data$cases
```

We plot the incidence of leukemia for each census tract.

```{r, message=FALSE, warning=FALSE, fig.height=6.5}
plotmap(cases/population, sp.obj, log=TRUE, nclr=5)
points(grid2latlong(centroids), pch=4)
```

We run the Bayesian Cluster Detection method from [Wakefield and Kim (2013)](https://www.researchgate.net/publication/235896508_A_Bayesian_model_for_cluster_detection):

```{r bayes_cluster, message=FALSE, warning=FALSE, cache=TRUE}
y <- cases
E <- expected(population, cases, 1)
max.prop <- 0.15
shape <- c(2976.3, 2.31)
rate <- c(2977.3, 1.31)
J <- 7
pi0 <- 0.95
n.sim.lambda <- 10^4
n.sim.prior <- 10^5
n.sim.post <- 10^5

# Compute output
output <- bayes_cluster(y, E, population, sp.obj, centroids, max.prop,
                        shape, rate, J, pi0, n.sim.lambda, n.sim.prior,
                        n.sim.post)
```

```{r, fig.height=6.5}
plotmap(output$post.map$high.area, sp.obj)
```

Owner

  • Name: Albert Y. Kim
  • Login: rudeboybert
  • Kind: user
  • Location: Northampton MA, USA
  • Company: @SmithCollege-SDS

Assistant Professor of Statistical & Data Sciences, Smith College

GitHub Events

Total
  • Watch event: 3
Last Year
  • Watch event: 3

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 258
  • Total Committers: 8
  • Avg Commits per committer: 32.25
  • Development Distribution Score (DDS): 0.291
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
rudeboybert a****m@g****m 183
arrismo m****e@p****m 35
Arris Moise m****0@g****m 34
Kim a****m@f****u 2
Arris Moise a****e@s****u 1
Ian D Buller i****r@g****m 1
Mikael Moise m****l@m****m 1
whoishomer a****t@s****u 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 20
  • Total pull requests: 20
  • Average time to close issues: 2 months
  • Average time to close pull requests: 7 days
  • Total issue authors: 6
  • Total pull request authors: 3
  • Average comments per issue: 0.85
  • Average comments per pull request: 1.25
  • Merged pull requests: 19
  • 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
  • rudeboybert (11)
  • arrismo (5)
  • colourfulmww (1)
  • rsbivand (1)
  • simon-smart88 (1)
  • jofmorenore (1)
Pull Request Authors
  • rudeboybert (11)
  • arrismo (8)
  • idblr (1)
Top Labels
Issue Labels
wontfix (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 707 last-month
  • Total docker downloads: 1,385
  • Total dependent packages: 3
  • Total dependent repositories: 8
  • Total versions: 12
  • Total maintainers: 1
cran.r-project.org: SpatialEpi

Methods and Data for Spatial Epidemiology

  • Versions: 12
  • Dependent Packages: 3
  • Dependent Repositories: 8
  • Downloads: 707 Last month
  • Docker Downloads: 1,385
Rankings
Forks count: 7.9%
Stargazers count: 10.3%
Dependent repos count: 10.5%
Dependent packages count: 10.9%
Average: 11.7%
Downloads: 14.6%
Docker downloads count: 16.0%
Maintainers (1)
Last synced: 11 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.0.2 depends
  • sp * depends
  • MASS * imports
  • Rcpp * imports
  • maptools * imports
  • spdep * imports
  • dplyr * suggests
  • ggplot2 * suggests
  • knitr * suggests
  • markdown * suggests
  • rmarkdown * suggests
  • testthat >= 3.0.0 suggests