> wd <- GET("https://api.openalex.org/works", + query = list( + search="handball", + filter="publication_year:2015", + # select="id,title,countries_distinct_count,cited_by_count,referenced_works_count", + page="4", per_page="100")) > wd$status_code [1] 200 > wc <- fromJSON(rawToChar(wd$content)) > wc$meta$count [1] 1282 > wr <- wc$results > names(wr) [1] "id" "doi" "title" [4] "display_name" "relevance_score" "publication_year" [7] "publication_date" "ids" "language" [10] "primary_location" "type" "type_crossref" [13] "indexed_in" "open_access" "authorships" [16] "countries_distinct_count" "institutions_distinct_count" "corresponding_author_ids" [19] "corresponding_institution_ids" "apc_list" "apc_paid" [22] "has_fulltext" "cited_by_count" "cited_by_percentile_year" [25] "biblio" "is_retracted" "is_paratext" [28] "primary_topic" "topics" "keywords" [31] "concepts" "mesh" "locations_count" [34] "locations" "best_oa_location" "sustainable_development_goals" [37] "grants" "referenced_works_count" "referenced_works" [40] "related_works" "ngrams_url" "abstract_inverted_index" [43] "cited_by_api_url" "counts_by_year" "updated_date" [46] "created_date" "fulltext_origin" > dim(wr) [1] 100 47 > wr$referenced_works_count [1] 0 0 0 0 0 0 0 0 0 17 2 0 0 53 0 0 0 0 0 21 22 0 218 0 0 [26] 0 15 12 0 0 26 13 0 31 0 0 20 0 30 44 0 28 47 85 23 5 40 30 93 0 [51] 40 27 35 51 0 51 46 0 20 0 0 35 25 0 70 75 36 68 41 28 121 41 31 108 14 [76] 30 38 25 14 24 19 20 18 63 26 21 45 28 38 27 23 33 32 33 81 41 26 18 10 11 > wr$referenced_works[99][[1]] [1] "https://openalex.org/W1761931650" "https://openalex.org/W1986782247" [3] "https://openalex.org/W1993704014" "https://openalex.org/W2005815716" [5] "https://openalex.org/W2008007132" "https://openalex.org/W2018932092" [7] "https://openalex.org/W2029647676" "https://openalex.org/W2077041501" [9] "https://openalex.org/W2144717207" "https://openalex.org/W2159453896" > wr$authorships[99][[1]] author_position author.id author.display_name 1 first https://openalex.org/A5078419554 Monika Chudecka 2 last https://openalex.org/A5088320252 Anna Lubkowska author.orcid 1 https://orcid.org/0000-0003-0657-0293 2 https://orcid.org/0000-0002-5378-5409 institutions 1 https://openalex.org/I104588304, University of Szczecin, https://ror.org/05vmz5070, PL, education, https://openalex.org/I104588304 2 https://openalex.org/I79833322, Pomeranian Medical University, https://ror.org/01v1rak05, PL, education, https://openalex.org/I79833322 countries is_corresponding raw_author_name 1 PL TRUE Monika Chudecka 2 PL FALSE Anna Lubkowska raw_affiliation_string 1 Department of Human Functional Anatomy and Biometry, Faculty of Physical Culture and Health Promotion, Szczecin University, al. Piastów 40b, 71-065 Szczecin, Poland 2 Department of Functional Diagnostics and Physical Medicine, Faculty of Health Sciences, Pomeranian Medical University in Szczecin, ul. Grudziądzka 31, 70-103 Szczecin, Poland raw_affiliation_strings 1 Department of Human Functional Anatomy and Biometry, Faculty of Physical Culture and Health Promotion, Szczecin University, al. Piastów 40b, 71-065 Szczecin, Poland 2 Department of Functional Diagnostics and Physical Medicine, Faculty of Health Sciences, Pomeranian Medical University in Szczecin, ul. Grudziądzka 31, 70-103 Szczecin, Poland > head(wr$title) [1] "PERCEPTION FAMILY ON THE DAILY LIFE ACTIVITIES OF CHILDREN IN DISABILITY CONDITION CONGENITAL IN RELATION TO PRACTICE SPORTS OF HANDBALL IN WHEELCHAIR" [2] "A comparative study by leg (weak - strong) and its relationship to strongly and accuracy jump shooting for corner in handball" [3] "COORDINATION EYS-FOOT AND THEIR RELATIONSHIP OF ACCURACY PERFORMANCE OF OFFENSIVE SKILLS FOR HANDBALL PLAYER AGE (13-14)" [4] "Listening to Motivational Music: Lactate and Cortisol Response to a Single Circuit Resistance Exercise for Young Male Athletes" [5] "EFFECTS THE EIGHT-WEEK TRAINING PROCESS APPLIED TO MALE HANDBALL TEAM AT UNIVERSITY CATEGORY ON SOME ANTHROPOMETRIC AND BIOMOTORIC FEATURES" [6] "A social learning perspective on successful talent development environments: A qualitative study of two successful Scandinavian handball clubs" > head(wr$publication_year) [1] 2015 2015 2015 2015 2015 2015 > head(wr$language) [1] "en" "en" "en" "en" "en" "en" > head(wr$primary_location$source$id) [1] "https://openalex.org/S4385749590" "https://openalex.org/S2764710715" [3] "https://openalex.org/S2764710715" NA [5] "https://openalex.org/S4210188086" NA > head(wr$primary_location$source$type) [1] "conference" "journal" "journal" NA "journal" NA > wr$authorships[[15]] author_position author.id author.display_name author.orcid institutions countries 1 first https://openalex.org/A5053784643 成仁 吉田 NA NULL NULL 2 middle https://openalex.org/A5024556660 苑子 眞下 NA NULL NULL 3 last https://openalex.org/A5090893833 暁彦 増成 NA NULL NULL is_corresponding raw_author_name raw_affiliation_string raw_affiliation_strings 1 FALSE 成仁 吉田 NULL 2 FALSE 苑子 眞下 NULL 3 FALSE 暁彦 増成 NULL > wr$authorships[[43]] author_position author.id author.display_name 1 first https://openalex.org/A5032175421 Markus Raab 2 last https://openalex.org/A5002330321 Gerd Gigerenzer author.orcid 1 https://orcid.org/0000-0001-6546-1666 2 <NA> institutions 1 https://openalex.org/I137533716, https://openalex.org/I28257850, German Sport University Cologne, London South Bank University, https://ror.org/0189raq88, https://ror.org/02vwnat91, DE, GB, education, education, https://openalex.org/I137533716, https://openalex.org/I28257850 2 https://openalex.org/I4210120221, Max Planck Institute for Human Development, https://ror.org/02pp7px91, DE, facility, https://openalex.org/I149899117, https://openalex.org/I4210120221 countries is_corresponding raw_author_name 1 DE, GB TRUE Markus Raab 2 DE FALSE Gerd Gigerenzer raw_affiliation_string 1 Department of Performance Psychology, Institute of Psychology, German Sport University, Cologne, Germany; Sport and Exercise Science Research Centre, School of Applied Sciences, London South Bank University, London, UK 2 Center for Adaptive Behavior and Cognition, Max Planck Institute for Human Development, Berlin, Germany raw_affiliation_strings 1 Department of Performance Psychology, Institute of Psychology, German Sport University, Cologne, Germany, Sport and Exercise Science Research Centre, School of Applied Sciences, London South Bank University, London, UK 2 Center for Adaptive Behavior and Cognition, Max Planck Institute for Human Development, Berlin, Germany
> td <- GET("https://api.openalex.org/works?group_by=type") > tc <- fromJSON(rawToChar(td$content)) > tc$group_by$key_display_name [1] "article" "book-chapter" "dissertation" "book" "dataset" [6] "paratext" "other" "reference-entry" "report" "peer-review" [11] "standard" "editorial" "erratum" "grant" "letter" > Ty <- c("article"="AR","book-chapter"="BC","dissertation"="DS","book"="BK","dataset"="DS", + "paratext"="PT","other"="OT","reference-entry"="RE","report"="RP","peer-review"="PR", + "standard"="ST","editorial"="ED","erratum"="ER","grant"="GR","letter"="LT") > Ty article book-chapter dissertation book dataset paratext "AR" "BC" "DS" "BK" "DS" "PT" other reference-entry report peer-review standard editorial "OT" "RE" "RP" "PR" "ST" "ED" erratum grant letter "ER" "GR" "LT" > Ty["book-chapter"] book-chapter "BC" > unname(Ty["book-chapter"]) [1] "BC"
> OAid <- "https://openalex.org/A5032175421" > getID <- function(URLid) substring(URLid,22) > getID(OAid) [1] "A5032175421" > getID(wr$authorships[[98]]$author$id) [1] "A5090182473" "A5029263937" "A5033080669" "A5010787902" "A5060112206" "A5077006266" "A5078868626" > getID(wr$referenced_works[[99]]) [1] "W1761931650" "W1986782247" "W1993704014" "W2005815716" "W2008007132" "W2018932092" "W2029647676" [8] "W2077041501" "W2144717207" "W2159453896"
Ty <- c("article"="AR","book-chapter"="BC","dissertation"="DS","book"="BK","dataset"="DS", "paratext"="PT","other"="OT","reference-entry"="RE","report"="RP","peer-review"="PR", "standard"="ST","editorial"="ED","erratum"="ER","grant"="GR","letter"="LT") firstup <- function(n) {n <- tolower(n); substr(n,1,1) <- toupper(substr(n,1,1)); n} Gname <- function(name,ty,py,vl,fp){L <- firstup(unlist(strsplit(name," "))); k <- length(L) H <- paste(substr(L[k],1,8),paste(substr(L[1:(k-1)],1,1),sep="",collapse=""),sep="_") if(ty=="article") paste(H,"(",py,")",vl,":",fp,sep="") else paste(H,"(",py,")",ty,sep="") }
> source("https://raw.githubusercontent.com/bavla/OpenAlex/main/OpenAlex.R") > test <- c("Avery D. Faigenbaum", "Julio Roca de Larios","Ingi Ór Einarsson", + "Mohsen Mardani-Kivi", "成仁 吉田") > ty <- "article"; py <- 2015; vl <- 15; fp <- 341 > Gname(test[1],ty,py,vl,fp) [1] "Faigenba_AD(2015)15:341" > Gname(test[5],"book",py,vl,fp) [1] "吉田_成(2015)BK"