Import data

# excel file
ufo_sightings <- read_excel("../00_data/myData_Shoals.xlsx")
ufo_sightings
## # A tibble: 96,429 × 13
##    reported_date_time  reported_date_time_utc posted_date         city     state
##    <dttm>              <dttm>                 <dttm>              <chr>    <chr>
##  1 2022-08-29 02:03:00 2022-08-29 02:03:00    2022-09-09 00:00:00 Pinehur… NC   
##  2 2022-08-19 21:51:00 2022-08-19 21:51:00    2022-10-08 00:00:00 Rapid C… MI   
##  3 2022-08-13 01:30:00 2022-08-13 01:30:00    2022-09-09 00:00:00 Clevela… OH   
##  4 2022-08-06 17:00:00 2022-08-06 17:00:00    2022-09-09 00:00:00 Bloomin… IN   
##  5 2022-08-04 03:40:00 2022-08-04 03:40:00    2022-09-09 00:00:00 Irvine   CA   
##  6 2022-07-22 12:00:00 2022-07-22 12:00:00    2022-09-09 00:00:00 Moore    OK   
##  7 2022-07-19 12:27:00 2022-07-19 12:27:00    2022-09-09 00:00:00 Short P… VA   
##  8 2022-07-14 14:56:00 2022-07-14 14:56:00    2022-09-09 00:00:00 Norwalk  CT   
##  9 2022-07-13 15:40:00 2022-07-13 15:40:00    2022-09-09 00:00:00 Blayney  New …
## 10 2022-07-13 00:10:00 2022-07-13 00:10:00    2022-09-09 00:00:00 Greybull WY   
## # ℹ 96,419 more rows
## # ℹ 8 more variables: country_code <chr>, shape <chr>, reported_duration <chr>,
## #   duration_seconds <dbl>, summary <chr>, has_images <lgl>, day_part <chr>,
## #   Time <dttm>

State one question

# How does day part and shape compare?

Plot data

ufo_sightings <- ufo_sightings %>% 
    add_count(shape, name = "count")

night_shape <- ufo_sightings %>% 
  filter(day_part %in% c("night") & shape %in% c("formation", "light", "disk", "flash", "fireball", "star", "orb"))
night_shape
## # A tibble: 21,315 × 14
##    reported_date_time  reported_date_time_utc posted_date         city     state
##    <dttm>              <dttm>                 <dttm>              <chr>    <chr>
##  1 2023-03-26 21:05:00 2023-03-26 21:05:00    2023-04-09 00:00:00 Palm Be… FL   
##  2 2023-03-21 21:09:00 2023-03-21 21:09:00    2023-04-09 00:00:00 Barnegat NJ   
##  3 2023-03-04 20:03:00 2023-03-04 20:03:00    2023-03-06 00:00:00 Myrtle … SC   
##  4 2023-02-27 00:15:00 2023-02-27 00:15:00    2023-03-06 00:00:00 Rosedale MD   
##  5 2023-02-22 20:15:00 2023-02-22 20:15:00    2023-03-06 00:00:00 Silver … MD   
##  6 2023-02-03 05:30:00 2023-02-03 05:30:00    2023-03-06 00:00:00 Ajax     ON   
##  7 2023-02-02 18:45:00 2023-02-02 18:45:00    2023-03-06 00:00:00 Garfield NJ   
##  8 2023-01-26 03:40:00 2023-01-26 03:40:00    2023-03-06 00:00:00 Montcla… CA   
##  9 2023-01-25 03:00:00 2023-01-25 03:00:00    2023-03-06 00:00:00 tampa    FL   
## 10 2023-01-08 04:00:00 2023-01-08 04:00:00    2023-03-06 00:00:00 New Yor… NY   
## # ℹ 21,305 more rows
## # ℹ 9 more variables: country_code <chr>, shape <chr>, reported_duration <chr>,
## #   duration_seconds <dbl>, summary <chr>, has_images <lgl>, day_part <chr>,
## #   Time <dttm>, count <int>
ggplot(data = night_shape) + 
  geom_bar(mapping = aes(x = shape))

afternoon_shape <- ufo_sightings %>% 
  filter(day_part %in% c("afternoon") & shape %in% c("formation", "light", "disk", "flash", "fireball", "star", "orb"))
