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

oa_request() results length discrepancy between systems #317

Open
yjunechoe opened this issue Feb 4, 2025 · 0 comments
Open

oa_request() results length discrepancy between systems #317

yjunechoe opened this issue Feb 4, 2025 · 0 comments

Comments

@yjunechoe
Copy link
Collaborator

yjunechoe commented Feb 4, 2025

Ok so I'm not 100% sure but it seems that these lines from check() are from the problematic oa_fetch() test for you:

Requesting url: https://api.openalex.org/works?filter=title.search%3Abibliometric%20analysis%7Cscience%20mapping%2Ccited_by_count%3A%3E50%2Cfrom_publication_date%3A2021-01-01%2Cto_publication_date%3A2021-12-31&select=id
Getting 1 page of results with a total of 190 records...
Requesting url: https://api.openalex.org/works?filter=title.search%3Abibliometric%20analysis%7Cscience%20mapping%2Ccited_by_count%3A%3E50%2Cfrom_publication_date%3A2021-01-01%2Cto_publication_date%3A2021-12-31&select=id
Using basic paging...
Getting 3 pages of results with a total of 30 records...

But those are the same query URLs that I see too! Weirdly, the first URL only fetched 190 records for you, whereas for me that fetches 191 records.

Can you confirm that this is the case by running this code? do you get a different length?

w0_url <- "https://api.openalex.org/works?filter=title.search%3Abibliometric%20analysis%7Cscience%20mapping%2Ccited_by_count%3A%3E50%2Cfrom_publication_date%3A2021-01-01%2Cto_publication_date%3A2021-12-31&select=id"
w0_url %>% oa_request() %>% length()
#> [1] 191
❯ R
Using 18 cores for parallelisation
> devtools::load_all()
ℹ Loading openalexR
openalexR v2.0.0 introduces breaking changes.
See NEWS.md for details.

To suppress this message, add `openalexR.message = suppressed` to your .Renviron file.
> w0_url <- "https://api.openalex.org/works?filter=title.search%3Abibliometric%20analysis%7Cscience%20mapping%2Ccited_by_count%3A%3E50%2Cfrom_publication_date%3A2021-01-01%2Cto_publication_date%3A2021-12-31&select=id"
w0_url %>% oa_request() %>% length()
[1] 190

Originally posted by @raffaem in #316 (comment)

@yjunechoe yjunechoe mentioned this issue Feb 4, 2025
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

No branches or pull requests

1 participant