Registry / data / gridmeter

gridmeter

JSON →
library1.1.0pypypi✓ verified 79d ago

Tools for stratified sampling for comparison groups, used to evaluate energy efficiency programs. Current version: 1.1.0. Release cadence is irregular.

pip install gridmeter
INSTALL
IMPORT
SIG · GRIDMETER
G
gridmeter
datapythonv1.1.0
Install
17.9s avg
Import
Disk
460MB
Pass rate
9/ 10
Env Coverage9 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 17.7s
py 3.11
✓ —
✓ 16.9s
py 3.12
✓ —
✓ 17.6s
py 3.13
✓ —
✓ 17.5s
py 3.9
✕ build_error
✓ 20s
460MB installed
● package 460MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

StratifiedSampling
from gridmeter import StratifiedSampling
from gridmeter import StratifiedSample

Draw a stratified sample from source to match target distribution.

import json from gridmeter import StratifiedSample with open('source.json') as f: source = json.load(f) with open('target.json') as f: target = json.load(f) sample = StratifiedSample(source, target, strata_column='group') sample_result = sample.draw() print(sample_result)
Debug
Known issues
gotchaData input format: source and target must be lists of dicts with the strata_column key. Pandas DataFrames are not directly supported without conversion.
fix
Convert DataFrames to list of dicts using df.to_dict('records') before passing.
affects: >=1.0.0
deprecatedThe `StratifiedSample` class constructor signature changed in 1.1.0: `strata_column` is now required instead of optional.
fix
Always specify `strata_column` parameter when creating StratifiedSample.
affects: 1.1.0
Upgrade
Version history
1.1.0latest on PyPI · released Jun 29, 2021
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
14
Resources