Skip to content

Commit

Permalink
Bugfix airtable import
Browse files Browse the repository at this point in the history
  • Loading branch information
hughjonesd committed May 27, 2024
1 parent c9b8345 commit f5ba812
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ the [Unjournal coda.io project management website](https://coda.io/d/Project-Man
# Descriptive work

[x] What are we evaluating? How many papers in total? In what subfields? What does our “funnel” (selection process of candidate papers) look like?
(DR @DHJ -- can you point to the place to find these?)

[ ] How’s our process? How many papers per month? Turnaround times?
Numbers of evaluators per paper?
Expand Down
14 changes: 7 additions & 7 deletions code/import-unjournal-data.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ base_id <- "applDG6ifmUmeEJ7j" # new ID to cover "UJ - research & core members"

pub_records <- air_select(base = base_id, table = "crucial_rsx")
all_pub_records <- pub_records
# 100 is the maximum length returned
while(nrow(pub_records) == 100) {
# Get the ID of the last record in the list
offset <- get_offset(pub_records)
# Fetch the next records, starting after this ID
pub_records <- air_select(base = base_id, table = "crucial_rsx", offset = offset)
# Append the records to the df
offset <- get_offset(pub_records)

# the offset is only returned while there are more records
while(! is.null(offset)) {
pub_records <- air_select(base = base_id, table = "crucial_rsx",
offset = offset)
all_pub_records <- bind_rows(all_pub_records, pub_records)
offset <- get_offset(pub_records)
}
rm(pub_records)

Expand Down

0 comments on commit f5ba812

Please sign in to comment.