Skip to main content

Demoviz - demographic visualization

note Fell free to fork or use it as a template for your own project with other icons.

Installation

pip install demoviz

Demoviz

Demoviz is a library for creating demographic visualizations. Using human vector icons, it can create scatter plots of demographic data, coloring the icons by the demographic data. and highlight the icons by the demographic data.

Acknowledgments

the icons have been retrieved from wikimedia commons.

# female icon
wget https://upload.wikimedia.org/wikipedia/commons/f/f9/Woman_%28958542%29_-_The_Noun_Project.svg
# male icon
wget https://upload.wikimedia.org/wikipedia/commons/d/d8/Person_icon_BLACK-01.svg

Example

See readme in example directory for more details, but her in short:

cd example  
python demographic_change.py
python disease_analysis.py

The data displayed is from 2023 and beatifully visualized the fall of the berlin wall and the reunification of germany. demographic_change

But also the disease burden and the sex-specific disease burden are visualized. disease_analysis

Baby icons are also available for pediatric and child health visualizations.

wget https://upload.wikimedia.org/wikipedia/commons/9/9d/Baby_%2875158%29_-_The_Noun_Project.svg

Baby Icon Example

import numpy as np
import matplotlib.pyplot as plt
from demoviz import DemoScatter

# Create sample baby health data
ages = [0, 6, 12, 18, 24]  # Age in months
weights = [3.5, 7.0, 9.5, 11.0, 12.5]  # Weight in kg

# Create the plot
fig, ax = plt.subplots(figsize=(8, 6))

# Initialize DemoScatter with baby icons
demo = DemoScatter(icon_size=40, zoom=0.4)

# Plot babies with baby icons
demo.plot(ax, ages, weights, icon_type='baby', colors='lightblue')

# Customize the plot
ax.set_xlabel('Age (months)')
ax.set_ylabel('Weight (kg)')
ax.set_title('Baby Growth Chart')
ax.grid(True, alpha=0.3)

plt.tight_layout()
plt.show()

Available icon types: 'baby', 'child', 'infant', 'male', 'female', 'person'

In any case, if you ever need to plot some human icons or icons in general, you can use the demoviz library.

Demoviz

Demoviz is a library for creating demographic visualizations.

Metadata

Release files for demoviz 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for demoviz 0.1.1
File Size Uploaded Provenance
demoviz-0.1.1.tar.gz 1.9 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for demoviz 0.1.1
File Interpreter ABI Platform
demoviz-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 2.0 MB

Release files / demoviz-0.1.1.tar.gz

Download URL demoviz-0.1.1.tar.gz
Size 1.9 MB
Tags Source
SHA-256 checksum
How to use checksums
827eeca2a17a74d35a1157c1bf919493b074315d45eaa8490e1498f3cd57dac2
BLAKE2b-256 checksum
How to use checksums
abb0f390b64abc73767ca30bcfc6cc100589ac0761d84206077259f8c768717a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.15

Release files / demoviz-0.1.1-py3-none-any.whl

Download URL demoviz-0.1.1-py3-none-any.whl
Size 28.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
26857f37f01663a63e31e1d9c008d13f759f1e8eba397d3487424c3f912b4ed7
BLAKE2b-256 checksum
How to use checksums
e9a2ea9356ef4d81daeea0773d4a35ef25f1bbf6b348dd9f4361b2d6a523a474
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.15

Security for demoviz 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page