muschellij2 / rscopus

Scopus Database API Interface to R
74 stars 16 forks source link

Get more than 25 articles from ISSN #4

Closed Belzun closed 6 years ago

Belzun commented 6 years ago

When I execute x <- generic_elsevier_api(query = "ISSN(0004-3702) AND YEAR(2001)", search_type = "scopus") x$content$search-results$opensearch:totalResults`` I get 66 as results obtained, but I can't see more than 25, that are the first page. How can I get all the results?

Thanks for this package!!

muschellij2 commented 6 years ago

You have to loop over the next query yourself. I don’t remember where but it is in the result

On Sat, Jan 13, 2018 at 9:10 AM Belzun notifications@github.com wrote:

When I execute x <- generic_elsevier_api(query = "ISSN(0004-3702) AND YEAR(2001)", search_type = "scopus") x$content$search-results$opensearch:totalResults`` I get 66 as results obtained, but I can't see more than 25, that are the first page. How can I get all the results?

Thanks for this package!!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/muschellij2/rscopus/issues/4, or mute the thread https://github.com/notifications/unsubscribe-auth/ABBnrjeTn_bHZf0AH5fdm9-lZm9G0oTjks5tKNVggaJpZM4RdRiu .

-- John

Belzun commented 6 years ago

I am not able to see more than 25 results. I have tried adding more information to my query, such as COUNT(1), or PAGE(1) and similar things, but nothing worked.

muschellij2 commented 6 years ago

You need to call the next call to the api yourself. The count is maxed out at 25

On Sun, Jan 14, 2018 at 5:17 AM Belzun notifications@github.com wrote:

I am not able to see more than 25 results. I have tried adding more information to my query, such as COUNT(1), or PAGE(1) and similar things, but nothing worked.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/muschellij2/rscopus/issues/4#issuecomment-357511286, or mute the thread https://github.com/notifications/unsubscribe-auth/ABBnrvNCqFj92VHilLgVNZ7dvU1qWMONks5tKf5VgaJpZM4RdRiu .

-- John

Belzun commented 6 years ago

So this package won't help me getting more than 25 results?

muschellij2 commented 6 years ago

Not currently.

On Sun, Jan 14, 2018 at 9:47 AM Belzun notifications@github.com wrote:

So this package won't help me with getting more than 25?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/muschellij2/rscopus/issues/4#issuecomment-357528674, or mute the thread https://github.com/notifications/unsubscribe-auth/ABBnrgvtmTn3wvj6UQqjY4TmhR0TsvFFks5tKj3HgaJpZM4RdRiu .

-- John

muschellij2 commented 6 years ago

This will get you started.

devtools::install_github("muschellij2/rscopus")
x <- generic_elsevier_api(
query = "ISSN(0004-3702) AND YEAR(2001)", 
search_type = "scopus")
x$content$`search-results`$`opensearch:totalResults`
[1] "66"
xx = get_next(x)
length(xx$content$`search-results`$entry)
[1] 25
xxx = get_next(xx)
length(xxx$content$`search-results`$entry)
Belzun commented 6 years ago

Thank you very much for this. The first get_next() works fine, but the second get_next() and the following ones don't work, they return the same result. xx = get_next(x) works well.

xxx = get_next(xx) doesn't work.

muschellij2 commented 6 years ago

What do you mean by they don’t work

On Tue, Jan 16, 2018 at 2:02 AM Belzun notifications@github.com wrote:

Thank you very much for this. The first get_next() works fine, but the second get_next() and the following ones don't work, they return the same result. xx = get_next(x) works well.

xxx = get_next(xx) xxxx = get_next(xxx) don't work.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/muschellij2/rscopus/issues/4#issuecomment-357911061, or mute the thread https://github.com/notifications/unsubscribe-auth/ABBnrhJBYwuNGNKUH5mC1uDcMo-JOJ9sks5tLHOogaJpZM4RdRiu .

-- John

Belzun commented 6 years ago

If I apply get_next() to the one obtained with get_next(), I don't get the next page. For example: x <- generic_elsevier_api(query = "ISSN(0004-3702) AND YEAR(2001)", search_type = "scopus") It returns from 1 to 25. xx = get_next(x) Returns 26 to 50. xxx = get_next(xx) Returns the same as xx, from 26 to 50, not 51 to 75 (66 in this case).

muschellij2 commented 6 years ago

This seems like an issue with their API - please provide me a link to the message you are sending to their feedback ( https://service.elsevier.com/app/overview/scopus/)

Use get_last for the last set of records.

Best, John

On Tue, Jan 16, 2018 at 9:39 AM, Belzun notifications@github.com wrote:

If I apply get_next() to the one obtained with get_next(), I don't get the next page. For example: x <- generic_elsevier_api(query = "ISSN(0004-3702) AND YEAR(2001)", search_type = "scopus") It returns from 1 to 25. xx = get_next(x) Returns 26 to 50. xxx = get_next(xx) Returns the same as xx, from 26 to 50, not 51 to 75 (66 in this case).

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/muschellij2/rscopus/issues/4#issuecomment-358043254, or mute the thread https://github.com/notifications/unsubscribe-auth/ABBnrmJVDkTQK4-2sseEfiMTlea6BAuqks5tLN7hgaJpZM4RdRiu .

Belzun commented 6 years ago

I just downloaded your package again from your github and works perfect. I don't understand why, but now it works. So thanks a lot for your time, I really appreciate it. And thank you for this package, it makes everything easier.

Regards, Oscar