-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
81 lines (65 loc) · 2.25 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# lbjdata
<!-- badges: start -->
<!-- badges: end -->
The goal of lbjdata is to provide custom themes and resources for projects related to the LBJ School's Data Initiatives.
## Installation
You can install the development version of `{lbjdata}` from [Github](https://github.com/utexas-lbjp-data/lbjdata) with:
``` r
devtools::install_github("utexas-lbjp-data/lbjdata")
```
## Example
This is a basic example which shows you how to solve a common problem:
```{r example}
library(lbjdata)
library(ggplot2)
library(readr)
library(dplyr)
library(tidyr)
```
What is special about using `README.Rmd` instead of just `README.md`? You can include R chunks like so:
```{r provider_chart, message=FALSE, warning=FALSE}
provider_types <- read_csv("https://genesis.soc.texas.gov/files/accessibility/vaccineprovideraccessibilitydata.csv") %>%
group_by(type = TYPE) %>%
summarise(tot_shipped = sum(Total_Shipped),
tot_avail = sum(VACCINES_AVAILABLE)) %>%
drop_na() %>%
arrange(desc(tot_shipped))
```
```{
provider_types %>%
ggplot() +
geom_col(aes(x=reorder(type, desc(tot_shipped)),
y = tot_shipped,
fill=type)) +
geom_text(angle=90, color="#2d2d2d", size = 3.1, family = "LibreFranklin-Bold",
aes(y= 0, x=type, label = type), hjust = 0) +
theme_lbj() +
theme(axis.text.x = element_blank()) +
labs(title = "Vaccine Supply, By Type of Provider",
subtitle = "Source: Texas Department of State Health Services")
```
```{r echo=FALSE, message=FALSE, fig.width=10, fig.retina=2, warning=FALSE}
provider_types %>%
ggplot() +
geom_col(aes(x=reorder(type, desc(tot_shipped)),
y = tot_shipped,
fill=type)) +
geom_text(angle=90, color="#2d2d2d", size = 3.1, family = "LibreFranklin-Bold",
aes(y= 0, x=type, label = type), hjust = 0) +
theme_lbj() +
theme(axis.text.x = element_blank()) +
labs(title = "Vaccine Supply, By Type of Provider",
subtitle = "Source: Texas Department of State Health Services")
```