Facebook Hidden Engagement - PLOS ONE
Python and R scripts to collect data used to investigate the difference between public and private engagement numbers for PLOS ONE publications. Detailed description of the methodology can be found in this conference article presented at STI 2018.
More information about Hidden Engagement on Facebook and related projects can be found here.
- Initial Data collection
- Collect all PLoS ONE articles for specified date range using the r-package rplos.
- Add identifiers provided by NCBI's FTP Service which provides the file PMC-ids.csv.gz.
- Create URLs for each article
- See table below for more details.
- Collect Facebook engagement counts
- Facebook: Query Graph API with each URL
- Altmetric LLP: Query the Altmetric API with each DOI
For each article (DOI, pmid, pmcid) we create 10 different URLs which we then use to query the Facebook Graph API.
- Run
pip install -r requirements.txt
to install python packages. - Install required r packages:
rplos
- Create
config.cnf
based ondefault_config.cnf
and fill in your details - Set the date range in
code/0_download_plos.R
- Run scripts in
code
in order
rplos:
Scott Chamberlain, Carl Boettiger and Karthik Ram (2018). rplos: Interface to the Search API for 'PLoS' Journals. R package version 0.8.4. https://CRAN.R-project.org/package=rplos
Facebook Graph API
NCBI's FTP service provides access to article identifiers:
Altmetric LLP data through their API: