Claudia,
a simple example (using the 5 most-tweeted PLOS articles,
http://alm.plos.org/sources/twitter) would be the following:
library(alm)
dois <- c("10.1371/journal.pbio.1001535","10.1371/journal.pone.0046362","10.1371/journal.pmed.0020124","10.1371/journal.pntd.0001969","10.1371/journal.pone.0040259")
api_key <- "YOUR_KEY"
events <- almevents(doi=dois, source="twitter",key=api_key)
The variable „events“ now contains close to 5,000 tweets (username, text, datetime), grouped by DOI. You will need to do some reformatting, depending on what you want to do with the information. Scott can give you a more detailed example, but I have the advantage of being in your time zone (I’m based in Hannover, Germany).
Best,
Martin
Am 06.12.2013 um 01:02 schrieb scott_chamberlain <
myrmec...@gmail.com<mailto:
myrmec...@gmail.com>>:
Hi Claudia,
I am a developer of rplos and alm packages. How can I help? What are you searching for?
Scott
On Thursday, December 5, 2013 7:03:25 AM UTC-8,
claudia....@student.hu-berlin.de<
http://student.hu-berlin.de> wrote:
Dear Martin
Some example code would be great.
Best regards
Claudia
On Thursday, December 5, 2013 1:38:25 PM UTC+1, Martin Fenner wrote:
Claudia,
the limit of DOIs per request is 50, and the almevents library automatically breaks up the DOis in batches of 30. You can therefore import the data from a CSV file. Let me know if you need some example code.
Best,
Martin
Am 05.12.2013 um 13:34 schrieb
claudia....@student.hu-berlin.de<mailto:
claudia....@student.hu-berlin.de>:
Dear Martin
Thank you for the quick and useful answer!
When looking at the tutorial, I wondered if there is also an example available for collecting detailed tweet data for several DOIs (e.g. by importing data from a .csv-file).
And another question: Is there a limit concerning the numbers of DOIs per request?
Thanks again for your help.
Best regards
Claudia
On Wednesday, December 4, 2013 5:52:01 PM UTC+1, Martin Fenner wrote:
Claudia,
the rplos package has undergone significant changes, and the relevant code is now in the alm package. The alm package has a new function called „almevents“ that shows individual tweets per paper and you don’t need the script almEventFetch anymore. The rOpenSci tutorial page at
http://ropensci.org/tutorials/alm_tutorial.html includes an example with information about tweets, including user, content of tweet and date.
Best,
Martin
Am 04.12.2013 um 17:45 schrieb
claudia....@student.hu<
http://student.hu>-<
http://student.hu-berlin.de/>
berlin.de<
http://berlin.de/><
http://student.hu-berlin.de/>:
Dear Developers
In order to collect individual tweets for a set of PLOS papers based on their DOIs, I tried to execute the R-script " almEventFetch" (
https://github.com/articlemetrics/plosOpenR/commit/794864a1997f65abb0ae7e34fe9364bf649c3075).
Before doing so, I installed the rplos-package from
https://github.com/articlemetrics/rplos and registered for an API key that I put in my .Rprofile file as described.
When executing the script, R told me that the function "almplosallviews" could not be found. I changed it to "alm" but unfortunately, R gave me the same response.
My question is now as follows: What changes do I have to make to the script in order to get it running? Or is their another R script available which can be used in order to fetch individual tweets? I am particularly interested in the following information: user (author of the tweet), link to the tweet, date of the tweet and the content of the tweet itself.
I thank you in advance for your support.
Kind regards
Claudia Lienhard
Master's student at the School of Library and Information Science at the Humboldt-Universität zu Berlin
--
You received this message because you are subscribed to the Google Groups "PLOS API Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
toplos-api-devel...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to
plos-api-develo...@googlegroups.com<mailto:
plos-api-develo...@googlegroups.com>.
For more options, visit
https://groups.google.com/groups/opt_out.
________________________________
Confidentiality Notice: This email and any attachments are solely for the use of the intended recipient, contain confidential and proprietary information, and may be privileged. If you are not the intended recipient (or authorized to receive messages for, or deliver them to, the intended recipient), you may not use, copy, disclose or distribute this email and any attachments. If you think you received this email in error, please notify the sender by return email or by telephone, and delete this email and any attachments from your system.
Disclaimer/Virus Notice: The views or opinions expressed in this email are those of the sender and do not necessarily represent those of Public Library of Science unless otherwise specifically stated. Neither PLOS nor any of its agents accept any responsibility for any viruses that may be contained in this email or any attachments, and it is your responsibility to scan the email and any attachments.
--
You received this message because you are subscribed to the Google Groups "PLOS API Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
plos-api-develo...@googlegroups.com<mailto:
plos-api-develo...@googlegroups.com>.