Upgrade to Pro — share decks privately, control downloads, hide ads and more …

From Static ggplot2 to Interactive Plotly to Sh...

From Static ggplot2 to Interactive Plotly to Shiny App

A live-coding presentation from PharmaSUG 2019 - June, 19
Based on Code originally developed by Sean Lopp and Phil Bowsher
https://github.com/philbowsher/PharmaSUG-2019-Creating-Sharing-Shiny-Apps-Gadgets

kellobri

June 19, 2019
Tweet

More Decks by kellobri

Other Decks in Programming

Transcript

  1. Develops free and open tools for R as well as

    enterprise-ready professional products for teams to scale and share work.
  2. • Making R Approachable • Making Day-to-Day R Tidy •

    Making R Insights Easy to Leverage • Preparing R for the next generation of data science • Making R Interoperable Future Open Source Work in R
  3. Access Understand Communicate Learn R by following the Data Science

    workflow: Get access to a meaningful dataset Build a visual understanding of the data Share that analysis with someone else
  4. Goal: Explore adverse events for different brand name drugs -

    Adverse events (openFDA) - Drug composition (RxNorm)
  5. Access Data Sources: OpenFDA APIs, RxNorm Google BigQuery BigQuery is

    Google's fully managed, petabyte scale, low cost analytics data warehouse. A public dataset is any dataset that is stored in BigQuery and made available to the general public through the Google Cloud Public Dataset Program. You pay only for the queries that you perform on the data (the first 1 TB per month is free). R package: rOpenHealth/openfda Simple helpers for accessing the OpenFDA API from R. R package: bigrquery The bigrquery package makes it easy to work with data stored in Google BigQuery by allowing you to query BigQuery tables and retrieve metadata about your projects, datasets, tables, and jobs. The dplyr interface lets you treat BigQuery tables as if they are in-memory data frames.
  6. Static Visualization: ggplot2 Dataset + Aesthetic Mapping + Layers (Geometry,

    Faceting, Labels) Cheat to win: ggthemes Export: Save as Image / PDF - Pros: Simple, reproducible workflow - Limitations: Saving and sharing a lot of plots (versioning)