climr
climr copied to clipboard
Refine plot_timeSeries() function
nice to have a plot equivalent to what is provided in cmip6-BC, but for user-selected locations,
this will need to wait until we fill the gaps in the time series and add the additional runs for GFDL.
upgrading this to v1.0.0 because this plot will be needed for identifying bugs in climr.
tasks:
- [x] the
climr_downscale()call takes several minutes. need to remove it from the function (e.g., as a separateplot_timeSeries_inputs()function) or cache the first call for use in subsequent runs. - [x] rationalize the handling of observational time series. lots of redundant code here.
- [x] run from devl and bring in cru_gpcc time series
- [x] the plot will only work for annual and seasonal variables until we rename monthly variables with underscore delimitation (Tave_01 instead of the current Tave01)
- [x] add a step where the data inputs are aggregated to the mean climate of all points (currently the function only works for one point.
- [ ] add a polygon of the ensemble mean min and max, so that it isn't just one line of the grand mean. (this is important but tricky to implement because it involved compiling splines for each gcm mean).
- [x] calculate ensemble mean using the ensembleMean, to ensure that the mean isn't biased towards models with more runs
- [x] add an option for 5-year dots on the observational run (CarbonBrief style)
- [x] improve handling of measurement units (e.g., mm or ^oC) in the y axis title
- [ ] create byline with copyright info, CC license, etc.
- [x] ensure that plotting utilities (e.g., title) are available to the user.
- [x] toggle temperature change vs model on right margin
- [x] @importFrom on plot_timeSeries()
- [x] @importFrom on plot_timeSeries_input()
- [x] documentation - complete parameter descriptions
- [x] documentation - complete function description and details
- [x] documentation - complete examples
- [x] deploy - bump and NEWS
- [ ] option for log-transforming the y axis.
- [x] add an option for different coloured models
Still a few outstanding issues, but merging to devl, as this function is adequate and seems to be bug free.