data-raw/shape_counts.R

## prepares data set for total number of shapes (for bar chart)

library(tidyverse)


sightings <- read_csv("data-raw/sightings.csv")

shape_counts <- sightings %>%
  replace_na(list(shape = "unknown")) %>%
  count(shape, name = "sightings") %>%
  mutate(shape = fct_reorder(shape, -sightings))


usethis::use_data(shape_counts, overwrite = TRUE)
asbates/ufo.sightings documentation built on Jan. 20, 2021, 3:33 a.m.