Beer Production
tidymetrics package demonstration, Animated map (gganimate package)
Notable topics: tidymetrics package demonstration, Animated map (gganimate package)
Recorded on: 2020-03-31
Timestamps by: Alex Cookson
Screencast
Timestamps
Asking, "What ingredients are used in beer?"
Using filter and max functions to look at the most recent period of time
Using paste and ymd functions (ymd is from lubridate package) to convert year-month field into an date-formatted field
Spotting potential missing or mis-parsed data
Introducing the tidymetrics framework
Using install_github function to install tidymetrics from GitHub
Using cross_by_dimensions function from tidymetrics package to get aggregations at different levels of multiple dimensions
Using cross_by_periods function from tidymetrics package to also get aggregations for different intervals (e.g, month, quarter, year)
Using use_metrics_scaffold function from tidymetrics package to create framework for documenting dimensions in RMarkdown YAML header
Using create_metrics function from tidymetrics package to save data as a tibble with useful metadata (good for visualizing interactively)
Using preview_metric function from shinymetrics package (still under development as of 2020-04-24) to demonstrate shinymetrics
Succesfuly getting shinymetrics to work
Explanation of the shinymetrics bug David ran into
Changing order of ordinal variable (e.g., "1,000 to 10,000" and "10,000 to 20,000") using the parse_number, fct_lump, and coalesce functions
Asking, "Where is beer produced?"
Looking up sf package documentation to refresh memory on how to draw state borders for a map
Using match function and state.abb vector (state abbreviations) from sf package to perform a lookup of state names
Using geom_sf function (and working through some hiccoughs) to create a choropleth map
Using theme_map function from ggthemes package to get more appropriate styling for maps
Experimenting with how to get the legend to display in the bottom right corner
Starting to build an animation of consumption patterns over time using gganimate package
Getting the year being animated to show up in the title of a gganimate map
Summary of screencast
Spotting a mistake in a group_by call causing the percentages not to add up properly
Brief extra overview of tidymetrics code