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

Fix snowball #17

Merged
merged 3 commits into from
Sep 30, 2022
Merged

Fix snowball #17

merged 3 commits into from
Sep 30, 2022

Conversation

trangdata
Copy link
Collaborator

oa_snowball no longer errors out when a work hasn't been cited.

library(openalexR)

snowball_docs <- oa_snowball(
  identifier = c("W4295757800", "W4296128995", "W4297497355"),
  endpoint = "https://api.openalex.org/",
  verbose = FALSE
)
#> the list does not contain a valid OpenAlex collection

head(snowball_docs)
#> # A tibble: 6 × 27
#>   id        displ…¹ author ab    publi…² relev…³ so    so_id publi…⁴ issn  url  
#>   <chr>     <chr>   <list> <chr> <chr>   <lgl>   <chr> <chr> <chr>   <lis> <chr>
#> 1 https://… Deep R… <df>   Deep… 2016-0… NA      2016… <NA>  IEEE    <lgl> http…
#> 2 https://… SWISS-… <df>   Homo… 2018-0… NA      Nucl… http… Oxford… <chr> http…
#> 3 https://… Molecu… <df>   Oral… 2002-0… NA      Jour… http… Americ… <chr> http…
#> 4 https://… Highly… <df>   Prot… 2021-0… NA      Natu… http… Spring… <chr> http…
#> 5 https://… Extend… <df>   Exte… 2010-0… NA      Jour… http… Americ… <chr> http…
#> 6 https://… ChEMBL… <df>   ChEM… 2012-0… NA      Nucl… http… Oxford… <chr> http…
#> # … with 16 more variables: first_page <chr>, last_page <chr>, volume <chr>,
#> #   issue <chr>, is_oa <lgl>, cited_by_count <int>, counts_by_year <list>,
#> #   publication_year <int>, cited_by_api_url <chr>, ids <list>, doi <chr>,
#> #   type <chr>, referenced_works <list>, related_works <list>, concepts <list>,
#> #   role <chr>, and abbreviated variable names ¹​display_name,
#> #   ²​publication_date, ³​relevance_score, ⁴​publisher

Created on 2022-09-30 with reprex v2.0.2

@trangdata
Copy link
Collaborator Author

Ready for review @massimoaria

@massimoaria massimoaria merged commit b6d97ed into main Sep 30, 2022
massimoaria added a commit that referenced this pull request Sep 30, 2022
Merge branch 'main' of https://github.com/massimoaria/openalexR
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
@trangdata trangdata deleted the fix-snowball branch October 2, 2022 13:24
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