You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Star10 (10)You must be signed in to star a repository
About
PyStatlas: A Python gallery of statistical graphics for the social sciences, by Thierry Warin (www.warin.ca). Examples of charts on real social-science data, organised by the question they answer; every figure reports its statistics, with copy-paste code.
A Python gallery of statistical graphics for the social sciences.
61 charts · 12 families · copy‑paste Python code · inspired by the R Graph Gallery, ggstats and ggstatsplot.
PyStatlas is a curated atlas of statistical charts for Python: coefficient plots, odds‑ratio forests, Likert scales, Kaplan–Meier curves with risk tables, regression diagnostics, SHAP explanations, spatial autocorrelation maps, meta‑analysis forests and more. Each chart is a single, self‑contained script built on NumPy, pandas, Matplotlib, seaborn, SciPy, statsmodels, scikit‑learn, lifelines, SHAP, GeoPandas, Shapely, libpysal and esda — no downloads, no hidden helpers.
The examples are set in published research
Nearly every chart takes its setting from one of Thierry Warin's papers — party manifestos, central-bank speeches, fake news on Facebook, patent grants in China's pharmaceutical industry, the Mundellian trilemma, waste reduction in manufacturing — and the spatial charts from the CIRANO GVCdtLab's digital twin of the Great Lakes–St. Lawrence corridor. The data are small seeded simulations, just large enough to show the method: they are labelled as simulated on every figure and are not the papers' data or results. The full reference is printed under each chart. The exceptions: the power curve uses no data, and the meta-analysis and funnel plots use real data — a published table by Raudenbush (1984), typed in.
The repository is the gallery
i18n/ website translations (en, fr, ja, zh)
gallery/
<NN-family>/
_category.yaml family title + summary
<NN-chart>/
plot.py the code (metadata in the docstring)
plot.png the rendered figure
README.md browsable on GitHub
Browse the folders right here on GitHub, or visit the website.
If PyStatlas helped your research, teaching or work, please cite it:
Warin, T. (2026). PyStatlas: A Python Gallery of Statistical Graphics for the Social Sciences (Version 1.1.0) [Computer software]. https://warint.github.io/pystatlas/
@misc{warin2026statlas,
author = {Warin, Thierry},
title = {PyStatlas: A Python Gallery of Statistical Graphics for the Social Sciences},
year = {2026},
version = {1.1.0},
howpublished = {\url{https://warint.github.io/pystatlas/}},
note = {Source code: https://github.com/warint/pystatlas}
}
GitHub's "Cite this repository" button (right sidebar) gives APA and BibTeX from CITATION.cff.
PyStatlas: A Python gallery of statistical graphics for the social sciences, by Thierry Warin (www.warin.ca). Examples of charts on real social-science data, organised by the question they answer; every figure reports its statistics, with copy-paste code.