google_piechart | R Documentation |
Google-style piechart
google_piechart( input_data, caption, colors = NULL, ..., width = 800, height = 600, plot = TRUE, verbose = FALSE )
input_data |
data frame |
... |
arguments to gvisPieChartgoogleVis |
width |
in pixels |
height |
in pixels |
REQUIRES AN INTERNET CONNECTION to display the visualization
library(inventory) BY2011_NOx_2015 <- BY2011_annual %>% filter(year == 2015, pol_abbr == "NOx") BY2011_NOx_2015_by_cnty <- BY2011_NOx %>% annual_emissions_by(cnty_abbr) BY2011_NOx_2015_by_cnty %>% dplyr::select(cnty_abbr, ems_qty) %>% arrange(ems_qty) %>% google_piechart(caption = "2015 NOx emissions (Source: BY2011)")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.