Skip to content

Instantly share code, notes, and snippets.

@SaranjeetKaur
Last active January 29, 2020 06:02
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 SaranjeetKaur/6e0e359a13d1ce4f71c080daeccbf9b4 to your computer and use it in GitHub Desktop.
Save SaranjeetKaur/6e0e359a13d1ce4f71c080daeccbf9b4 to your computer and use it in GitHub Desktop.
Code for TidyTuesday week 5 (A map of trees planted in San Francisco, according to their 'caretaker')
install.packages("tidyverse")
library(tidyverse)
trees_SF <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-01-28/sf_trees.csv')
trees_SF <- na.omit(trees_SF)
trees_map_SF <- ggplot2::ggplot(data = trees_SF, aes(x = longitude, y = latitude, colour = caretaker)) +
geom_point() +
labs(x = 'Longitude', y = 'Latitude', title = 'Trees in San Franscisco & their caretakers') +
xlim(min(trees_SF$longitude), max(trees_SF$longitude)) +
ylim(min(trees_SF$latitude), max(trees_SF$latitude))
trees_map_SF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment