Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flatten df chunks #198

Merged
merged 2 commits into from
Jan 31, 2024
Merged

flatten df chunks #198

merged 2 commits into from
Jan 31, 2024

Conversation

yjunechoe
Copy link
Collaborator

Resolves #197

This PR changes the rbind() to bind over single rows vs. chunks (of up to 50).

The reprex in #197 fetches info about the 51 author IDs in two chunks - 1-50 and 51. Instead of binding the 50-row df to the 1-row df (which caused a cryptic column incompatibility error), the PR un-does the chunking right before rbind() to ensure that it receives 51 1-row dfs. This resolves the error because it lets rbind() make better guesses about the most compatible column type across the dfs.

@yjunechoe
Copy link
Collaborator Author

yjunechoe commented Jan 29, 2024

FYI tests failing from oa_ngrams because the ngrams API is down (none of the links in the docs work atm - https://docs.openalex.org/api-entities/works/get-n-grams).

Reminding myself to re-run the GHAs at a later time (they seem to be slowly coming back online, but the ones we use in test are still down)

Copy link
Collaborator

@trangdata trangdata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@yjunechoe yjunechoe merged commit f347c28 into ropensci:main Jan 31, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

oa_fetch authors returns "Error in rbind(deparse.level, ...) : numbers of columns of arguments do not match"
2 participants