GithubHelp home page GithubHelp logo

massimoaria / dimensionsr Goto Github PK

View Code? Open in Web Editor NEW
36.0 2.0 7.0 102 KB

Gathering metadata about publications, patents, grants, clinical trials and policy documents from DS Dimensions using DSL API

License: Other

R 48.68% HTML 51.32%
gathering-bibliographic-records ds-dimensions dsl-api bibliometrix bibliometrics grants grants-search bibliographic-database bibliography publications

dimensionsr's People

Contributors

massimoaria avatar natesheehan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dimensionsr's Issues

Possibility of using facets?

Dear Massimo

I love all the resources you/your group provide for bibliometric analyses - what a great resource. I am trying to filter my outputs using other fields in particular the Fields of Research codes in Dimensions but have not succeeded in returning this data from an API query.

The category_for is the Fields of Research codes is available for filtering the data on the online GUI, but I haven't figured out how to incorporate it into the query easily from R using the API. See more about the use of these codes - its related to concepts but seems to be more detailed. If the link doesn't work the title is "Recategorising research: Mapping from FoR 2008 to FoR 2020 in Dimensions"

The category_for field seems to be available as a facet (does that mean a one to many relationship per publication? I think so).

Can you figure out how to add facets to your query functions? I am struggling to get the escapes and quotations right.

Cheers

Chris Buddenhagen

Returning author data?

I am not sure how to access certain author data using this package. 1) how do I change a search "in title_abstract_only" to "in authors"? 2) How can I return Dimensions author ID numbers of the form "ur.[numeric string]"? I can only return publication ID numbers of the form "PUB.[numeric string]." Thank you!

ID missing in pub2df --> dsApi2df

Dear developers,

Thank you so much for this great library! I just wanted to let you know that I noticed that id (a["id"]) is a missing field in the pub2df function.

Best
Philipp Baaden

Question about "categories" in query

Hi, thanks for the helpful package. I'd like to better understand how "category" in the dsQueryBuild command corresponds to the Field of Research in the Dimensions data. If, for example, we would like to pull all the articles for field of research == "46 Information and computing sciences" for a particular time range, is there a way to achieve that using this R package? I tried doing this and the number of articles obtained does not seem to match the number I get by specifying a field of research on the Dimensions website. Thank you!

Missing data from API pulls after using dsApi2df

Hi there,

I work at Digital-Science (home of Dimensions) and I spent some time doing a few basic data pulls from the Dimensions API using your package. It works really well overall, but I noticed there are some fields that aren't coming through from dsApi2df when the API query includes fieldsets other than [all].
Fields coming through as "" (blank) are:
-AU
-AF
-SC
-CR
-AU_UN
-AU1_UN.
-AU_CO
-AU1_CO

There might be more than this, but these are the ones I noticed right away. I think it may have something to do with differences in the field names between the API results and what dsApi2df is expecting.

Here is the query I used that dsApi2df had a problem with:

'search publications 
in title_abstract_only for \"\\\"nano*\\\" AND \\\"drug delivery\\\"\" 
where year in [2010:2020] return publications[basics+extras]'

Running the same query with return publications[all] does not have any issues, though.

Let me know if you have any questions for us. I'd be happy to try to answer them myself or connect you with someone from our API team.

Cheers,

Sam

Obligatory session info:

R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Catalina 10.15.4

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] dimensionsR_0.0.1 forcats_0.4.0     stringr_1.4.0     dplyr_0.8.3       purrr_0.3.3       readr_1.3.1      
 [7] tidyr_1.0.0       tibble_2.1.3      ggplot2_3.2.1     tidyverse_1.2.1  

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.2       cellranger_1.1.0 pillar_1.4.2     compiler_3.6.1   tools_3.6.1      zeallot_0.1.0    lubridate_1.7.4 
 [8] jsonlite_1.6     lifecycle_0.1.0  nlme_3.1-140     gtable_0.3.0     lattice_0.20-38  pkgconfig_2.0.3  rlang_0.4.1     
[15] cli_1.1.0        rstudioapi_0.10  curl_4.2         haven_2.1.1      xfun_0.10        withr_2.1.2      xml2_1.2.2      
[22] httr_1.4.1       knitr_1.25       generics_0.0.2   vctrs_0.2.0      hms_0.5.1        grid_3.6.1       tidyselect_0.2.5
[29] glue_1.3.1       R6_2.4.0         readxl_1.3.1     modelr_0.1.5     magrittr_1.5     backports_1.1.5  scales_1.0.0    
[36] rvest_0.3.5      assertthat_0.2.1 colorspace_1.4-1 stringi_1.4.3    lazyeval_0.2.2   munsell_0.5.0    broom_0.5.2     
[43] crayon_1.3.4 

