Data Module¶
Data loading utilities for example datasets used in documentation and examples. This is an optional subpackage that requires additional dependencies.
Overview¶
The data module provides convenience functions to load example datasets without requiring users to manually download and manage data files. The datasets are either included with the package or downloaded on-demand from reliable sources.
Installation¶
This module has optional dependencies that are not required for the core functionality of carto-flow. To install the data module dependencies:
This will install:
- geodatasets - For accessing example datasets from the geodatasets library
- censusdis - For accessing US census data (optional, for demographic examples)
If these dependencies are not installed, functions that require them will raise a clear ImportError with instructions on how to install the missing packages.
Main Interface¶
| Function | Description |
|---|---|
load_world() |
World countries with population estimates |
load_us_states() |
US states with population and area information |
load_sample_cities() |
Sample cities with population information |
load_us_census() |
US states with ACS demographic data (requires censusdis) |
See Also¶
- Flow Cartogram — Cartogram generation for area-proportional visualizations
- Symbol Cartogram — Symbol-based cartograms
- Proportional Cartogram — Shape splitting and shrinking algorithms