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.11.0-cp313-cp313-win_amd64.whl (7.5 MB view details)

Uploaded CPython 3.13Windows x86-64

svy-0.11.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.11.0-cp313-cp313-macosx_11_0_arm64.whl (9.2 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

svy-0.11.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.11.0-cp312-cp312-macosx_11_0_arm64.whl (6.1 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

svy-0.11.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.11.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.11.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: svy-0.11.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.11.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 818824cda0a89aa3db0ab05220f1b2603285a2a04a96dbe296ee3118d3579a93
MD5 c88f2654a7043bb3ab5f95654c2548bc
BLAKE2b-256 3cc5bee31aae66a97f9f9e164fe535ff51bdb65b1f261889f5e31d9b229c3b25

See more details on using hashes here.

Provenance

The following attestation bundles were made for svy-0.11.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.11.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.11.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7b9fd1159a6cd9eef209bbf8d8554137f6e7c14900f3a322a72e271ab4924154
MD5 2764390d3a3b537d44df90b44d2cbabb
BLAKE2b-256 7bbc102990c04c3eb0e2919ab492100971c96401e65585435c9c6f324a98696e

See more details on using hashes here.

Provenance

The following attestation bundles were made for svy-0.11.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.11.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for svy-0.11.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cbed508cfa46fc489b8ec277a18b0ac3b56e3233283fc1ff2575060666463003
MD5 b3585c0d36097ffc0d8c996929e66506
BLAKE2b-256 b1565a04a192feece8fe4cd66e7a2c221c6a32f3c6c6570a82ad185a99b7de19

See more details on using hashes here.

Provenance

The following attestation bundles were made for svy-0.11.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.11.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: svy-0.11.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.11.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 42533193e09fdbe42f08045f7600e1e6121a6c6ef36673f6bb46239fe96049ae
MD5 528d35ed3687ee6a53dc0bd06c5cb770
BLAKE2b-256 c8b07d0399cf4e2452d199b8e241034386d9082a4c11b4bbe31efaa1c8bd14cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for svy-0.11.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.11.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.11.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cd64b4f14095cd4541ffbb099d1c34005c3cc3aa7a352c65d8ffbf1a6eed3090
MD5 645a09da633ee8845642418fc626bc8b
BLAKE2b-256 b203ad0e6632cb2413b1db87074521bef4ee253e8014283671ba66a8976be93b

See more details on using hashes here.

Provenance

The following attestation bundles were made for svy-0.11.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.11.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for svy-0.11.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c67b14f43fbe2ec75481d46391037aa603f8c26751f3710a425583e72378c1b9
MD5 48f0d12637eabb76b36bcd10633748cb
BLAKE2b-256 90c298e72567a9493bd0b0a86cd4365dfcd6b18591680d4d330757da770337bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for svy-0.11.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.11.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: svy-0.11.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.11.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e38c8737bfc33f9f2ac931c8f258d4b93dec9229a375348204c72dfca74ff396
MD5 98549d617aebbba91dab97f955e579bc
BLAKE2b-256 328dfc2dd1b1900e60cb73343d95832dca4b3c4a48e8abd446f000bed254b3e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for svy-0.11.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.11.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.11.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7731475bb712292edce1e72fd7facaec883d46e5f6329405642dc044d14065bc
MD5 bc9c3a139fd2246ceb70ba5eb31db5bd
BLAKE2b-256 25f745fdfc24c1202f116677ea656fd480e407cfa09a8aa0eec9b40ef9a9d1f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for svy-0.11.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.11.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for svy-0.11.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 abce2a0bfb6b4f9f26ddc61577722f9b3e26c3f41d73c39cc9dc2b53b7d94a72
MD5 d210d463ec95f4a3f96030233f6c6ff2
BLAKE2b-256 d411ac64faf870c297df646485051d8d46f5b94a23093c51d940d2e26f9b7ea5

See more details on using hashes here.

Provenance

The following attestation bundles were made for svy-0.11.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