afternoon_shape
## # A tibble: 3,740 × 14
##    reported_date_time  reported_date_time_utc posted_date         city     state
##    <dttm>              <dttm>                 <dttm>              <chr>    <chr>
##  1 2023-05-16 22:00:00 2023-05-16 22:00:00    2023-05-19 00:00:00 Tucson   AZ   
##  2 2023-05-15 16:35:00 2023-05-15 16:35:00    2023-05-19 00:00:00 Fenton   MI   
##  3 2023-04-17 18:58:00 2023-04-17 18:58:00    2023-05-19 00:00:00 Tomball  TX   
##  4 2023-04-14 17:18:00 2023-04-14 17:18:00    2023-05-19 00:00:00 temple   GA   
##  5 2023-03-25 19:30:00 2023-03-25 19:30:00    2023-04-09 00:00:00 alma     AR   
##  6 2023-02-20 18:00:00 2023-02-20 18:00:00    2023-03-06 00:00:00 Hartford WI   
##  7 2022-10-31 15:32:00 2022-10-31 15:32:00    2022-12-22 00:00:00 New Por… FL   
##  8 2022-10-09 08:34:00 2022-10-09 08:34:00    2022-12-22 00:00:00 Norwich  ENG  
##  9 2022-10-01 20:55:00 2022-10-01 20:55:00    2022-12-22 00:00:00 Edmonton AB   
## 10 2022-09-24 21:30:00 2022-09-24 21:30:00    2022-10-08 00:00:00 Las Veg… NV   
## # ℹ 3,730 more rows
## # ℹ 9 more variables: country_code <chr>, shape <chr>, reported_duration <chr>,
## #   duration_seconds <dbl>, summary <chr>, has_images <lgl>, day_part <chr>,
## #   Time <dttm>, count <int>
ggplot(data = afternoon_shape) + 
  geom_bar(mapping = aes(x = shape))

morning_shape <- ufo_sightings %>% 
  filter(day_part %in% c("morning") & shape %in% c("formation", "light", "disk", "flash", "fireball", "star", "orb"))
morning_shape
## # A tibble: 2,328 × 14
##    reported_date_time  reported_date_time_utc posted_date         city     state
##    <dttm>              <dttm>                 <dttm>              <chr>    <chr>
##  1 2023-04-03 12:04:00 2023-04-03 12:04:00    2023-05-19 00:00:00 Glouces… MA   
##  2 2023-04-02 07:12:00 2023-04-02 07:12:00    2023-04-09 00:00:00 Leslie   MI   
##  3 2022-11-23 11:27:00 2022-11-23 11:27:00    2022-12-22 00:00:00 Indepen… OH   
##  4 2022-10-02 15:11:00 2022-10-02 15:11:00    2022-10-08 00:00:00 San Ber… CA   
##  5 2022-09-25 10:56:00 2022-09-25 10:56:00    2022-10-08 00:00:00 Arlingt… VA   
##  6 2022-09-11 08:20:00 2022-09-11 08:20:00    2022-10-08 00:00:00 Anoka    MN   
##  7 2022-07-20 11:00:00 2022-07-20 11:00:00    2022-09-09 00:00:00 Vero be… FL   
##  8 2022-07-08 13:14:00 2022-07-08 13:14:00    2022-12-22 00:00:00 Merida   Yuca…
##  9 2022-06-06 14:06:00 2022-06-06 14:06:00    2022-06-22 00:00:00 Sacrame… CA   
## 10 2022-05-27 07:30:00 2022-05-27 07:30:00    2022-06-22 00:00:00 Palm Bay FL   
## # ℹ 2,318 more rows
## # ℹ 9 more variables: country_code <chr>, shape <chr>, reported_duration <chr>,
## #   duration_seconds <dbl>, summary <chr>, has_images <lgl>, day_part <chr>,
## #   Time <dttm>, count <int>
ggplot(data = morning_shape) + 
  geom_bar(mapping = aes(x = shape))

Interpret

# People see a "light" shaped UFO significantly more at night than any other time. This may be due to satellites orbiting Earth appear to be a moving light but are in fact human technology.