Custom styles for W.E.B DuBois-inspired data visualizations
Project description
DuBois Python Data Portraits
A Python library for creating data visualizations inspired by W.E.B. Du Bois' iconic data portraits from the 1900 Paris Exposition.
Overview
This library provides tools to help create visualizations in the distinctive style of W.E.B. Du Bois' groundbreaking work, which combined statistical rigor with striking visual design to tell the story of African Americans at the turn of the 20th century.
Features
-
Custom Color Palettes: Pre-defined color schemes extracted from Du Bois' original visualizations
- Qualitative palettes for categorical data
- Sequential palettes for continuous data
- Diverging palettes for data with meaningful midpoints
-
Typography Support: Access to Baskerville font recommendations matching Du Bois' original style
-
Matplotlib Integration: Custom matplotlib style file (
.mplstyle) for consistent theming -
Easy Palette Access: Simple helper functions to retrieve and apply color palettes
Installation
pip install dubois
Quick Start
import dubois
import matplotlib.pyplot as plt
# Apply DuBois style to matplotlib
dubois.use_style()
# Get a color palette
palette = dubois.get_palette('dubois_cat_01')
# Use in your visualizations
plt.plot(x, y, color=palette[0])
Color Palettes
The library includes multiple palette categories:
- Qualitative: For categorical data (e.g.,
dubois_cat_01) - Sequential: For continuous data (e.g.,
dubois_seq_01) - Diverging: For data with meaningful center points (e.g.,
dubois_div_01)
Inspiration
This project draws inspiration from W.E.B. Du Bois' "Data Portraits Visualizing Black America," which showcased innovative data visualization techniques including choropleth maps, bar charts, and area charts to represent demographic, economic, and social data about African Americans.
License
MIT License
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Acknowledgments
This library is inspired by the pioneering data visualization work of W.E.B. Du Bois and the comprehensive analysis found in "W.E.B. Du Bois's Data Portraits: Visualizing Black America" edited by Whitney Battle-Baptiste and Britt Rusert.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dubois-0.1.0.tar.gz.
File metadata
- Download URL: dubois-0.1.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af8a12df8cad3b48ade69709ffea9fcb5cae7bda8c4e3338bc66d697e7036bc4
|
|
| MD5 |
80b115b2e76eb4ef6af2d67fecf3eaba
|
|
| BLAKE2b-256 |
8d1b7ceb3360d2c597e3dfedaa040c68e5b13fd9e6711352a824e2fafff3a053
|
File details
Details for the file dubois-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dubois-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddb9b8f0e6b7a621d23b8f9aac5d011097db044da86058eead04df27017ec7a2
|
|
| MD5 |
80a37673ed293bddf148bcbce82334ad
|
|
| BLAKE2b-256 |
9cde1ccc9ce468751578948369e8c81d099a41e9b6bdb21adc41b2d8eafc4d29
|