bivario
Python library for plotting bivariate choropleth maps in Matplotlib, Folium and Lonboard.
Documentation · Examples · Palettes · API reference
Installation
With pip:
pip install bivario
With uv:
uv add bivario
With conda:
conda install conda-forge::bivario
Usage
Example of a Folium map in light and dark modes.
Simple Folium map:
from bivario import explore_bivariate_data
from bivario.example_data import nyc_bike_trips
explore_bivariate_data(
nyc_bike_trips(), "morning_starts", "morning_ends"
)
Simple Lonboard map:
from bivario import viz_bivariate_data
from bivario.example_data import nyc_bike_trips
viz_bivariate_data(
nyc_bike_trips(), "morning_starts", "morning_ends"
)
In dark mode:
from bivario import explore_bivariate_data
from bivario.example_data import nyc_bike_trips
explore_bivariate_data(
nyc_bike_trips(),
column_a="morning_starts",
column_b="morning_ends",
dark_mode=True, # default is False
)
Use other palette:
from bivario import explore_bivariate_data
from bivario.example_data import nyc_bike_trips
explore_bivariate_data(
nyc_bike_trips(),
column_a="morning_starts",
column_b="morning_ends",
cmap="bubblegum"
)
Set numerical mode (disable bucketing):
By default, map is created using
Mapclassifylibrary withNaturalBreaksmethod to split data into 5 categories. Method and number of buckets can be changed or disabled completely.
from bivario import explore_bivariate_data
from bivario.example_data import nyc_bike_trips
explore_bivariate_data(
nyc_bike_trips(),
column_a="morning_starts",
column_b="morning_ends",
dark_mode=True,
cmap="late_sunset",
scheme=False, # or set to None
legend_size_px=300,
)
Example of a Folium map in a numerical mode.
Bivariate colourmaps
Palettes in bivario are created by blending 2 or 4 colours in a 2D space using OKLab colour space. The operations on input and output are done in RGB, an internally are transformed into OKLab values using colour-science library.
bivario has 4 modes of Bivariate colourmaps:
AccentsBivariateColourmap - defined by two accent colours and a light and a dark colour.
CornersBivariateColourmap - defined by 4 corner colours (accent a/b, low value and high value)
MplCmapBivariateColourmap - defined by 2 Matplotlib colourmaps along axis X and Y
NamedBivariateColourmap - can load predefined palette from string name
Available palettes
You can load these palettes by passing a string name to the cmap attribute, or load a NamedBivariateColourmap object:
cmap = NamedBivariateColourmap("coral_ocean")
# You can call it similar to Matplotlib Colormap object
rgb_values = cmap(values_a=[0, 1], values_b=[0, 1])
Metadata
Release files for bivario 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bivario-0.4.0.tar.gz | 101.4 kB | Without provenance | Details for bivario-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bivario-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for bivario-0.4.0-py3-none-any.whl |
Total release size: 203.9 kB
Release files / bivario-0.4.0.tar.gz
| Download URL | bivario-0.4.0.tar.gz |
|---|---|
| Size | 101.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
210ff2a289696f9f0537c6b3b5ef84afba0bc11f931b5a834a846da1865317ae
|
|
BLAKE2b-256 checksum How to use checksums |
122598ff3dd7b6c52771cae825db9be6779618c56baaf9e87962781a0de43c9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / bivario-0.4.0-py3-none-any.whl
| Download URL | bivario-0.4.0-py3-none-any.whl |
|---|---|
| Size | 102.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
12fc39d50812fe1848c9bd9fb64e91f8170be6749008f2eaef044ebec6bf40c2
|
|
BLAKE2b-256 checksum How to use checksums |
45240600c5178a074f1268a69dd6c5fd8d388b1fae68ba1ec0722e0a1a162112
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for bivario 0.4.0
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.