Skip to content

Instantly share code, notes, and snippets.

@AlexJF12
Created January 2, 2017 04:48
Show Gist options
  • Select an option

  • Save AlexJF12/4bc615db1e7bc5781b81b76440ca9863 to your computer and use it in GitHub Desktop.

Select an option

Save AlexJF12/4bc615db1e7bc5781b81b76440ca9863 to your computer and use it in GitHub Desktop.
DC Bike Time Heatmap
library(ggplot2)
ggplot(bike_time_heatmap, aes(x = days, y = start.hour, fill = n)) +
scale_fill_viridis(name="# of Rides", option = "C",
limits = c(0, max(bike_time_heatmap$n))) +
geom_tile(color = "white", size = 0.4) +
theme_minimal() +
scale_y_reverse() +
labs(title = "DC Bikeshare: Heatmap of Rides taken per Hour",
x = "Day of the Week", y = "Starting Hour",
subtitle = "July 1, 2015 to June 30, 2016",
caption = "Data from: https://s3.amazonaws.com/capitalbikeshare-data/index.html")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment