Created
November 3, 2021 13:33
-
-
Save ChrisBeeley/9177c59c8cd4f18959fb90ced7762e72 to your computer and use it in GitHub Desktop.
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
--- | |
title: "Parameterised Reporting" | |
author: "Tina Simms" | |
date: "03/11/2021" | |
output: html_document | |
params: | |
month: | |
label: "Month of the Year" | |
value: January | |
input: select | |
choices: [January, February, March, April] | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_knit$set(root.dir = "../") | |
if (!require("pacman")) install.packages("pacman"); library(pacman) | |
p_load(tidyverse, lubridate, readxl, shiny) | |
``` | |
### My Time of Access Viz | |
```{r, fig.width = 10} | |
dat <- read_xlsx("data/TOA_Data.xlsx") | |
dat %>% | |
group_by(Month, Hour_Start) %>% | |
summarise(count = sum(count, na.rm = T)) %>% | |
ggplot() + | |
geom_point(aes(x = as.numeric(Hour_Start), y = count, color = Month)) + | |
geom_line(aes(x = as.numeric(Hour_Start), y = count, color = Month, group = Month)) + | |
scale_x_continuous(breaks = seq(0,23,1)) + | |
theme_classic() | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment