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

Parse Works objects publication_date field as date type #283

Merged
merged 2 commits into from
Sep 30, 2024

Conversation

yjunechoe
Copy link
Collaborator

@yjunechoe yjunechoe commented Sep 26, 2024

The as.Date() conversion of the publication_date gets the job done but is clunky and applied very narrowly.

I went through the API docs and there are only the two other places where the API returns date values: updated_date and created_date. These are OpenAlex-specific metadata and oa2df() sometimes returns them depending on the entity. I have less thoughts on these guys.

Date values aren't automatically converted by the JSON parser, like how integer/double/logical/etc. are - not sure if we want a bigger discussion around that (but perhaps at least not at this stage, given how rare date fields are?)

@yjunechoe yjunechoe linked an issue Sep 26, 2024 that may be closed by this pull request
@yjunechoe yjunechoe marked this pull request as draft September 26, 2024 21:37
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 marked this pull request as ready for review September 30, 2024 10:27
@yjunechoe yjunechoe merged commit c710bf2 into ropensci:main Sep 30, 2024
7 checks passed
@yjunechoe yjunechoe deleted the process-publication_date branch September 30, 2024 10:27
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.

Parsing date fields
2 participants