CornellLabofOrnithology / auk

Working with eBird data in R
https://CornellLabofOrnithology.github.io/auk/
GNU General Public License v3.0
136 stars 20 forks source link

an error message when using auk_filter #71

Open huckbuc opened 1 year ago

huckbuc commented 1 year ago

Hi,

I am new to auk, but have a lot of experience with R. I am trying to work through the "Best Practices" guide, but got stuck in the "Data extraction with auk" section, as I am getting an error message "Error running AWK command" after running the auk_filter command.

Here are more details:

library(auk)
library(lubridate)
library(sf)
library(gridExtra)
library(tidyverse)

select <- dplyr::select

dir.create("data", showWarnings = FALSE)

ebd_main_file <- "C:/ebird_data/ebd_IL_relOct-2022.txt"
ebd_main_sampling_file <- "C:/ebird_data/ebd_sampling_relOct-2022.txt"

ebd <- auk_ebd(ebd_main_file, 
               file_sampling = ebd_main_sampling_file)

ebd_filters <- ebd %>% 
  auk_date(date = c("2020-06-01", "2020-06-30")) %>% 
  auk_protocol(protocol = c("Stationary", "Traveling")) %>% 
  auk_complete()
ebd_filters

data_dir <- "data"
if (!dir.exists(data_dir)) {
  dir.create(data_dir)
}

f_ebd <- file.path(data_dir, "ebd_june_2020_IL.txt")
f_sampling <- file.path(data_dir, "ebd_checklists_june_2020_IL.txt")

What am I missing? Will greatly appreciate any help!