Skip to content

Instantly share code, notes, and snippets.

View harrismcgehee's full-sized avatar

Harris McGehee harrismcgehee

View GitHub Profile
@harrismcgehee
harrismcgehee / label_ends_of_ecdf.Rmd
Last active December 22, 2017 22:23
Plot ECDF with arbitrary labels
---
title: "ecdf"
output:
html_document:
keep_md: yes
---
```{r}
suppressPackageStartupMessages(library(tidyverse))
```
@harrismcgehee
harrismcgehee / circle_map_annotation
Created March 10, 2017 14:03
Annotate map with circles
# 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) +