Read-only mirror of https://github.com/epfl-dlab/anticipated-vs-actual — EPFL Data Science & AI Lab (dlab). Issues & pull requests at the source.
  • Jupyter Notebook 98.4%
  • Python 1.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2022-08-25 10:52:42 +02:00
data add requirements.txt 2022-08-25 10:40:27 +02:00
notebooks Merged repositories 2022-08-16 12:46:25 +02:00
src Merged repositories 2022-08-16 12:46:25 +02:00
constants.py Merged repositories 2022-08-16 12:46:25 +02:00
LICENSE Initial commit 2022-08-12 17:27:32 +02:00
README.md Update README.md 2022-08-25 10:52:42 +02:00
requirements.txt add requirements.txt 2022-08-25 10:40:27 +02:00

Code anda data for: Anticipated versus Actual Effects of Platform Design Change: A Case Study of Twitter's Character Limit

Repository structure


├── README.md          <- The top-level README
├── constants.py       <- Project constants: data paths, data sources
├── data               
│   ├── measurements   <- Intermediate .csv data files with cramming and runover measurements created with scripts in `src`
│   └── batches        <- Raw data used to create .csvs in measurements, check out instructions below on how to download the files
│
├── notebooks          <- Jupyter notebooks with code to plot figures from the paper
│   ├── Fig1: Diagram.ipynb
│   ├── Fig2: Cramming.ipynb
│   ├── Fig3: POS_analysis.ipynb
│   ├── Fig4: POS_analysis.ipynb
│   ├── Fig5: Topics LIWC v2.ipynb
│   ├── Fig6: Diagram.ipynb
│   ├── Fig7: Diagram.ipynb
│   ├── Fig8: Cramming.ipynb
│   ├── Fig9: Cramming.ipynb
│   ├── FigS1:  FigS1a.ipynb and FigS1b.ipynb
│   ├── FigS2:  FigS2.ipynb
│   ├── FigS3:  FigS3.ipynb
│   ├── FigS4:  Cramming.ipynb
│   └── FigS5:  Cramming.ipynb
│
├── requirements.txt   <- The requirements file for reproducing the analysis environment
│
├── src                <- Source code used to create .csv data files in data/measurements.
└──

System requirements and installation guide

We recommend a local installation of new Python virtual environment. The code was tested on Ubuntu 18.04. Please use the packages versions provided in requirements.txt

  1. To obtain the raw data, go to our Zenodo repository, download 40 batch files and place them under data/batches.

  2. Open the terminal. To avoid any incompatibility issue, please create a new virtual environment. This project was created using virtualenvwrapper

pip install virtualenvwrapper
mkvirtualenv tweets -r requirements.txt -p python3.7

The environment should be activated automatically, if not use:
workon tweets

To deactivate the environment simply use:
deactivate

  1. Start a Jupyter notebook server if you want to reproduce the plots.
    cd notebooks
    jupyter notebook

  2. To regenerate the intermediate .csv files you can do it using scripts from src.

Cite us