Skip to main content

End-to-end surveys: design, sample, analyze, report.

Project description

svy

Modern Python tools for complex survey analysis, built for real-world statistical workflows.

svy is a rigorously design-based yet production-oriented library for survey design, weighting, and estimation — without sacrificing transparency or scalability.

🌐 Website: svylab.com 📘 Documentation: svylab.com/docs/svy 📦 Source: github.com/samplics-org/svy


What is svy?

svy is designed for people who actually work with complex survey data, including national statistical offices, public health and development programs, survey methodologists, and data scientists working with complex samples.

Correct inference first — without hiding assumptions or sacrificing usability.

Validation

svy has been validated against R's survey package, producing numerically identical results across Taylor linearization, replication methods, and complex survey designs. See the full comparison.


Installation

pip install svy

Quick Start

import svy

# Load example data
hld_data = svy.load_dataset(name="hld_sample_wb_2023")

# Define the survey design
hld_design = svy.Design(stratum=("geo1", "urbrur"), psu="ea", wgt="hhweight")

# Create a sample object
hld_sample = svy.Sample(data=hld_data, design=hld_design)

# Estimate the mean of total expenditure
tot_exp_mean = hld_sample.estimation.mean(y="tot_exp")

print(tot_exp_mean)

Capabilities

  • Complex survey design — strata, clusters, weights
  • Design-based estimation with valid standard errors
  • Replication methods — BRR, bootstrap, jackknife, SDR
  • Categorical data analysis — tabulation, crosstabulation, t-test, Rao-Scott test
  • Generalized linear models — logistic, Poisson, Gamma with survey weights
  • Explicit, inspectable, reproducible outputs
  • Built on Polars, NumPy, SciPy, and Rust

Related Packages

Package Purpose Install
svy Core survey design & estimation pip install svy
svy-sae Small Area Estimation pip install svy-sae
svy-io SPSS / Stata / SAS I/O pip install svy-io

Documentation

Full documentation, tutorials, and methodological notes: 👉 svylab.com/docs/svy


Feedback


License

MIT License — Copyright © 2026 Samplics LLC

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

svy-0.12.0-cp313-cp313-win_amd64.whl (7.5 MB view details)

Uploaded CPython 3.13Windows x86-64

