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

Empty institution lineage #158

Merged
merged 6 commits into from
Aug 30, 2023

Conversation

yjunechoe
Copy link
Collaborator

Following #155, this PR ensures that missing author "lineage" information is coded as NA and applies the same fix for works2df() to authors2df().

Related: #154 , #156 , #157

Coincidentally, fixing authors2df() also resolved the last remaining error in tests involving oa_random(), where the following line was sometimes returning dfs longer than 20 rows because multiple lineages would get unnested longer into duplicate entries of the author in authors2df().

random_authors <- oa_fetch(entity = "authors", options = list(sample = 20))

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.

Thank you for this thorough PR, @yjunechoe! 🚀 Also great work on fixing oa_random as well. I didn't get to look closely at that when the test failed one time.

I don't think we have addressed the NA discussion here, but Oh wait I think you did with empty_inst, so plz feel free to merge when you're ready.

@yjunechoe
Copy link
Collaborator Author

Oh wait I think you did with empty_inst

Oops ya that wasn't very clear/intuitive - re-running the reprex on the PR!

oa_fetch(identifier = "W1981492994")$author[[1]]$institution_lineage
#> [1] NA                               "https://openalex.org/I51556381"

@yjunechoe yjunechoe merged commit 2c84b8c into ropensci:main Aug 30, 2023
9 checks passed
@yjunechoe yjunechoe deleted the empty-institution-lineage branch August 30, 2023 16:45
@yjunechoe
Copy link
Collaborator Author

yjunechoe commented Aug 30, 2023

Pinging @massimoaria - all checks are passing on main with this PR merged, so I think we have a resubmission version ready!

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.

2 participants