-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathREADME.Rmd
48 lines (41 loc) · 1.38 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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# uscolleges
The uscolleges package provides a tidy version of the most recent College Scorecards from the US Department of Education.
## Installation
You can install the development version from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("jonthegeek/uscolleges")
```
## Example
```{r example, fig.height=6, message=FALSE, warning=FALSE}
library(dplyr)
library(ggplot2)
uscolleges::uscolleges %>%
filter(location.lon > -130, location.lon < 0, location.lat > 20) %>%
filter(degrees_awarded.highest %in% c("Bachelor's degree", "Graduate degree")) %>%
filter(degrees_awarded.predominant != "Entirely graduate-degree granting") %>%
filter(!(carnegie_size_setting %in% c("Exclusively graduate/professional", "Not applicable"))) %>%
ggplot() +
aes(x = location.lon, y = location.lat) +
aes(color = carnegie_size_setting) +
geom_point() +
theme_void() +
theme(
legend.position = "bottom",
legend.title = element_blank()
) +
guides(color = guide_legend(nrow = 7)) +
ggtitle("Continental US 4-Year Colleges")
```