svy-0.12.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (11.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

svy-0.12.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (10.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

svy-0.12.0-cp313-cp313-macosx_11_0_arm64.whl (9.2 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

svy-0.12.0-cp312-cp312-win_amd64.whl (5.0 MB view details)

Uploaded CPython 3.12Windows x86-64

svy-0.12.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

svy-0.12.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (6.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

svy-0.12.0-cp312-cp312-macosx_11_0_arm64.whl (6.1 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

svy-0.12.0-cp311-cp311-win_amd64.whl (2.5 MB view details)

Uploaded CPython 3.11Windows x86-64

svy-0.12.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

svy-0.12.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (3.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

svy-0.12.0-cp311-cp311-macosx_11_0_arm64.whl (3.0 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file svy-0.12.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: svy-0.12.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 7.5 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for svy-0.12.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 f9a9812202f20cbb358ebc7d3a5eb2fd0c45ee84d7b2ce8a7575c519c7e94f36
MD5 0364463478b86dc013d28a128dd4c69c
BLAKE2b-256 0d69f764db9fb69a13335fd7a6bc585cd2ff64edf0bd25f0c26a34bc4fc92d0a

See more details on using hashes here.

Provenance

The following attestation bundles were made for svy-0.12.0-cp313-cp313-win_amd64.whl:

Publisher: wheels.yml on samplics-org/svy-internal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file svy-0.12.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for svy-0.12.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b31e3ba30e17523a9ebbcb305c3dcc8e6ea432ba2013da78ee72560e40815ff2
MD5 f5e3db3fe2ad7b425ce1a2c75f94211a
BLAKE2b-256 95cb2ca6b16f9fe855c64b633d05df34cb4b80ff5641789f8e5f446767df3f30

See more details on using hashes here.

Provenance

The following attestation bundles were made for svy-0.12.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on samplics-org/svy-internal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file svy-0.12.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for svy-0.12.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 52b5eabdea44b3473209290c32f47fc8da76b7f5281b17028c41629eff16d4a0
MD5 97d4ce0469b6581944541f6c1e105a80
BLAKE2b-256 7c38460af7a17fcd1f19fb6e7a0a54e82ac3cf9b61c7d3531aba9938e28e962e

See more details on using hashes here.

Provenance

The following attestation bundles were made for svy-0.12.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: wheels.yml on samplics-org/svy-internal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file svy-0.12.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for svy-0.12.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 61da5f76c29405f0c5c32eaf1f9919a10a3ddb1a26bf51c05f0f8f645fb9c79f
MD5 053fab2d84123b3139669122028bad2a
BLAKE2b-256 7a24d82a5f4b654a69744e1f4a2910c93dcc1e53bca07ad472c7f8a83fe21ad3

See more details on using hashes here.

Provenance

The following attestation bundles were made for svy-0.12.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: wheels.yml on samplics-org/svy-internal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file svy-0.12.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: svy-0.12.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 5.0 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for svy-0.12.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 eb93fc7a2d68032d3d28d68e7a7b7230a9f3c3ae5c5023207279e96f7262caa8
MD5 315c3881d8e618a6eab75253861bf6bb
BLAKE2b-256 8f9baf8a46f69f614ee28979a9304e3ff88e46af23aa4d27d2d4f146fa4ad6b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for svy-0.12.0-cp312-cp312-win_amd64.whl:

Publisher: wheels.yml on samplics-org/svy-internal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file svy-0.12.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for svy-0.12.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 796bae85e519f97313c36612c5c031760e2613fc7f779dc23a658bb89e8123b9
MD5 842f77504474837c837e6daabd76a9bc
BLAKE2b-256 412dcf9a592ae8c51c29fb87b67aa3391edf4ef31f344c1383867cd71e342b10

See more details on using hashes here.

Provenance

The following attestation bundles were made for svy-0.12.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on samplics-org/svy-internal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file svy-0.12.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for svy-0.12.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 94a5e83775bc45887a995347cc298958e1702f6c3e7491ebd89dc7af35efa880
MD5 86050bca19101af77bc7de3aaffa2a80
BLAKE2b-256 2c95339843ca944411665eacb9e128d1bbfb2304427ff193a1706a2f28785557

See more details on using hashes here.

Provenance

The following attestation bundles were made for svy-0.12.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: wheels.yml on samplics-org/svy-internal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file svy-0.12.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for svy-0.12.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 75a63a70a24518561e336bd93c09b164cf3f43bdb345ea96673246143c813187
MD5 6d24a5a1fc0c0d00cac3a28a762a8cc1
BLAKE2b-256 7cf04ec40a0546c12cb52e2f967025205f709ba9abd83422e1f2f7d6c97df612

See more details on using hashes here.

Provenance

The following attestation bundles were made for svy-0.12.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: wheels.yml on samplics-org/svy-internal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file svy-0.12.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: svy-0.12.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for svy-0.12.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 df13a945c6282018074b7e29149aa24635bc015637deeaae803430524670a868
MD5 cb38de2fc2249a16d5d6f926696c49a1
BLAKE2b-256 688938f7710a568aaf594222655aa73b8f25693507c3072090ecfb2518113f56

See more details on using hashes here.

Provenance

The following attestation bundles were made for svy-0.12.0-cp311-cp311-win_amd64.whl:

Publisher: wheels.yml on samplics-org/svy-internal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file svy-0.12.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for svy-0.12.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5eeeb3e7a8ffad2537b4d33ae45a5f8d7de54d1fd41a5a101d4458af46c52d8a
MD5 63157bd0575ac6afb451d83c1cbb25c3
BLAKE2b-256 19981287230936430d0a0e615c467f696a054359b6cf832d92baeb4179c12dcb

See more details on using hashes here.

Provenance

The following attestation bundles were made for svy-0.12.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on samplics-org/svy-internal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file svy-0.12.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for svy-0.12.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 325c1319c1e7fef5d61e113ffc99143594351e59488f862190c54e922ecb4da6
MD5 a0448acf25fe94f436a46841c342e5ec
BLAKE2b-256 8398d2b07370a19769ecb8ca1ff883a2bc65e32928c367e3101e2defffc89bb4

See more details on using hashes here.

Provenance

The following attestation bundles were made for svy-0.12.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: wheels.yml on samplics-org/svy-internal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file svy-0.12.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for svy-0.12.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d1abf889f99e59a179d814469ec5d3de363075c7b9a50414f6c07da42d7f0a08
MD5 5e7e533cb7e3ee84114b30b4c38d1a59
BLAKE2b-256 a08862e53871b41f593a754d0105bd220d29d0b160165bbecf28c05ed1995e6d

See more details on using hashes here.

Provenance

The following attestation bundles were made for svy-0.12.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: wheels.yml on samplics-org/svy-internal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page