pysps

Sequential Poisson sampling in Python

https://github.com/marberts/pysps

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.2%) to scientific vocabulary

Keywords

python sampling statistics
Last synced: 6 months ago · JSON representation ·

Repository

Sequential Poisson sampling in Python

Basic Info
Statistics
  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • Open Issues: 4
  • Releases: 2
Topics
python sampling statistics
Created about 2 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License Citation

README.md

Sequential Poisson sampling

CI Build PyPI Python Versions Documentation DOI

Sequential Poisson sampling is a variation of Poisson sampling for drawing probability-proportional-to-size samples with a given number of units, and is commonly used for price-index surveys. This package is a Python implementation of the {sps} R package.

Installation

Install the stable release from PyPI

bash python -m pip install pysps

or get the development version from github

bash python -m pip install git+https://github.com/marberts/pysps.git

Usage

The first step to draw a sample is to construct the inclusion probabilties for each unit in the population.

```python

import pysps

pi = pysps.InclusionProb([1, 2, 3, 4], 3) pi InclusionProb(array([0.33333333, 0.66666667, 1. , 1. ]), 3) ```

Now these inclusion probabilities can be used to create a sample.

```python

samp = pysps.OrderSample(pi)

samp.units array([1, 2, 3])

samp.weights array([1.5, 1.0, 1.0]) ```

Citation

If you use this software, please cite it

@software{pysps, author = {Martin, Steve}, doi = {10.5281/zenodo.15825865}, license = {MIT}, title = {{pysps: Sequential Poisson sampling}}, version = {0.1.1}, year = {2025} }

Owner

  • Name: Steve Martin
  • Login: marberts
  • Kind: user
  • Location: Ottawa, Canada
  • Company: Government of Canada

I build tools to measure inflation :chart_with_upwards_trend:

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
type: software
license: MIT
title: "pysps: Sequential Poisson sampling"
version: 0.1.1
doi: 10.5281/zenodo.15825865
authors:
  - family-names: Martin
    given-names: Steve
    email: marberts@protonmail.com
    orcid: https://orcid.org/0000-0003-2544-9480
date-released: 2025-07-07

GitHub Events

Total
  • Create event: 3
  • Release event: 2
  • Issues event: 2
  • Issue comment event: 1
  • Push event: 14
  • Pull request event: 2
Last Year
  • Create event: 3
  • Release event: 2
  • Issues event: 2
  • Issue comment event: 1
  • Push event: 14
  • Pull request event: 2

Committers

Last synced: 11 months ago

All Time
  • Total Commits: 8
  • Total Committers: 1
  • Avg Commits per committer: 8.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 5
  • Committers: 1
  • Avg Commits per committer: 5.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Steve Martin m****s@p****m 8

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 3
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 3
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • marberts (3)
Pull Request Authors
Top Labels
Issue Labels
enhancement (2) documentation (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 191 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
pypi.org: pysps

Sequential Poisson sampling for Python.

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 191 Last month
Rankings
Dependent packages count: 8.9%
Forks count: 31.1%
Average: 32.7%
Stargazers count: 41.0%
Dependent repos count: 49.9%
Maintainers (1)
Last synced: 6 months ago