Resources¶
This page contains a curated list of useful resources for social media analysis, including tools, libraries, datasets, and learning materials. The topic pages give the context for each resource, and the research papers have their own page.
Data Collection¶
Platform APIs:
- Bluesky HTTP API - Reference of the Bluesky API
- Bluesky developer guidelines - The rules of Bluesky for API use
- 4chan API - Documentation of the 4chan API
- YouTube Data API v3 - Documentation of the YouTube Data API
Running a collector:
- Supervisor - A tool that keeps a collector running on a server
Data Formats¶
File formats:
- JSON Lines - A file format with one JSON value per line
- Apache Parquet - A binary table format
Python libraries:
- pandas - Python library for tables
- orjson and ujson - Faster replacements for the
jsonmodule of Python - Pydantic - Python library for checking the fields of a record
- json_repair - Python library that tries to repair broken JSON
Command-line tools:
- jq - A command-line tool for viewing and querying JSON
- bat - A version of
catwith syntax highlighting and line numbers - jsonlint.com - A validator for JSON that runs in the browser
Databases¶
Useful resources and tools for working with PostgreSQL:
- PostgreSQL Documentation
- psycopg3 Documentation
- SQLAlchemy - Python library that maps Python classes to tables
Other kinds of databases:
- MongoDB - A database that stores each record as a JSON document
- Redis - A key-value store that keeps the data in memory
- Neo4j - A database that stores nodes and edges
Text Analysis Tools¶
Natural language processing:
- spaCy - Python library for natural language processing
- NLTK - Python library for natural language processing, with tokenizers and stopword lists
- Gensim - Python library for topic modeling
- langdetect - Python library for language detection
- lingua - Python library for language detection
- shifterator - Python library for word shift graphs, which compare two sets of texts
Word embedding:
- gensim-data - The list of pre-trained word vectors that Gensim can download
- GloVe - Pre-trained word vectors from Stanford
Dictionaries:
- VADER Sentiment - Python library for sentiment analysis
- eMFD - The extended Moral Foundations Dictionary
- eMFDscore - Python library that scores text with the eMFD
- vMFD - Python library for moral foundation analysis
Classifiers:
- Text classification models on Hugging Face - A list of trained classifiers that you can download
- twitter-roberta-base-sentiment-latest - A sentiment classifier trained on tweets
- Detoxify - Python library for toxicity detection
Topic modeling:
- BERTopic - Python library for topic modeling
Content moderation:
- Moderate Hate Speech - API for hate speech detection
- OpenAI Moderation API - API for content moderation
Large language models:
- LLM for Computational Social Science - A tutorial on calling large language models from code
- OpenRouter - A service that gives access to models from many providers through one API, with a list of the models and their prices
- tiktoken - A Python library from OpenAI that splits a text into the tokens of OpenAI models, so you can count the tokens before you send the text
Multimodal Content¶
Images:
- CLIP - A model from OpenAI that places text and images in one space
- clip-ViT-B-32 - A CLIP model for the Sentence Transformers library
- Image search examples - Examples of image search, image clustering, and zero-shot classification with Sentence Transformers
Audio transcription:
- Whisper - A speech recognition model from OpenAI for many languages
- Parakeet v2 and Parakeet v3 - Speech recognition models from NVIDIA for English (v2) and for 25 European languages (v3)
- Cohere Transcribe - A speech recognition model from Cohere for 14 languages
Video:
- Video understanding with the Gemini API - Documentation of a language model that accepts a video as input
URLs and Domains¶
URL processing:
- URLExtract - Python library for extracting URLs and domains from text
- requests - Python library for HTTP requests, used to expand shortened links
- tldextract - Python library that finds the domain of a URL
- Public Suffix List - The list of domain endings that
tldextractuses - The URL code of MEIU22 - Code that expands shortened links, with a list of shortening services
Classification and characterization of domains:
- List of news domains - A list of news domains
- Domain quality ratings - A list of domains and their quality ratings
- Media Bias/Fact Check - An organization that rates news sources
- NewsGuard - An organization that rates news sources
- DomainDemo dataset - A dataset of five metrics that describe the audience demographics of different domains
- DomainDemo explorer - A web page for looking up the metrics of a domain
- FortiGuard Web Filter Lookup - A lookup page for the category of a domain
Statistics¶
Statistical computing:
- Scipy - Python library for scientific computing
- scipy.stats - The statistics functions of SciPy
- Statsmodels - Python library for statistical modeling
- R - A language made for statistics
Checking a measurement against labels:
- Metrics and scoring - The part of the scikit-learn user guide on precision, recall, the F1 score, and the AUC score
Learning materials:
- Spurious Correlations - A collection of correlations between unrelated values
- Berkson's paradox - An explanation of how the selection of the data can create a correlation
Datasets:
- Bot Repository - Datasets of social bot accounts and human accounts, including Botwiki-2019
Data Visualization Tools and Resources¶
Data visualization libraries:
- Matplotlib - Python library for creating static plots
- Seaborn - Python library for creating static plots
- Plotly - Python library for creating interactive and web-based plots
- ggplot2 - A plotting library for the language R
- Word cloud - A tool for creating word clouds
Galleries of examples:
- Python Graph Gallery - A collection of examples for data visualization with Python
- Matplotlib gallery - Examples of Matplotlib figures, each with its code
- Seaborn gallery - Examples of seaborn figures, each with its code
Figure design:
- Ten Simple Rules for Better Figures - An article on figure design by Rougier, Droettboom, and Bourne (2014)
- The misuse of colour in science communication - An article on scientific color maps by Crameri, Shephard, and Heron (2020)
Color palettes and accessibility:
- Contrast Checker - A tool for checking the contrast of text and background colors
- Color Oracle - A tool that simulates color-vision deficiency on the whole screen
- Scicolor - A collection of color palettes for scientific data visualization
- Scicolor on PyPI - A Python library for selecting color palettes for scientific data visualization
- Choosing color maps in Matplotlib - The Matplotlib guide on its color maps
Interactive Dashboards¶
- Streamlit - A library for creating interactive web applications
- Streamlit documentation - The documentation of Streamlit
- Bokeh - A library for creating interactive web applications
- Plotly Express - A library for creating interactive web applications
- Altair - A library for creating interactive web applications
Network Science¶
Network science basics:
- A First Course in Network Science - A hands-on introduction to network science and network analysis
- Network Science Book - Free online textbook on network science
- Periodic table of network centrality - More than one hundred centrality measures, each with a link to its paper
Network analysis:
- NetworkX - Python library for network analysis and graph algorithms
- NetworkX tutorial - The tutorial of NetworkX on creating and reading networks
- igraph - Fast network analysis library for Python, R, and C
- graph-tool - Efficient Python library for network analysis with C++ backend
Network visualization:
- Gephi - Software for visualizing and exploring network data
- Gephi quick start - A short guide to the first steps in Gephi
- Helios Web - Interactive web-based network visualization tool
Datasets:
- Character networks of A Song of Ice and Fire - The character interaction networks of the book series, made by Andrew Beveridge