Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.3plot timeseries #30

Open
wants to merge 3 commits into
base: update0.3
Choose a base branch
from
Open

0.3plot timeseries #30

wants to merge 3 commits into from

Conversation

wlangera
Copy link
Collaborator

@wlangera wlangera commented Dec 3, 2024

@shawndove I provide this PR to show how I would visualise time series (plot_ts()).
This is in my eyes more correct.
Let me know what you think.

There are 2 components:

  1. Indicator estimates and intervals
  • They are calculated per time point (e.g. per year)
  • Estimates are indicated by a point
  • Intervals are indicated by an error bar if upper and lower limits are available
  1. Smooth trends (shown if smoothed_trend = TRUE)
  • Calculated over complete time span as a Local Polynomial Regression Fitting (loess)
  • for estimates (average trend)
  • for upper and lower limits if they are available

The layer order is as follows:

  1. Estimate points are most in the foreground
  2. Error bars are second in foreground
  3. Smooth trends are in background

Here is a reproducible example:

library(b3gbi)

denmark_cube <- process_cube(
  system.file("extdata", "denmark_mammals_cube_eqdgc.csv", package="b3gbi"))
denmark_observed_richness_ts <- pielou_evenness_ts(
  example_cube_1, first_year = 2011, level = "country", region = "Denmark")

plot(denmark_observed_richness_ts)

Created on 2024-12-03 with reprex v2.1.1

@wlangera wlangera mentioned this pull request Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant