ggdibbler
R package for implementing signal suppression in ggplot2
Science Score: 26.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
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (16.8%) to scientific vocabulary
Last synced: 9 months ago
·
JSON representation
Repository
R package for implementing signal suppression in ggplot2
Basic Info
- Host: GitHub
- Owner: harriet-mason
- Language: R
- Default Branch: main
- Homepage: https://harriet-mason.github.io/ggdibbler/
- Size: 13.5 MB
Statistics
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 14
- Releases: 1
Created over 1 year ago
· Last pushed 10 months ago
Metadata Files
Readme
Changelog
README.Rmd
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# ggdibbler
[](https://app.codecov.io/gh/harriet-mason/ggdibbler)
`ggdibbler` is an R package for implementing signal suppression in ggplot2. Usually, uncertainty visualisation focuses on expressing uncertainty as a distribution or probability, whereas ggdibble differentiates itself by viewing an uncertainty visualisation as a transformation of an existing graphic that incorperates uncertainty. The package allows you to replace any existing variable of observations in a graphic, with a variable of distributons. It is particularly useful for visualisations of estimates, such as a mean. You provide ggdibble with code for an existing plot, but repalace one of the variables with a distribution, and it will convert the visualisation into it's signal supression counterpart.
## Installation
You can install the development version of ggdibbler from [GitHub](https://github.com/) with:
``` r
# install.packages("pak")
pak::pak("harriet-mason/ggdibbler")
```
## Examples
Currently, the primary useage of ggdibbler is a variation on `geom_sf`, by having several alternatives to the standard fill.
```{r, message=FALSE, warning=FALSE}
library(ggdibbler)
library(ggplot2)
library(dplyr)
library(sf)
```
Typically, if we had an average estimate for a series of areas, we would simply display the average, or keep the average separate. Below is an example of this with a choropleth map.
```{r}
# Make average summary of data
toy_temp_mean <- toy_temp |>
dplyr::group_by(county_name) |>
summarise(temp_mean = mean(recorded_temp))
# plot it
ggplot(toy_temp_mean) +
geom_sf(aes(geometry=county_geometry, fill=temp_mean)) +
scale_fill_distiller(palette = "OrRd")
```
We can use `geom_sf_sample` from the ggdibbler package to instead view each estimate as a sample of values from its sampling distribution.
```{r}
set.seed(1)
# sample map
toy_temp_dist |>
ggplot() +
geom_sf_sample(aes(geometry = county_geometry, fill=temp_dist), linewidth=0.1) +
geom_sf(aes(geometry = county_geometry), fill=NA, linewidth=1) +
scale_fill_distiller(palette = "OrRd")
```
## Additions to the package
As `ggdibbler` is designed to alter existing graphic types to accept distributions as inputs there is a near infinite number of plots that could be changed with the package. At the moment the focus is on alterations to `geom_sf`, but we are happy to add any other functionality that users would like to have as a ggplot geom. If you have a suggestion, feel free to add it in the github issues.
Owner
- Login: harriet-mason
- Kind: user
- Repositories: 3
- Profile: https://github.com/harriet-mason
GitHub Events
Total
- Create event: 1
- Release event: 1
- Issues event: 24
- Watch event: 7
- Member event: 1
- Issue comment event: 8
- Push event: 106
- Fork event: 1
Last Year
- Create event: 1
- Release event: 1
- Issues event: 24
- Watch event: 7
- Member event: 1
- Issue comment event: 8
- Push event: 106
- Fork event: 1
Packages
- Total packages: 1
-
Total downloads:
- cran 213 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 1
- Total maintainers: 1
cran.r-project.org: ggdibbler
Add Uncertainty to Data Visualisations
- Homepage: https://harriet-mason.github.io/ggdibbler/
- Documentation: http://cran.r-project.org/web/packages/ggdibbler/ggdibbler.pdf
- License: GPL-3
-
Latest release: 0.1.0
published 11 months ago
Rankings
Dependent packages count: 25.7%
Dependent repos count: 31.7%
Average: 47.6%
Downloads: 85.5%
Maintainers (1)
Last synced:
10 months ago