make dsApi2df more flexibel?

Hey,

I have found that using dsApi2df depends on a standard return field (i.e. containing the standard information). It would be great if dsApi2df was more flexible in that it could convert any publications return object (or other entity) to a df.

E.g.
search publications return publications
-> can be converted to a df

search publications return publications[id+doi+research_orgs]
-> does not work

dsApi2df for extracting more columns

Hello,
Thank you for this package. The dsApi2df function only returns selected columns. However, I have more nested data about funder information (funders, funder_countries) for clinical trial IDs. Could the function be adapted for extracting these data frames too.

Thank you again.

difficulty running query

New to DimensionsR. Trying to run the example code from [here] (https://cran.r-project.org/web/packages/dimensionsR/vignettes/A_Brief_Example.html) to test it out. The example code is below alongside this error code:

Error in res$total_count : $ operator is invalid for atomic vectors

Any help would be appreciated!

`#query dimensions
query <- dsQueryBuild(item = "publications",
words = "bibliometric*",
type = "article",
categories = "management",
start_year = 1980, end_year = 2023,
output_fields = "all")

query

#check effectiveness of query
res <- dsApiRequest(token = token, query = query, limit = 0)

res$total_count

#Error in res$total_count : $ operator is invalid for atomic vectors`

Searching metadata for specific DOIs

Is there any way to search for metadata based on specific DOIs?

I tried this approach:

QUERY1 <- "10.1109/wfcs.2015.7160587 OR 10.1109/irps.2019.8720541 OR 10.1364/assl.2017.jtu2a.48 OR 10.1097/01.hjh.0000467419.26688.b0 OR 10.3139/147.110446 OR 10.1002/bapi.201610010 OR 10.1002/adma.202002525 OR 10.1515/ms-2017-0245 OR 10.1364/oe.26.009963 OR 10.1364/ol.40.002068"

token <- dsAuth(key = myapikey) # replace this with your API key
query1 <- dsQueryBuild(words = QUERY1)
D1 <- dsApiRequest(token = token, query = QUERY1, limit = 5000, verbose = TRUE)

... but that doesn't work.

At https://docs.dimensions.ai/dsl/language.html I can find no mention of DOIs at all. Does DSL simply does not support this function?

OA column returns NA values

When fetching the basics data fields the Open Access column always returns NA's.

I have looked at the response and have a fix for this.

formatting for dsApiRequest query not built with dsQueryBuild

Hi Massimo,

I recently submitted an issue for bibliometrix regarding difficulty uploading a dimensions csv file. As a workaround, I wanted to re-run the query myself using dimensionsR (to hopefully avoid the formatting issues with the existing files). However, my query asks for things that appear to be outside the current functionality of either dsQueryBuild or biblioshiny (specifically, searching for all publications from a given research org). I see that in #3 you mention that dsApiRequest can be used to run queries not built with dsQueryBuild. However, since the dsApiRequest documentation only gives an example using dsQueryBuild, I'm not sure about any special formatting or other requirements.

The query I ran in Dimensions is:

search publications where type != "preprint" and year in [2022 : 2023]
and research_orgs = "grid.25879.31" return publications[title + type +
doi + journal + publisher + date + year + open_access + authors + researchers
+ research_orgs + funders + category_for + category_sdg + altmetric + times_cited]

Do I simply assign this (in quotes) as query and pass it into dsApiRequest that way? Are any additional formatting or other changes required?

Thanks,
Kelly

Request: Optional arguments for other API endpoints

Hi Massimo,

We have other instances of the Dimensions API that we would like to access through dimensionsR. Could you add an optional argument to the necessary functions to specify endpoints other than app.dimensions.ai?

Thanks,

Sam

dsApiRequest: make skip argument optional (error with facets)

When querying for facets, offset parameters, i.e. "skip" are not supported. However, dsApiRequest automatically adds skip.

E.g.
search publications where research_orgs in ["grid.10420.37"] and year>2021 return year limit 1000 skip 100
-> Semantic errors found: Offset is not supported for facet results

search publications where research_orgs in ["grid.10420.37"] and year>2021 return year limit 1000
-> works

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.