Skip to content
This repository was archived by the owner on Jan 23, 2024. It is now read-only.

Commit 3dacd6b

Browse files
Update summary_queries.R
uncoupled year form event field
1 parent c545c64 commit 3dacd6b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

R/summary_queries.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ get_sa_project_summary = function(
146146
surveyEventId
147147
surveyTypeId
148148
event
149+
date
149150
verified
150151
missing
151152
}
@@ -161,9 +162,9 @@ get_sa_project_summary = function(
161162
cont_df = as.data.frame(cont_json$data$allVwAcousticSummaries$nodes,
162163
stringsAsFactors = FALSE)
163164
names(cont_df) = tolower(gsub("(?<=[a-z0-9])(?=[A-Z])", "_", names(cont_df), perl = TRUE))
164-
# Add a year field that is a string split from the event field
165+
# Add a year field that is a string split from the date field
165166
if (dim(cont_df)[1] > 0){
166-
cont_df$year = as.integer(gsub("^.* ", "", cont_df$event))
167+
cont_df$year = as.integer(gsub("^.* ", "", cont_df$date))
167168
row.names(cont_df) = NULL
168169
}
169170

0 commit comments

Comments
 (0)