-
Notifications
You must be signed in to change notification settings - Fork 125
ggplot2 implementation of time series & trends functions
#464
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
Draft
jack-davison
wants to merge
25
commits into
main
Choose a base branch
from
ggheatmap
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements
ggplot2versions of 'time series and trends' functions, as part of the drive to provide a modern API for openair.Tracking implementation:
trendLevel()->plot_heatmap()calendarPlot()->plot_calendar()timeProp()->plot_trend_bars()timePlot()->plot_trend_lines()smoothTrend()->plot_trend_smooth()TheilSen()->plot_trend_theilsen()timeVariation()->plot_variation()This PR also adds some necessary structural changes to initialise
ggplot2in openair:ggplot2(>=4.0.0) andscalesas dependencies.discretise_optsfor flexibly discretising a scale (e.g., plot_calendar, plot_heatmap)facet_optsfor controlling how facets are handledwindflow_optsfor controlling the appearance of windflowsfacet_wd()for wind direction faceting. I think this could be exported one day.layer_windflow()for adding 'windflow' arrows (e.g., in plot_calendar, plot_trend_line)Old functions are still present, and documentation cross-links them.
There are a few initial benefits to the
ggplot2functions:ggplot2handles a lot of things better thanlattice, meaning the functions are a lot shorter.typebe 2 things and create a grid.windflowtoplot_heatmap()(which fixes a very old issue - [Feature request]: wind vectors intrendlevel()#49)Some Examples: