Skip to content

Commit 7131c2b

Browse files
committed
new post + openalex fixes
1 parent eef505b commit 7131c2b

File tree

13 files changed

+1055
-117
lines changed

13 files changed

+1055
-117
lines changed

R/resume_fun.R

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,26 +50,26 @@ pubs <- function(whois, openalex_id){
5050
pub <- openalexR::oa_fetch(entity ="works",
5151
author.id = openalex_id)
5252

53-
pub_mod <- pub$author %>%
54-
lapply(., function(x) {x$au_display_name %>% str_flatten(., collapse = ", ")}) %>%
53+
pub_mod <- pub$authorships %>%
54+
lapply(., function(x) {x$display_name %>% str_flatten(., collapse = ", ")}) %>%
5555
unlist() %>%
5656
tibble(authors = .) %>%
5757
cbind(pub, .)
5858

5959

60-
pub_mod <- pub_mod$author %>%
60+
pub_mod <- pub_mod$authorships %>%
6161
lapply(., function(x){
62-
number <- x$au_id %>% str_detect(openalex_id) %>% which()
62+
number <- x$id %>% str_detect(openalex_id) %>% which()
6363
position <- x$author_position[number]
6464
}) %>%
6565
unlist(.) %>%
6666
tibble(position = .) %>%
6767
cbind(pub_mod, .)
6868

6969

70-
pub_mod <- pub_mod$author %>%
70+
pub_mod <- pub_mod$authorships %>%
7171
lapply(., function(x){
72-
number <- x$au_id %>% str_detect(openalex_id) %>% which(.)
72+
number <- x$id %>% str_detect(openalex_id) %>% which(.)
7373
corresponding <- x$is_corresponding[number]
7474
}) %>%
7575
unlist(.) %>%
@@ -96,15 +96,15 @@ pubs <- function(whois, openalex_id){
9696
if_else(position == "middle", "coauthor", position),
9797
if_else(corresponding == TRUE, ",\n corresponding", "")
9898
)) %>%
99-
select(title, authors, doi, publication_date, type, so, host_organization, authorship) %>%
99+
select(title, authors, doi, publication_date, type, source_display_name, host_organization_name, authorship) %>%
100100
drop_na(., doi) %>%
101101
mutate(doi = paste0('<a target=_blank href=', doi, '>', doi %>% str_remove(., "https://doi.org/"),'</a>'),
102-
journal = so %>% as.factor(),
103-
publisher = host_organization %>% as.factor(),
102+
journal = source_display_name %>% as.factor(),
103+
publisher = host_organization_name %>% as.factor(),
104104
type = type %>% as.factor(),
105105
`publication date` = publication_date %>% as_date()
106106
) %>%
107-
select(!c(so, host_organization, publication_date)) %>%
107+
select(!c(source_display_name, host_organization_name, publication_date)) %>%
108108
arrange(desc(`publication date`)) %>%
109109
DT::datatable(., escape = F, extensions = 'Buttons', options = list(dom = 'tp', buttons = c('copy', 'csv', 'excel')))
110110
}

_freeze/subsite/publications/execute-results/html.json

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

docs/index.html

Lines changed: 66 additions & 35 deletions
Large diffs are not rendered by default.

docs/listings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{
33
"listing": "/index.html",
44
"items": [
5+
"/subsite/posts/2025_06_18.html",
56
"/subsite/posts/2025_06_17.html",
67
"/subsite/posts/2025_05_21.html",
78
"/subsite/posts/2025_05_20.html",

docs/search.json

Lines changed: 64 additions & 50 deletions
Large diffs are not rendered by default.
2.69 MB
Loading

0 commit comments

Comments
 (0)