README.md

ogreleases

A selection of Government of Ontario press releases scraped from the Ontario Newsroom. This information is © Queen’s Printer for Ontario, 2020, and is to be used for teaching and research.

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("chris31415926535/ogreleases")

Example

This example shows how to load the data, count the number of press releases from each source, and plot the results:

library(tidyverse)
library(ogreleases)

## load the data

df <- ogreleases::ogreleases_data

# who issued the most press releases?
df %>%
  group_by(issuer) %>%
  summarise(count=n()) %>%
  ggplot() +
    geom_col(aes(x=reorder(issuer, count), y=count)) +
    coord_flip() +
    theme_minimal() +
    labs(
      title="Press Releases by Source, Jan 2019 - Sept 2020",
      x=NULL, y = NULL
    )



chris31415926535/ogreleases documentation built on Sept. 18, 2020, 12:03 a.m.