Last active
January 29, 2020 06:02
-
-
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')
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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