ropensci-archive / rorcid

:warning: ARCHIVED :warning: A programmatic interface the Orcid.org API
Other
109 stars 13 forks source link

orcid_fundings not return amount #62

Closed awconway closed 5 years ago

awconway commented 5 years ago

The result of orcid_fundings doesn't seem to return a field with the total amount even though in the public ui it is shown. Is there a way we can get this? Thanks

sckott commented 5 years ago

thanks for your question @awconway

please give an example, both of the URL for the ORCID page you're talking about and the orcid_fundings request that does what you say. and include your R session info

awconway commented 5 years ago

Thanks - url for record is https://orcid.org/0000-0002-9583-8636

Output of rorcid::orcid_fundings("0000-0002-9583-8636")

$`0000-0002-9583-8636`
$`0000-0002-9583-8636`$`last-modified-date`
$`0000-0002-9583-8636`$`last-modified-date`$value
[1] 1.554232e+12

$`0000-0002-9583-8636`$group
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     funding-summary
1                                                                                                         NA, GRANT, PUBLIC, 636721, /0000-0002-9583-8636/funding/636721, 1, 1554231778718, 1554231778718, NA, https://orcid.org/0000-0002-9583-8636, 0000-0002-9583-8636, orcid.org, Aaron Conway, NA, Optimising the clinical application of capnography for monitoring of ventilation during sedation in the cardiac catheterisation laboratory, NA, 2016, 04, NA, 2019, 01, Wesley Medical Research, QLD, QLD, AU, http://dx.doi.org/10.13039/100011890, FUNDREF
2                                                                                                                                                                        NA, GRANT, PUBLIC, 636722, /0000-0002-9583-8636/funding/636722, 1, 1554231870559, 1554231870559, NA, https://orcid.org/0000-0002-9583-8636, 0000-0002-9583-8636, orcid.org, Aaron Conway, NA, Maintaining normoTHERMIa during SEDation: The Thermised Pilot Study, NA, 2016, 01, NA, 2016, 12, St. Vincent's Clinic Foundation, NSW, NSW, AU, http://dx.doi.org/10.13039/100012187, FUNDREF
3                                                                                                                         NA, GRANT, PUBLIC, 636723, /0000-0002-9583-8636/funding/636723, 1, 1554231930630, 1554231930630, NA, https://orcid.org/0000-0002-9583-8636, 0000-0002-9583-8636, orcid.org, Aaron Conway, NA, Ascertaining the effectiveness of current nursing practices in maintaining normothermia during procedures performed in the cardiac catheterisation laboratory, NA, 2014, 01, NA, 2014, 12, Interventional Nurses Council, NA, Sydney, NA, AU
4 NA, GRANT, PUBLIC, 636724, /0000-0002-9583-8636/funding/636724, 1, 1554231989632, 1554231989632, NA, https://orcid.org/0000-0002-9583-8636, 0000-0002-9583-8636, orcid.org, Aaron Conway, NA, A pilot study of nurse-led screening for anxiety and depression in adult heart transplant recipients followed by referral for cognitive behaviour therapy ad co-ordination of communication with ongoing specialist and primary care providers, NA, 2014, 01, NA, 2014, 12, Sigma Theta Tau International, IN, IN, US, http://dx.doi.org/10.13039/100012400, FUNDREF
5                                                                                                                                                                                                                     NA, AWARD, PUBLIC, 636725, /0000-0002-9583-8636/funding/636725, 1, 1554232052127, 1554232052127, NA, https://orcid.org/0000-0002-9583-8636, 0000-0002-9583-8636, orcid.org, Aaron Conway, NA, Postgraduate scholarship, NA, 2007, 01, NA, 2008, 12, Queensland Nursing Council, QLD, QLD, AU, http://dx.doi.org/10.13039/501100008912, FUNDREF
6                                                                                                                                                                                                            NA, AWARD, PUBLIC, 636727, /0000-0002-9583-8636/funding/636727, 1, 1554232111471, 1554232111471, NA, https://orcid.org/0000-0002-9583-8636, 0000-0002-9583-8636, orcid.org, Aaron Conway, NA, Australian Postgraduate Award, NA, 2011, 01, NA, 2012, 12, Australian Catholic University, VIC, VIC, AU, http://dx.doi.org/10.13039/501100000990, FUNDREF
7                                                                                                SALARY_AWARD, PUBLIC, 130641, /0000-0002-9583-8636/funding/130641, 0, 1448429260919, 1448429260919, NA, https://orcid.org/0000-0002-9583-8636, 0000-0002-9583-8636, orcid.org, Aaron Conway, NA, Improving nurse-administered sedation practice in the cardiac catheterisation laboratory, grant_number, 1091657, NA, SELF, NA, 2015, 01, NA, 2019, 01, National Health and Medical Research Council, ACT, NA, AU, http://dx.doi.org/10.13039/501100000925, FUNDREF
  last-modified-date.value        external-ids.external-id
1             1.554232e+12                            NULL
2             1.554232e+12                            NULL
3             1.554232e+12                            NULL
4             1.554232e+12                            NULL
5             1.554232e+12                            NULL
6             1.554232e+12                            NULL
7             1.448429e+12 grant_number, 1091657, NA, SELF

$`0000-0002-9583-8636`$path
[1] "/0000-0002-9583-8636/fundings"
─ Session info 
 setting  value                       
 version  R version 3.5.1 (2018-07-02)
 os       macOS  10.14.4              
 system   x86_64, darwin15.6.0        
 ui       RStudio                     
 language (EN)                        
 collate  en_CA.UTF-8                 
 ctype    en_CA.UTF-8                 
 tz       America/Toronto             
 date     2019-04-03  
sckott commented 5 years ago

the amounts need to be requested for each put-code separately it turns out. e.g, .

x <- orcid_fundings("0000-0002-9583-8636")
(pcodes <- vapply(x[[1]]$group$`funding-summary`, "[[", 1, "put-code"))
#> [1] 636721 636722 636723 636724 636725 636727 130641
out <- lapply(pcodes, function(z) orcid_fundings("0000-0002-9583-8636", put_code=z))
vapply(out, function(w) w[[1]]$amount$value, "")
#> [1] "18356"  "25000"  "5000"   "5604"   "5000"   "71664"  "309436"
awconway commented 5 years ago

Fantastic - thanks very much for your help.