Skip to main content

hea: R-style Linear Models without R (but with Python)

Install

pip install hea

for core functionalities.

or if you want to load the example datasets:

pip install "hea[data]"

Usages

Data transformation and visualization

hea supports mostly tidyverse compatible api (can be chained with the classic + or with the method-based . in the fluent API style) for data manipulation:

from hea import data

penguins = data("penguins", package="palmerpenguins")
penguins.glimpse()
(
    penguins.ggplot(
        x="flipper_length_mm", y="body_mass_g", color="species", shape="species"
    )
    .geom_point()
    .geom_smooth(method="lm")
)

We use Polars DataFrame under the hood. It's basically tidypoars + plotnine, but in a more integrated manner. More examples can be found in examples/books/r4ds

Linear model(s)

Currently lm and gam are relatively mature, while glm and gmm (generalized mixed models, the lmer and glmer equivalents) are relatively rudimental:

from hea import data
from hea.models import lm

gala = data("gala", package="faraway")
m = lm("Species ~ Area + Adjacent + Elevation + Nearest + Scruz", gala)
m.summary()
from hea import data
from hea.models import gam
from hea.family import Gamma

trees = data("trees", "mgcv")

ct1 = gam("Volume ~ s(Height) + s(Girth)", family=Gamma(link="log"), data=trees)
ct1.summary()
ct1.plot_smooth(partial_residuals=True)

See more examples in examples/books/lmwr, examples/books/gam and more.

Metadata

Release files for hea 0.2.0

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

Source distribution (sdist)

Source distribution for hea 0.2.0
File Size Uploaded
hea-0.2.0.tar.gz 1.5 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for hea 0.2.0
File
hea-0.2.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details
hea-0.2.0-cp311-abi3-musllinux_1_2_x86_64.whl CPython 3.11 abi3 Linux musl 1.2+ x86-64 Details
hea-0.2.0-cp311-abi3-musllinux_1_2_aarch64.whl CPython 3.11 abi3 Linux musl 1.2+ ARM64 Details
hea-0.2.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64 Details
hea-0.2.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details
hea-0.2.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details
hea-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details

Total release size: 44.7 MB

Release files / hea-0.2.0.tar.gz

Download URL hea-0.2.0.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
6db1a4532a96b9bff47d48a38377dc947554180423813ed34ee9784f4c14d7ba
BLAKE2b-256 checksum
How to use checksums
ddfa58334c1d4b00f2144309914bb5eb7d65881cc829ae7584850a2f352f4a2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / hea-0.2.0-cp311-abi3-win_amd64.whl

Download URL hea-0.2.0-cp311-abi3-win_amd64.whl
Size 9.2 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
8d9e4cf150d92e5b0ae747819c28668b692c208b4ec574bca4cd86ac5a42de2b
BLAKE2b-256 checksum
How to use checksums
1430cc824cd66f85de45204d0c403de6e5f0a77925b8bc6a2408a6adc522016e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / hea-0.2.0-cp311-abi3-musllinux_1_2_x86_64.whl

Download URL hea-0.2.0-cp311-abi3-musllinux_1_2_x86_64.whl
Size 2.8 MB
Tags CPython 3.11 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
1d1a18072369f2fec4e8a867f26b6e980a34092e6469667a33c13c7a7346eb12
BLAKE2b-256 checksum
How to use checksums
ce4e1adfadd166bd00027787b5f81a3a13c8fd1bea14646d94f1b353788ad029
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / hea-0.2.0-cp311-abi3-musllinux_1_2_aarch64.whl

Download URL hea-0.2.0-cp311-abi3-musllinux_1_2_aarch64.whl
Size 2.7 MB
Tags CPython 3.11 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
9671d3f45fc7c79e793c9908baf86074a46f0bac4256474b154a3b6363b92372
BLAKE2b-256 checksum
How to use checksums
cd02fb47c3149e930805c799f23b1bc106dbbbbc65adbf406a1d4eb259cfa209
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / hea-0.2.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL hea-0.2.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.5 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
c393507c953e381541dba862c7e534409b637e705d3afd08429ddd41959698a6
BLAKE2b-256 checksum
How to use checksums
e3f078fc15213852da8f04e6873ce22d47050a5e246d4005e4016a66514dc7e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / hea-0.2.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL hea-0.2.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 12.3 MB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
3de7cbe0f0826565b3873200f051942357530fa125af80c9069ee6574aabdd22
BLAKE2b-256 checksum
How to use checksums
a1b04b0bb573abccc396a12d1a451d7ec0004a05f0c408e7e198177abf682817
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / hea-0.2.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL hea-0.2.0-cp311-abi3-macosx_11_0_arm64.whl
Size 2.4 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2d5ba5cc88231b8929fd9bdd3f889cc805447ae776a0ab5fbc144c714ea0bd67
BLAKE2b-256 checksum
How to use checksums
aabb72805cbfe4271e4e501629b0527adc802b3e1b2dea42c976defae8853efa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / hea-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl

Download URL hea-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl
Size 2.5 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
495aa14b263ac3ca32429eaee5f42a57e1023ee29aa5183fa2a5e0f242e5df54
BLAKE2b-256 checksum
How to use checksums
7b834d3df03c0675c95258048b38983ef3cdee219a3ecedfbf9ef29c103bf331
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

8 release files

0.1.10

8 release files

0.1.9

8 release files

0.1.8

8 release files

0.1.7

8 release files

0.1.6

8 release files

0.1.5

8 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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