Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/yjunechoe/openalexR into fl…
Browse files Browse the repository at this point in the history
…atten-df-chunks
  • Loading branch information
yjunechoe committed Jan 29, 2024
2 parents eedbd7e + 4d46ba6 commit a6ed863
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 36 deletions.
2 changes: 1 addition & 1 deletion R/oa2df.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ oa2df <- function(data, entity, options = NULL, count_only = FALSE, group_by = N
return(do.call(rbind.data.frame, data))
}

if (count_only && length(data) == 4) {
if (count_only && length(data) < 8) { # assuming less than 8 fields in output$meta
return(unlist(data))
}

Expand Down
67 changes: 32 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ works_from_dois |>

| id | display_name | first_author | last_author | so | url | is_oa | top_concepts |
|:------------|:--------------------------------------------------------------------------|:------------------|:-------------------|:------------------------|:--------------------------------------------|:------|:--------------------------------------|
| W2755950973 | bibliometrix : An R-tool for comprehensive science mapping analysis | Massimo Aria | Corrado Cuccurullo | Journal of Informetrics | <https://doi.org/10.1016/j.joi.2017.08.007> | FALSE | Data science |
| W2755950973 | bibliometrix : An R-tool for comprehensive science mapping analysis | Massimo Aria | Corrado Cuccurullo | Journal of Informetrics | <https://doi.org/10.1016/j.joi.2017.08.007> | FALSE | Workflow, Bibliometrics, Software |
| W2038196424 | Coverage and adoption of altmetrics sources in the bibliometric community | Stefanie Haustein | Jens Terliesner | Scientometrics | <https://doi.org/10.1007/s11192-013-1221-3> | FALSE | Altmetrics, Bookmarking, Social media |

**Goal**: Download all works published by a set of authors (known
Expand All @@ -152,7 +152,7 @@ works_from_orcids <- oa_fetch(
verbose = TRUE
)
#> Requesting url: https://api.openalex.org/works?filter=author.orcid%3A0000-0001-6187-6610%7C0000-0002-8517-9411
#> Getting 2 pages of results with a total of 225 records...
#> Getting 2 pages of results with a total of 229 records...

works_from_orcids |>
show_works() |>
Expand All @@ -161,10 +161,10 @@ works_from_orcids |>

| id | display_name | first_author | last_author | so | url | is_oa | top_concepts |
|:------------|:---------------------------------------------------------------------------------------------|:------------------|:-----------------------|:----------------------------------------------------------------------|:-----------------------------------------------|:------|:--------------------------------------|
| W2755950973 | bibliometrix : An R-tool for comprehensive science mapping analysis | Massimo Aria | Corrado Cuccurullo | Journal of Informetrics | <https://doi.org/10.1016/j.joi.2017.08.007> | FALSE | Data science |
| W2755950973 | bibliometrix : An R-tool for comprehensive science mapping analysis | Massimo Aria | Corrado Cuccurullo | Journal of Informetrics | <https://doi.org/10.1016/j.joi.2017.08.007> | FALSE | Workflow, Bibliometrics, Software |
| W2741809807 | The state of OA: a large-scale analysis of the prevalence and impact of Open Access articles | Heather Piwowar | Stefanie Haustein | PeerJ | <https://doi.org/10.7717/peerj.4375> | TRUE | Citation, License, Open science |
| W2122130843 | Scientometrics 2.0: New metrics of scholarly impact on the social Web | Jason Priem | Bradely H. Hemminger | First Monday | <https://doi.org/10.5210/fm.v15i7.2874> | FALSE | Bookmarking, Altmetrics, Social media |
| W2041540760 | How and why scholars cite on Twitter | Jason Priem | Kaitlin Light Costello | Proceedings Of The Association For Information Science And Technology | <https://doi.org/10.1002/meet.14504701201> | TRUE | Citation, Conversation, Social media |
| W2041540760 | How and why scholars cite on Twitter | Jason Priem | Kaitlin Light Costello | Proceedings of the Association for Information Science and Technology | <https://doi.org/10.1002/meet.14504701201> | TRUE | Citation, Conversation, Social media |
| W2038196424 | Coverage and adoption of altmetrics sources in the bibliometric community | Stefanie Haustein | Jens Terliesner | Scientometrics | <https://doi.org/10.1007/s11192-013-1221-3> | FALSE | Altmetrics, Bookmarking, Social media |
| W2396414759 | The Altmetrics Collection | Jason Priem | Dario Taraborelli | PLOS ONE | <https://doi.org/10.1371/journal.pone.0048753> | TRUE | Altmetrics |

Expand All @@ -184,7 +184,7 @@ works_search <- oa_fetch(
verbose = TRUE
)
#> Requesting url: https://api.openalex.org/works?filter=title.search%3Abibliometric%20analysis%7Cscience%20mapping%2Ccited_by_count%3A%3E50%2Cfrom_publication_date%3A2020-01-01%2Cto_publication_date%3A2021-12-31&sort=cited_by_count%3Adesc
#> Getting 1 page of results with a total of 124 records...
#> Getting 1 page of results with a total of 142 records...

works_search |>
show_works() |>
Expand All @@ -196,9 +196,9 @@ works_search |>
| W3160856016 | How to conduct a bibliometric analysis: An overview and guidelines | Naveen Donthu | Weng Marc Lim | Journal of Business Research | <https://doi.org/10.1016/j.jbusres.2021.04.070> | TRUE | Bibliometrics, Field (mathematics), Resource (disambiguation) |
| W3038273726 | Investigating the emerging COVID-19 research trends in the field of business and management: A bibliometric analysis approach | Surabhi Verma | Anders Gustafsson | Journal of Business Research | <https://doi.org/10.1016/j.jbusres.2020.06.057> | TRUE | Bibliometrics, Field (mathematics), Empirical research |
| W2990450011 | Forty-five years of Journal of Business Research: A bibliometric analysis | Naveen Donthu | Debidutta Pattnaik | Journal of Business Research | <https://doi.org/10.1016/j.jbusres.2019.10.039> | FALSE | Publishing, Bibliometrics, Empirical research |
| W3044902155 | Financial literacy: A systematic review and bibliometric analysis | Kirti Goyal | Satish Kumar | International Journal of Consumer Studies | <https://doi.org/10.1111/ijcs.12605> | FALSE | Financial literacy, Citation, Content analysis |
| W3001491100 | Software tools for conducting bibliometric analysis in science: An up-to-date review | Jose A. Moral-Munoz | Manuel J. Cobo | Profesional De La Informacion | <https://doi.org/10.3145/epi.2020.ene.03> | TRUE | Bibliometrics, Software |
| W2990688366 | A bibliometric analysis of board diversity: Current status, development, and future research directions | H. Kent Baker | Arunima Haldar | Journal of Business Research | <https://doi.org/10.1016/j.jbusres.2019.11.025> | FALSE | Diversity (politics), Current (fluid), Bibliometrics |
| W3001491100 | Software tools for conducting bibliometric analysis in science: An up-to-date review | José A. Moral-Muñoz | Manuel J. Cobo | Profesional De La Informacion | <https://doi.org/10.3145/epi.2020.ene.03> | TRUE | Bibliometrics, Visualization, Set (abstract data type) |
| W3044902155 | Financial literacy: A systematic review and bibliometric analysis | Kirti Goyal | Satish Kumar | International Journal of Consumer Studies | <https://doi.org/10.1111/ijcs.12605> | FALSE | Financial literacy, Content analysis, Citation |
| W2990688366 | A bibliometric analysis of board diversity: Current status, development, and future research directions | H. Kent Baker | Arunima Haldar | Journal of Business Research | <https://doi.org/10.1016/j.jbusres.2019.11.025> | FALSE | Diversity (politics), Ethnic group, Bibliometrics |

### 🧑 Authors

Expand All @@ -222,8 +222,8 @@ authors_from_orcids |>

| id | display_name | orcid | works_count | cited_by_count | affiliation_display_name | top_concepts |
|:------------|:-------------|:--------------------|------------:|---------------:|:---------------------------------|:-----------------------------------------|
| A5069892096 | Massimo Aria | 0000-0002-8517-9411 | 179 | 5530 | University of Naples Federico II | Statistics, Pathology, Internal medicine |
| A5023888391 | Jason Priem | 0000-0001-6187-6610 | 53 | 2130 | Our Research | World Wide Web, Library science, Law |
| A5069892096 | Massimo Aria | 0000-0002-8517-9411 | 176 | 5978 | University of Naples Federico II | Statistics, Pathology, Internal medicine |
| A5023888391 | Jason Priem | 0000-0001-6187-6610 | 52 | 2163 | OurResearch | World Wide Web, Library science, Law |

**Goal**: Acquire information on the authors of this package.

Expand All @@ -242,8 +242,8 @@ authors_from_names |>

| id | display_name | orcid | works_count | cited_by_count | affiliation_display_name | top_concepts |
|:------------|:-------------|:--------------------|------------:|---------------:|:---------------------------------|:-----------------------------------------|
| A5069892096 | Massimo Aria | 0000-0002-8517-9411 | 179 | 5530 | University of Naples Federico II | Statistics, Pathology, Internal medicine |
| A5023888391 | Jason Priem | 0000-0001-6187-6610 | 53 | 2130 | Our Research | World Wide Web, Library science, Law |
| A5069892096 | Massimo Aria | 0000-0002-8517-9411 | 176 | 5978 | University of Naples Federico II | Statistics, Pathology, Internal medicine |
| A5023888391 | Jason Priem | 0000-0001-6187-6610 | 52 | 2163 | OurResearch | World Wide Web, Library science, Law |

**Goal**: Download all authors’ records of scholars who work at the
[University of Naples Federico
Expand All @@ -263,7 +263,7 @@ my_arguments <- list(

do.call(oa_fetch, c(my_arguments, list(count_only = TRUE)))
#> count db_response_time_ms page per_page
#> [1,] 21 76 1 1
#> [1,] 20 175 1 1

if (do.call(oa_fetch, c(my_arguments, list(count_only = TRUE)))[1]>0){
do.call(oa_fetch, my_arguments) |>
Expand All @@ -272,14 +272,14 @@ do.call(oa_fetch, my_arguments) |>
}
```

| id | display_name | orcid | works_count | cited_by_count | affiliation_display_name | top_concepts |
|:------------|:----------------------|:--------------------|------------:|---------------:|:---------------------------------|:-----------------------------------------------------|
| A5032217427 | Nicola Longo | 0000-0002-3677-1216 | 1092 | 11416 | University of Naples Federico II | Internal medicine, Genetics, Pathology |
| A5076706548 | Salvatore Capozziello | 0000-0003-4886-2024 | 891 | 30196 | University of Naples Federico II | Quantum mechanics, Astronomy, Classical mechanics |
| A5072318694 | G. Chiefari | NA | 886 | 44892 | University of Naples Federico II | Particle physics, Quantum mechanics, Nuclear physics |
| A5003544129 | Annamaria Colao | NA | 810 | 22569 | University of Naples Federico II | Internal medicine, Endocrinology, Biochemistry |
| A5035636337 | S. Patricelli | NA | 796 | 42271 | University of Naples Federico II | Quantum mechanics, Particle physics, Nuclear physics |
| A5051324603 | Massimo Chiariello | NA | 777 | 15078 | University of Naples Federico II | Internal medicine, Cardiology, Endocrinology |
| id | display_name | orcid | works_count | cited_by_count | affiliation_display_name | top_concepts |
|:------------|:---------------------|:--------------------|------------:|---------------:|:---------------------------------|:-----------------------------------------------------|
| A5072318694 | G. Chiefari | NA | 878 | 45134 | University of Naples Federico II | Quantum mechanics, Particle physics, Nuclear physics |
| A5035636337 | S. Patricelli | NA | 793 | 42464 | University of Naples Federico II | Quantum mechanics, Particle physics, Nuclear physics |
| A5051324603 | Massimo Chiariello | NA | 738 | 15003 | University of Naples Federico II | Internal medicine, Cardiology, Endocrinology |
| A5026402548 | Gabriella Fabbrocini | 0000-0002-0064-1874 | 724 | 10355 | University of Naples Federico II | Dermatology, Internal medicine, Pathology |
| A5057084037 | Fabrizio Pane | 0000-0003-2563-4125 | 707 | 19076 | University of Naples Federico II | Internal medicine, Immunology, Genetics |
| A5070034601 | Annamaria Colao | 0000-0003-4049-2559 | 684 | 26625 | University of Naples Federico II | Internal medicine, Endocrinology, Pathology |

## 🍒 Example analyses

Expand Down Expand Up @@ -336,7 +336,7 @@ italy_insts <- oa_fetch(
verbose = TRUE
)
#> Requesting url: https://api.openalex.org/institutions?filter=country_code%3Ait%2Ctype%3Aeducation
#> Getting 2 pages of results with a total of 232 records...
#> Getting 2 pages of results with a total of 234 records...

italy_insts |>
slice_max(cited_by_count, n = 8) |>
Expand Down Expand Up @@ -475,7 +475,7 @@ snowball_docs <- oa_snowball(
#> Getting 1 page of results with a total of 2 records...
#> Collecting all documents citing the target papers...
#> Requesting url: https://api.openalex.org/works?filter=cites%3AW1963991285%7CW1964141474
#> Getting 3 pages of results with a total of 494 records...
#> Getting 3 pages of results with a total of 501 records...
#> Collecting all documents cited by the target papers...
#> Requesting url: https://api.openalex.org/works?filter=cited_by%3AW1963991285%7CW1964141474
#> Getting 1 page of results with a total of 87 records...
Expand Down Expand Up @@ -526,20 +526,20 @@ ngrams_data

lapply(ngrams_data$ngrams, head, 3)
#> [[1]]
#> ngram ngram_tokens ngram_count
#> 1 brain basis and core cause 5 2
#> 2 cause be not yet fully 5 2
#> 3 include structural and functional magnetic 5 2
#> ngram ngram_count ngram_tokens
#> 1 brain basis and core cause 2 5
#> 2 cause be not yet fully 2 5
#> 3 include structural and functional magnetic 2 5
#> term_frequency
#> 1 0.0006637902
#> 2 0.0006637902
#> 3 0.0006637902
#>
#> [[2]]
#> ngram ngram_tokens ngram_count
#> 1 intact but less accessible phonetic 5 1
#> 2 accessible phonetic representation in Adults 5 1
#> 3 representation in Adults with Dyslexia 5 1
#> ngram ngram_count ngram_tokens
#> 1 intact but less accessible phonetic 1 5
#> 2 accessible phonetic representation in Adults 1 5
#> 3 representation in Adults with Dyslexia 1 5
#> term_frequency
#> 1 0.0003756574
#> 2 0.0003756574
Expand Down Expand Up @@ -571,10 +571,7 @@ does this automatically if you have `{curl} >= v5.0.0`).

## 💫 About OpenAlex

<figure>
<img src="man/figures/oar.png" alt="oar-img" />
<figcaption aria-hidden="true">oar-img</figcaption>
</figure>
![oar-img](man/figures/oar.png)

<div style="text-align: right">

Expand Down
Binary file modified man/figures/README-big-journals-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-biological-concepts-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-concept-cloud-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-italy-insts-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-snowballing-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a6ed863

Please sign in to comment.