Skip to content

Instantly share code, notes, and snippets.

@arvi1000
Last active December 13, 2019 21:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arvi1000/1bee5927bd9cf6a262ffb1b455362641 to your computer and use it in GitHub Desktop.
Save arvi1000/1bee5927bd9cf6a262ffb1b455362641 to your computer and use it in GitHub Desktop.
How many bikes histogram
library(tidyverse)
dat <-
"name, bike_count
Reid, 4
John, 3
The_Meat, 8
MatthewS, 2
Pinche, 4
arvi1000, 4
JustinAugust, 3
Olli, 6
swirving, 3
Joel, 13
Dirt Drops, 9
searnlerner, 12
Stuart, 4
plattyjo, 8
andydadyt, 1
geojoek, 5
jtbadge, 5
gothbrooks, 3
n8, 4
haloo, 2
igor, 9
igor_fronche, 6
Emory, 4
hobo, 13
darkshot, 5
Jim N, 6
Willow, 2
bucketmania, 4
ryanisinallofus, 2" %>%
read_csv
dat %>%
group_by(bike_count) %>%
tally() %>%
ggplot(aes(bike_count, n)) +
geom_col() +
theme_light() +
theme(panel.grid.minor = element_blank(),
panel.grid.major.x = element_blank()) +
scale_x_continuous(breaks=(0:max(dat$bike_count))) +
labs(title='BCC Bike Census - Stable Size',
subtitle = paste(nrow(dat), 'users reporting'))
@arvi1000
Copy link
Author

image

@arvi1000
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment