Reproduction code for: How much research shared on Facebook is hidden from public view?
A comparison of public and private online activity around PLOS ONE papers
Authors: Asura Enkhbayar, Stefanie Haustein, Germana Barata, Juan Pablo Alperin
Resource | Link |
---|---|
Preprint | TBD |
Article | TBD |
Code | Zenodo (doi:10.5281/zenodo.3381821) |
Data | Dataverse (doi:10.7910/DVN/3CS5ES) |
This repository contains all figures and tables present in the manuscript for "How much research shared on Facebook is hidden from public view?". Output files can be found in:
figures/
- contains all figures used in the manuscripttables/
- contains all programmatically created tables used in the manuscript
Furthermore, all the input data and code required to reproduce results are provided with instructions. Provided scripts include:
download_data.sh
- to download input dataprepare_data.py
- data preprocessinganalysis.py
- data analysis and outputs
This article is part of a broader investigation of the hidden engagement on Facebook. More information about the project can be found here.
The data used in this paper was collected using our own methods. The data collection method is described in [Enkhbayar and Alperin (2018)(https://arxiv.org/abs/1809.01194)]. Code & instructions can be found here.
All scripts have been written with Python 3.x. To explore results interactively a working instance of Jupyter Notebooks/Labs is required.
Packages specified in requirements.txt
can be installed via
pip install -r requirements.txt
-
Clone this repository and cd into the scripts folder
git clone [email protected]:ScholCommLab/fhe-plos-paper.git cd fhe-plos-paper/scripts
-
Download data from Dataverse.
All the data is hosted on dataverse: Dataverse repository
Using the helper script provided, you can download all files into the respective locations. Make the script executable and ensure that you have
wget
installed.chmod +x download_data.sh ./download_data.sh
-
Preprocess data
Run the preprocessing script to apply transformations on the input dataset. This step creates the file
data/articles.csv
python process_data.py
-
(Re)produce results
Run the analysis script to produce figures and tables.
python analysis.py
Optionally, you can also open the notebook
analysis.ipynb
with Jupyter to explore the dataset and results.