ggspatial

Enhancing spatial visualization in ggplot2

https://github.com/paleolimbot/ggspatial

Science Score: 36.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
    1 of 11 committers (9.1%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.5%) to scientific vocabulary

Keywords from Contributors

geo gdal proj visualisation
Last synced: 10 months ago · JSON representation

Repository

Enhancing spatial visualization in ggplot2

Basic Info
Statistics
  • Stars: 380
  • Watchers: 13
  • Forks: 37
  • Open Issues: 37
  • Releases: 10
Created almost 10 years ago · Last pushed 10 months ago
Metadata Files
Readme Changelog

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
rosm::set_default_cachedir(system.file("rosm.cache", package = "ggspatial"))
knitr::opts_chunk$set(
  collapse = TRUE,
  dpi = 150,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```

# ggspatial


[![ggspatial on CRAN](https://cranlogs.r-pkg.org/badges/ggspatial)](https://cran.r-project.org/package=ggspatial)
[![Coverage Status](https://img.shields.io/codecov/c/github/paleolimbot/ggspatial/master.svg)](https://app.codecov.io/github/paleolimbot/ggspatial?branch=master)
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
[![R-CMD-check](https://github.com/paleolimbot/ggspatial/workflows/R-CMD-check/badge.svg)](https://github.com/paleolimbot/ggspatial/actions)


Spatial data plus the power of the `ggplot2` framework means easier mapping.

## Installation

The package is available on CRAN, and can be installed using `install.packages("ggspatial")`. The development version can be installed via **remotes**.

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

Or for the development version:

```{r, eval=FALSE}
install.packages("remotes") # if remotes isn't installed
remotes::install_github("paleolimbot/ggspatial")
```

## Introduction

This package is a framework for interacting with spatial data using **ggplot2** as a plotting backend. The package supports **sf** package objects, **sp** package objects, and **raster** package objects, and uses `geom_sf()` and `coord_sf()` to do most of the heavy lifting with respect to coordinate transformation.

```{r fig-layer-spatial-sf, warning=FALSE, message=FALSE}
library(ggplot2)
library(ggspatial)
load_longlake_data()

ggplot() +
  # loads background map tiles from a tile source
  annotation_map_tile(zoomin = -1) +
  
  # annotation_spatial() layers don't train the scales, so data stays central
  annotation_spatial(longlake_roadsdf, size = 2, col = "black") +
  annotation_spatial(longlake_roadsdf, size = 1.6, col = "white") +

  # raster layers train scales and get projected automatically
  layer_spatial(longlake_depth_raster, aes(colour = after_stat(band1))) +
  # make no data values transparent
  scale_fill_viridis_c(na.value = NA) +
  
  # layer_spatial trains the scales
  layer_spatial(longlake_depthdf, aes(fill = DEPTH_M)) +
  
  # spatial-aware automagic scale bar
  annotation_scale(location = "tl") +

  # spatial-aware automagic north arrow
  annotation_north_arrow(location = "br", which_north = "true")
```

Owner

  • Name: Dewey Dunnington
  • Login: paleolimbot
  • Kind: user
  • Location: Nova Scotia, Canada
  • Company: @voltrondata

R devloper at @voltrondata, former @rstudio summer intern, ggplot2

GitHub Events

Total
  • Create event: 3
  • Release event: 1
  • Issues event: 3
  • Watch event: 11
  • Delete event: 1
  • Issue comment event: 7
  • Push event: 9
  • Pull request event: 3
  • Fork event: 2
Last Year
  • Create event: 3
  • Release event: 1
  • Issues event: 3
  • Watch event: 11
  • Delete event: 1
  • Issue comment event: 7
  • Push event: 9
  • Pull request event: 3
  • Fork event: 2

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 292
  • Total Committers: 11
  • Avg Commits per committer: 26.545
  • Development Distribution Score (DDS): 0.116
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Dewey Dunnington d****y@f****t 258
Diego H d****o@g****m 22
Brent Thorne 1****e 3
JoshOBrien j****n@g****m 2
thiesben b****s@z****t 1
caijun t****6@g****m 1
c-brendel 7****l 1
Roger Bivand R****d@g****m 1
Eric Potash e****c@k****t 1
Robert Nuske r****e@n****e 1
Dewey Dunnington d****n@d****a 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 86
  • Total pull requests: 30
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 4 days
  • Total issue authors: 51
  • Total pull request authors: 12
  • Average comments per issue: 2.33
  • Average comments per pull request: 1.03
  • Merged pull requests: 28
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 3
  • Pull requests: 3
  • Average time to close issues: 5 days
  • Average time to close pull requests: 13 minutes
  • Issue authors: 3
  • Pull request authors: 2
  • Average comments per issue: 0.67
  • Average comments per pull request: 0.33
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • paleolimbot (19)
  • lorenzwalthert (5)
  • lucas-johnson (3)
  • MikkoVihtakari (3)
  • brentthorne (3)
  • rhalbersma (2)
  • adrfantini (2)
  • Blundys (2)
  • rsbivand (2)
  • rnuske (2)
  • B-1991-ing (2)
  • idshklein (2)
  • ckluss (1)
  • joheisig (1)
  • SimonDedman (1)
Pull Request Authors
  • paleolimbot (16)
  • dieghernan (4)
  • ethanplunkett (2)
  • brentthorne (1)
  • c-brendel (1)
  • rnuske (1)
  • JoshOBrien (1)
  • caijun (1)
  • lorenzwalthert (1)
  • rsbivand (1)
  • thiesben (1)
  • potash (1)
Top Labels
Issue Labels
enhancement (2) bug (1)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • cran 12,948 last-month
  • Total docker downloads: 1,520
  • Total dependent packages: 27
    (may contain duplicates)
  • Total dependent repositories: 69
    (may contain duplicates)
  • Total versions: 21
  • Total maintainers: 1
proxy.golang.org: github.com/paleolimbot/ggspatial
  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 10 months ago
cran.r-project.org: ggspatial

Spatial Data Framework for ggplot2

  • Versions: 14
  • Dependent Packages: 27
  • Dependent Repositories: 69
  • Downloads: 12,948 Last month
  • Docker Downloads: 1,520
Rankings
Stargazers count: 1.0%
Forks count: 2.3%
Dependent packages count: 2.9%
Dependent repos count: 2.9%
Downloads: 4.4%
Average: 6.4%
Docker downloads count: 24.8%
Maintainers (1)
Last synced: 10 months ago

Dependencies

DESCRIPTION cran
  • R >= 2.10 depends
  • abind * imports
  • ggplot2 >= 3.0.0 imports
  • glue * imports
  • grid * imports
  • methods * imports
  • rlang * imports
  • rosm >= 0.2 imports
  • scales * imports
  • sf * imports
  • tibble * imports
  • tidyr * imports
  • covr * suggests
  • dplyr * suggests
  • ggrepel * suggests
  • knitr * suggests
  • lwgeom * suggests
  • prettymapr * suggests
  • raster * suggests
  • rgdal * suggests
  • rmarkdown * suggests
  • sp * suggests
  • stars * suggests
  • terra * suggests
  • testthat >= 3.0.0 suggests
  • vdiffr * suggests
  • withr * suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v2 composite
  • actions/upload-artifact main composite
  • r-lib/actions/setup-r v1 composite
  • r-lib/actions/setup-r-dependencies v1 composite
.github/workflows/pkgdown.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v1 composite
  • r-lib/actions/setup-r v1 composite
  • r-lib/actions/setup-r-dependencies v1 composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/setup-r v1 composite
  • r-lib/actions/setup-r-dependencies v1 composite