Skip to main content

x13as

The US Census Bureau's X-13ARIMA-SEATS seasonal adjustment program (the engine ONS uses, typically in X-11 mode), compiled and bundled as a Python wheel. Census publishes Linux and Windows binaries only; this builds from their Fortran source, so it also works on macOS arm64.

Quick start

pip install x13as

This installs statsmodels and pandas automatically. For example, seasonally adjust five years of synthetic monthly sales:

import numpy as np
import pandas as pd
import x13as

rng = np.random.default_rng(42)
seasonal = [80, 85, 95, 100, 105, 110, 105, 100, 95, 100, 120, 140]
sales = pd.Series(
    [seasonal[i % 12] + i * 0.5 for i in range(60)] + rng.normal(0, 3, 60),
    index=pd.date_range("2020-01-01", periods=60, freq="MS"),
)

result = x13as.x13_arima_analysis(sales, trading=False, log=False)
print(pd.DataFrame({
    "original": sales,
    "adjusted": result.seasadj,
    "trend": result.trend,
}).tail(12).round(2))

The random variation is part of this synthetic example; use your observed values directly for real data. An exactly repeating seasonal pattern plus a straight-line trend can leave no variation after differencing, which X-13 rejects with "Differencing has annihilated the series."

result.seasadj contains the adjusted values and result.trend the trend. x13as.binary_path() returns the path to the bundled executable.

The x13as command passes straight through to the binary, so x13as myspec runs a hand-written myspec.spc.

Wheels: macOS arm64 (11+), and Linux x86_64 and aarch64. The Linux binary is fully static, so it runs on any glibc or musl distribution.

Building

# macOS
micromamba create -n x13build -c conda-forge gfortran make
micromamba run -n x13build ./scripts/build_binary.sh   # writes src/x13as/_bin/x13as
uv build --wheel

# Linux (in Docker; builds, then tests the wheel)
./scripts/build_linux.sh            # amd64 and arm64

CI (.github/workflows/wheels.yml) builds all three wheels on native runners, installs each wheel into an isolated environment with only pytest added, and tests the binary, quarterly adjustment, and the exact monthly example above. This checks that runtime dependencies are supplied by the wheel itself. CI publishes to PyPI on v* tags via trusted publishing.

The package version tracks the Census release (1.1.62 = v1.1 build 62); .postN releases fix the Python packaging without changing the Census binary. X-13ARIMA-SEATS is public-domain US government software.

Metadata

Release files for x13as 1.1.62.post1

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

Built distributions (wheels)

Table of built distributions (wheels) for x13as 1.1.62.post1
File Interpreter ABI Platform Actions
x13as-1.1.62.post1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for x13as-1.1.62.post1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
x13as-1.1.62.post1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for x13as-1.1.62.post1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
x13as-1.1.62.post1-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for x13as-1.1.62.post1-py3-none-macosx_11_0_arm64.whl

Total release size: 5.4 MB

Release files / x13as-1.1.62.post1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL x13as-1.1.62.post1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.0 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
6870ecfdcc272a18001d01c07b1e9596248ad529fcf2dae8a6889d8d76f51428
BLAKE2b-256 checksum
How to use checksums
aaf391a8fecc2008571f130237d029f2affdf6af9e558abec6ec4b05d3160832
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 25, 2026.

Transparency log

Release files / x13as-1.1.62.post1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL x13as-1.1.62.post1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.8 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
4632aaed7819bbaa9c206a84d5f101ef48e5012d7883faa09e8ec577e157cc7a
BLAKE2b-256 checksum
How to use checksums
7e3e4244552c5959fc81ecef9cf76bd8e8dc35aa96a65854bfdf75515c6092a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 25, 2026.

Transparency log

Release files / x13as-1.1.62.post1-py3-none-macosx_11_0_arm64.whl

Download URL x13as-1.1.62.post1-py3-none-macosx_11_0_arm64.whl
Size 1.5 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
826d112f5607106d85dbecaabcd7559276b3906c06db4470f57ace4f61bcd65d
BLAKE2b-256 checksum
How to use checksums
71c375ffdcf31f77a576dd92db8153096232615c6662c85b243ac8373785bf41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 25, 2026.

Transparency log

Security for x13as 1.1.62.post1

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.

Full provenance

All 3 files in this release have been uploaded with provenance metadata.

Select from 3 files

Attestation for x13as-1.1.62.post1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

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 25, 2026.

Transparency log

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.

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