Giter Site home page Giter Site logo

rimpactstory's Introduction

Impact Story

rImpact Story

Impact Story is an effort to generate realtime metrics (aka altmetrics) on academic output (not just papers but also data and code) from a variety of sources. This package provides a programmatic interface to the Impact Story API via R.

Installing this package

library(devtools)
install_github('rImpactStory', 'rOpenSci')

What is the current version of Impact Story's API?

about_IS()
# you can get this as a cleaner output by setting as.df = TRUE
> about_IS(as.df = TRUE)
      Name                                                 Value
1  contact                              totalimpactdev@gmail.com
2    hello                                                 world
3  message Congratulations! You have found the total-Impact API.
4 moreinfo                       http://total-impact.tumblr.com/
5  version                                           jean-claude

It appears that we are currently on version jean-claude. Excellent.

Which providers does IS derive its metrics from?

IS_providers()
# this will return a list. If you prefer a data.frame, then set as.df = TRUE
IS_providers(as.df = TRUE)
> head(IS_providers(as.df = TRUE))
Impact Story currently provides metrics on the following data providers: 
bibtex citeulike crossref dataone delicious dryad facebook github mendeley plosalm pubmed slideshare topsy webpage wikipedia 
 ...
# you can also save this information to a .csv file if you'd like:
write.csv(IS_providers(as.df = TRUE), file = "~/Desktop/IS_providers.csv")

I have a DOI, can I get some metrics on this paper?

# First you need to get a Impact Story ID for any source you wish to track. 
my_id <- ISid('10.1890/ES11-00339.1')
# You can do the same for other namespaces, such as github usernames.
ISid('karthikram', 'github')
# Note that I explicitly specified the namespace since this isn't a doi.

# This function internally calls create_ISid() if a Impact Story ID was not previously assigned to this object. 
# This process is transparent to a user but lower level functions are available to call directly.

# Now we can proceed to getting metrics on this source (I've combined the two functions above).

metrics(ISid('10.1890/ES11-00339.1'))

But I have a large list of DOIs, can I do this for all?

Sure thing!

my_ids <- read.csv('~/Desktop/list_of_dois.csv')
ISids <- llply(as.list(my_ids$doi), ISid, .progress = 'text')
metrics <- llply(ISid, metrics, .progress = 'text')

Looks great but seems a bit reptitive, right? If you have to repeatedly retrieve metrics on a collection of objects, then just make it into a collection!

collection_id <- create_collection(ISids) # function not working yet
# Note that create_collection() needs a list as an input where each item on the list is itself a list with namespace and the id.

metrics <- collection_metrics('kn5auf')
# You can save this to a csv:
save_collection('kn5auf', file = '~/Desktop/collection_metrics.csv')

Neat, can I display these on the web?

Sure, we've included the code you need to paste into your webpage to make that happen. just type in:

collection_id$code (not functional yet)
# and there you have it!
```

# References and resources
* [full API Documentation](http://impactstory.it/api-docs).
* [What are altmetrics?](http://altmetrics.org/manifesto/)

rimpactstory's People

Contributors

karthik avatar

Watchers

 avatar  avatar

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.