knitr::include_graphics("./squirrel.jpg")
In this presentation the squirrels from Central Park are shown by color. Data:NYC squirrel Census.
3/28/2021
knitr::include_graphics("./squirrel.jpg")
In this presentation the squirrels from Central Park are shown by color. Data:NYC squirrel Census.
squirrels <- read.csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2019/2019-10-29/nyc_squirrels.csv")
squirrels <- squirrels %>% select(1:2, 9)
squirrels <- squirrels[complete.cases(squirrels), ]
head(squirrels)
## long lat primary_fur_color ## 2 -73.95704 40.79485 Gray ## 3 -73.97683 40.76672 Cinnamon ## 4 -73.97572 40.76970 Gray ## 6 -73.95657 40.79026 Gray ## 7 -73.97197 40.76930 Gray ## 8 -73.96026 40.79429 Gray
pal <- c("black", "brown", "gray")
map <- plot_ly(squirrels,
= ~lat,
y = ~long,
type = "scatter",
color = ~factor(primary_fur_color),
colors = pal)
map