Skip to main content

SSB Timeseries

PyPI Status Python Version License

Documentation Tests Coverage Quality Gate Status

pre-commit Black Ruff Poetry

Statistics Norway is the national statistical agency of Norway. We collect, produce and communicate official statistics related to the economy, population and society at national, regional and local levels and conduct extensive research and analysis activities.

Time series are an integral part of statistics production.

The requirements for a complete time series system are diverse:

  • At the core is storage with performant read and write, search and filtering of time series data
  • A wide selection of math and statistics methods and libraries for calculations and models
  • Versioning is essential in tracking development of estimates and previously published data
  • Descriptive metadata is key to findability and understanding
  • Workflow integration with automation and process monitoring makes life easier, but also ensures consistency and quality
  • Visualisations is important not only to present the final results, but also for routine and ad hoc inspection and quality control
  • Data lineage and process metadata are instrumental for quality control, but also provides the transparency required for building trust

Very purposely, ssb-timeseries is not a complete solution. It is as a glue layer that sits between the overall data platform and the statistics production code. Its main responsibility is to interface with other systems and components and enforce consistency with our process and information models.

It provides some functionality of its own, but mainly useful abstractions and convenience methods that reduce boilerplate and brings several best of breed technologies for data analysis together in a single package.

Openness is a goal in itself, both in terms of transparency and licensing, and in the provide compatibility with relevant frameworks and standards.

The workflow of Stastistics Norway is mostly batch oriented. Consequently, the ssb-timeseries library is Dataset centric:

  • One or more series form a set.
  • All series in a set must be of the same type.
  • A set should typically be read and written at the same time.
  • All series in a set should stem from the same process.

All series in a set being of the same type and otherwise complying with the underlying information model simplifies the implementation of storage, descriptive metadata and search and enables key calculation features:

  • Since each series is represented as a column vector in a dataset matrix, linear algebra is readily available. Datasets can be added, subtracted, multiplied and divided with each other and dataframes, matrices, vectors (untested) and scalars according to normal rules.

  • Time algebra features allow up- and downsamliong that make use of the date columns. Basic time aggregation: Dataset.groupby('quarter', 'sum'|'mean'|'auto')

  • Metadata calculations uses the descriptions of the individual series for calculations ranging from simple things like unit conversions to using relations between entities in tag values to group series for aggregation.

Nulls are allowed, so it is not a strict requirement that all series in a set are written at the same time, but managing workflows becomes much simpler if they are.

The io module connects the dataset to helper class(es) that takes care of reading and writing data. This structure abstracts away the IO mechanics, so that the user do not need to know about implementation details, but only the information model meaning of the choices made. Also, although the current implementation uses pyarrow and parquet data structures under the hood, by replacing the io-module, a database could be used instead.

The data itself has a wide variety, but while data volumes are substantial, they are not enormous. The data resolution and publishing frequencies are typically low: monthly, quarterly and yearly are most typical.

Quality and reliability is by far more important than latency. Our mission comes with strict requirements for transparency and data quality. Some are mandated by law, others stem from commitment to international standards and best practices. This shifts the focus towards process and data control.

Documentation

Extensive documentation is available on GitHub Pages, notably:

In addition, you will find articles elaborating on topics like

Contributing

Feedback and code contributions are welcome. See the Contributor Guide for how.

License

Distributed under the terms of the MIT license, SSB Timeseries is free and open source software.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Credits

This project was generated from Statistics Norway's SSB PyPI Template.

Metadata

Release files for ssb-timeseries 0.8.0

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

Source distribution (sdist)

Source distribution for ssb-timeseries 0.8.0
File Size Uploaded
ssb_timeseries-0.8.0.tar.gz 85.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ssb-timeseries 0.8.0
File Interpreter ABI Platform
ssb_timeseries-0.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 185.8 kB

Release files / ssb_timeseries-0.8.0.tar.gz

Download URL ssb_timeseries-0.8.0.tar.gz
Size 85.6 kB
Tags Source
SHA-256 checksum
How to use checksums
dd56eac41bf017886a388a9eba1f00469b9b982383dd821c80183ca9d4668123
BLAKE2b-256 checksum
How to use checksums
ff3b7d65215ab55f6d89d07e67421af620c388ecf8e1fccd123dce35a6f99125
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 22, 2026.

Transparency log

Release files / ssb_timeseries-0.8.0-py3-none-any.whl

Download URL ssb_timeseries-0.8.0-py3-none-any.whl
Size 100.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cb04001800c65a4d3a5dd5910f614cbebef779d4e38c5d997608dafd2fe96e77
BLAKE2b-256 checksum
How to use checksums
ad93bc90d42859bf593bea9bce9aea0beef7677ca007a9ee3d89431560fa96d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 22, 2026.

Transparency log

Release history Release notifications | RSS feed

0.8.1

2 release files

This release

0.8.0 This release

2 release files

0.7.6

2 release files

0.7.5

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.0.0

2 release files

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