Sovereign 8s.is mirror of standardgalactic/a-blue-start
  • Jupyter Notebook 63.3%
  • Python 36.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-01-30 15:44:03 -05:00
data updates 2025-12-15 09:48:00 -05:00
figures added some more stats 2025-12-21 13:03:09 -05:00
starter-code update things... 2025-12-07 18:52:44 -05:00
.gitattributes Initial commit 2025-03-20 21:13:33 -04:00
.gitignore adding requested figures: node follow timing stds and node creation and activity stats 2025-11-30 17:35:04 -05:00
CITATION.cff Update version and release date in CITATION.cff 2026-01-30 15:44:03 -05:00
count_impossible_follow_timings.py updates 2025-12-15 09:48:00 -05:00
fig_settings.py initial commit 2025-03-21 14:01:38 -04:00
get_component_sizes.py update 2025-11-27 13:24:17 -05:00
get_degree_sequences.py updated all figs 2025-11-28 12:39:11 -05:00
get_starterpack_clustering.py format with isort and black 2025-12-21 13:04:02 -05:00
get_starterpack_k_core.py updated all figs 2025-11-28 12:39:11 -05:00
get_starterpack_kendall_tau.py update 2025-11-27 13:24:17 -05:00
get_starterpack_pair_cooccurrence.py updated all figs 2025-11-28 12:39:11 -05:00
get_starterpack_s_line_counts.py updated all figs 2025-11-28 12:39:11 -05:00
get_starterpack_stats.py added some more stats 2025-12-21 13:03:09 -05:00
LICENSE updated the license 2025-05-07 13:53:58 -04:00
plot_network_stats.ipynb added some more stats 2025-12-21 13:03:09 -05:00
plot_node_stats.ipynb added some more stats 2025-12-21 13:03:09 -05:00
plot_starterpack_stats.ipynb format with isort and black 2025-12-21 13:04:02 -05:00
README.md updating readme with info on starter code 2025-12-08 21:24:26 -05:00
requirements.txt updated analysis code 2025-08-13 17:37:02 -04:00
stats.md added some more stats 2025-12-21 13:03:09 -05:00

a-blue-start

This repository accompanies the preprint "A Blue Start: A large-scale pairwise and higher-order social network dataset" by Alyssa Smith, Ilya Amburg, Sagar Kumar, Brooke Foucault Welles, and Nicholas W. Landry. It provides all codes for reproducing the analyses and figures in the manuscript.

Repository structure:

  • data contains data on the network statistics plotted in Figs. 1-6 in the paper.
  • figures contains the Figs. 1-6 in the paper.
  • starter-code contains example code for loading the datasets into igraph and graph-tool.

Scripts

The following scripts are used to generate statistics from the network data:

  • get_degree_sequences.py: This script is used to get the in- and out-degree sequences for the following network; it saves them as .csv or .csv.gz files.
  • get_component_sizes.py: This script obtains the sizes of the weakly and strongly connected components for the following network and saves them as gzipped CSV files.
  • get_starterpack_clustering: This script is used to get node cluster labels based on the Leiden algorithm and then compute the normalized entropies of each edge.
  • get_starterpack_k_core.py: This script performs a k-core decomposition of the starter packs.
  • get_starterpack_kendall_tau.py: This script compares nodal rankings from the starter pack network and compares to the following network ranking using the Kendall Tau measure.
  • get_starterpack_pair_cooccurrence.py: This script returns the distribution of two-node co-occurrence frequencies in the starter pack network.
python get_pair_co-occurrence.py --input_filepath "deidentified_starterpack_hif.json.gz" --max_pack_size 4069 --num_workers 10
  • get_starterpack_pair_s_line_counts.py: This script returns the number of nodes and edges in the s-line graph for s=1,2,\dots,345. It can be run as follows:
python s_line_count.py --input_filepath "deidentified_starterpack_hif.json.gz" --smin 1 --smax 345 --output data/s_count.csv
  • get_starterpack_stats.py: This script returns basic statistics of the starter pack network as a JSON file.

Plotting

  • plot_network_stats.ipynb: This notebook plots Fig. 4 and also prints the basic network statistics in a readable way.
  • plot_starterpack_stats.ipynb: This notebook plots Figs. 1-3, 5 and also prints the basic starter pack statistics in a readable way.

Starter Code

  • starter-code/graph-tool_load.py loads the node dataset as a polars dataframe, the starter pack dataset in XGI, and the following network in graph-tool. This code uses about 310 GB of RAM and takes about 2.75 hours to run.
  • starter-code/igraph_load.py loads the node dataset as a polars dataframe, the starter pack dataset in XGI , and the following network in igraph. This code uses about 460 GB of RAM and took about 5.5 hours to run.

Getting started

Start by downloading the data from the Social Media Archive @ ICPSR (SOMAR).