Skip to content

Instantly share code, notes, and snippets.

Avatar

Harris McGehee harrismcgehee

View GitHub Profile
@harrismcgehee
harrismcgehee / label_ends_of_ecdf.Rmd
Last active Dec 22, 2017
Plot ECDF with arbitrary labels
View label_ends_of_ecdf.Rmd
---
title: "ecdf"
output:
html_document:
keep_md: yes
---
```{r}
suppressPackageStartupMessages(library(tidyverse))
```
@harrismcgehee
harrismcgehee / circle_map_annotation
Created Mar 10, 2017
Annotate map with circles
View circle_map_annotation
# Prep ----
library(ggplot2)
crimes <- data.frame(state = tolower(rownames(USArrests)), USArrests)
crimesm <- reshape2::melt(crimes, id = 1)
states_map <- map_data("state")
# Make your map ------
map <- ggplot(crimes, aes(map_id = state)) +
geom_map(aes(fill = UrbanPop), map = states_map) +