# Lähdeluettelo: jokainen DOI:llinen viite haetaan OpenAlexista ja kirjoitetaan # viitteet.bib-tiedostoon. Näin viitteet on tarkistettu olemassa oleviksi eivätkä # perustu kielimallin muistiin (ks. TENK 2026, infolaatikko 2). # Kirjallisuushaku: projekti_openalex/queries/digital_welfare_unintended.yml # Aja projektin juuresta: Rscript demo4_rahoitushakemus/R/00_viitteet.R setwd(file.path(here::here(), "projekti_openalex")) # API-avain luetaan sieltä source("R/oa_pipeline.R") oa_setup() # avain = viittausavain hakemuksessa, arvo = DOI viitteet <- c( merton1936 = "10.2307/2084615", bovens2002 = "10.1111/0033-3352.00168", buffat2013 = "10.1080/14719037.2013.771699", moynihan2014 = "10.1093/jopart/muu009", hansen2016 = "10.1111/spol.12283", busch2018 = "10.3233/ip-170050", peeters2018 = "10.1016/j.giq.2018.02.003", schou2018 = "10.1111/spol.12470", carney2018 = "10.1177/1037969x18815913", bullock2019 = "10.1177/0275074019856123", lindgren2019 = "10.1016/j.giq.2019.03.002", ranerup2019 = "10.1016/j.giq.2019.05.004", park2019 = "10.1080/1369118x.2019.1606266", allhutter2020 = "10.3389/fdata.2020.00005", larsson2020 = "10.1016/j.giq.2020.101547", suksi2020 = "10.1007/s10506-020-09269-x", vanbekkum2021 = "10.1177/13882627211031257", jorgensen2021 = "10.1080/1369118x.2021.1934069", kaun2021 = "10.1080/1369118x.2021.1924827", deboer2021 = "10.1080/14719037.2021.1937684", collington2021 = "10.1080/13563467.2021.1952559", madsen2021 = "10.1016/j.giq.2021.101653", rachovitsa2022 = "10.1093/hrlr/ngac010", nikidehaghani2022 = "10.1108/aaaj-02-2022-5666", safarov2023 = "10.1017/s1474746422000719", ball2023 = "10.1111/spol.12939", kaun2025 = "10.1177/14614448251314394", arksey2005 = "10.1080/1364557032000119616", pawson2005 = "10.1258/1355819054308530", levac2010 = "10.1186/1748-5908-5-69", tricco2018 = "10.7326/m18-0850", vandeschoot2021 = "10.1038/s42256-020-00287-7", khraisha2024 = "10.1002/jrsm.1715" ) # OpenAlexin tekijätiedot ovat näissä puutteellisia (tekijä puuttuu tai vain osa # tekijöistä on listattu). Korjattu julkaisijan sivun mukaan. tekijat_korjaus <- c( merton1936 = "Robert K. Merton", bovens2002 = "Mark Bovens and Stavros Zouridis", buffat2013 = "Aurélien Buffat", arksey2005 = "Hilary Arksey and Lisa O'Malley", hansen2016 = "Hans-Tore Hansen and Kjetil Lundberg and Liv Johanne Syltevik", # Nimipartikkelit: BibTeX tarvitsee muodon "Sukunimi, Etunimi" vanbekkum2021 = "van Bekkum, Marvin and Zuiderveen Borgesius, Frederik" ) w <- with_retry(\() oa_fetch(entity = "works", doi = unname(viitteet))) flat <- flatten_works(w) |> mutate(doi = str_to_lower(doi)) puuttuu <- setdiff(str_to_lower(viitteet), flat$doi) if (length(puuttuu)) stop("OpenAlex ei löytänyt: ", paste(puuttuu, collapse = ", ")) esc <- function(x) str_replace_all(x, "([{}&%])", "\\\\\\1") bib <- map_chr(names(viitteet), function(k) { r <- flat[flat$doi == str_to_lower(viitteet[[k]]), ][1, ] tyyppi <- switch(r$type, book = "book", "book-chapter" = "incollection", preprint = "misc", "article") tekijat <- if (k %in% names(tekijat_korjaus)) tekijat_korjaus[[k]] else str_split(esc(r$authors), "; ")[[1]] |> unique() |> (\(x) if_else(x == toupper(x), str_to_title(x), x))() |> paste(collapse = " and ") kentat <- c(title = esc(r$title), author = tekijat, year = r$year, journal = if (tyyppi == "article") esc(r$source) else NA, publisher = if (tyyppi %in% c("book", "misc")) esc(r$source) else NA, doi = r$doi, note = paste("OpenAlex", r$id)) kentat <- kentat[!is.na(kentat)] paste0("@", tyyppi, "{", k, ",\n", paste0(" ", names(kentat), " = {", kentat, "}", collapse = ",\n"), "\n}") }) # Lähteet, joilla ei ole DOI:ta tai joiden DOI johtaa väärään teokseen. # Eubanksin kirjan "DOI" 10.1080/10999922.2018.1511671 on kirja-arvio, ei kirja. # Lipskyn JSTOR-tietueen tyyppi on epäselvä; viitataan kirjaan suoraan. kasin <- c( "@book{lipsky1980, author = {Lipsky, Michael}, title = {Street-Level Bureaucracy: Dilemmas of the Individual in Public Services}, year = {1980}, publisher = {Russell Sage Foundation}, address = {New York} }", "@book{eubanks2018, author = {Eubanks, Virginia}, title = {Automating Inequality: How High-Tech Tools Profile, Police, and Punish the Poor}, year = {2018}, publisher = {St. Martin's Press}, address = {New York} }", "@book{herd2018, author = {Herd, Pamela and Moynihan, Donald P.}, title = {Administrative Burden: Policymaking by Other Means}, year = {2018}, publisher = {Russell Sage Foundation}, address = {New York} }", "@misc{alston2019, author = {Alston, Philip}, title = {Report of the Special Rapporteur on extreme poverty and human rights (digital welfare states and human rights)}, year = {2019}, publisher = {YK:n yleiskokous, A/74/493} }", "@misc{kela2026haku, author = {{Kela}}, title = {Kohdennetun haun aiheet 2026}, year = {2026}, publisher = {Tietotarjotin, tutkimusrahoitus}, note = {https://tietotarjotin.fi/palvelu/1943824/kohdennetun-haun-aiheet-2026} }", "@misc{kela2026ohje, author = {{Kela}}, title = {Näin haet tutkimusrahoitusta}, year = {2026}, publisher = {Tietotarjotin, tutkimusrahoitus}, note = {https://tietotarjotin.fi/ohje/339289/nain-haet-tutkimusrahoitusta} }", "@misc{tenk2026, author = {{Tutkimuseettinen neuvottelukunta}}, title = {Tekoäly tutkimuksessa: hyvä tieteellinen käytäntö ja eettiset periaatteet. Tutkimuseettisen neuvottelukunnan suositus 2026}, year = {2026}, publisher = {Tutkimuseettisen neuvottelukunnan julkaisuja 1/2026}, address = {Helsinki} }", "@misc{tenk2019, author = {{Tutkimuseettinen neuvottelukunta}}, title = {Ihmiseen kohdistuvan tutkimuksen eettiset periaatteet ja ihmistieteiden eettinen ennakkoarviointi Suomessa}, year = {2019}, publisher = {Tutkimuseettisen neuvottelukunnan julkaisuja 3/2019}, address = {Helsinki} }") out <- file.path(here::here(), "demo4_rahoitushakemus", "viitteet.bib") writeLines(c(bib, kasin), out, sep = "\n\n") cat("Kirjoitettu", length(bib) + length(kasin), "viitettä:", out, "\n")