# SSB Statstruk

[![PyPI](https://img.shields.io/pypi/v/ssb-statstruk.svg)][pypi status]
[![Status](https://img.shields.io/pypi/status/ssb-statstruk.svg)][pypi status]
[![Python Version](https://img.shields.io/pypi/pyversions/ssb-statstruk)][pypi status]
[![License](https://img.shields.io/pypi/l/ssb-statstruk)][license]

[![Documentation](https://github.com/statisticsnorway/ssb-statstruk/actions/workflows/docs.yml/badge.svg)][documentation]
[![Tests](https://github.com/statisticsnorway/ssb-statstruk/actions/workflows/tests.yml/badge.svg)][tests]
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=statisticsnorway_ssb-statstruk&metric=coverage)][sonarcov]
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=statisticsnorway_ssb-statstruk&metric=alert_status)][sonarquality]

[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)][pre-commit]
[![Black](https://img.shields.io/badge/code%20style-black-000000.svg)][black]
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)][poetry]

[pypi status]: https://pypi.org/project/ssb-statstruk/
[documentation]: https://statisticsnorway.github.io/ssb-statstruk
[tests]: https://github.com/statisticsnorway/ssb-statstruk/actions?workflow=Tests

[sonarcov]: https://sonarcloud.io/summary/overall?id=statisticsnorway_ssb-statstruk
[sonarquality]: https://sonarcloud.io/summary/overall?id=statisticsnorway_ssb-statstruk
[pre-commit]: https://github.com/pre-commit/pre-commit
[black]: https://github.com/psf/black
[poetry]: https://python-poetry.org/

![statstruk logo](https://github.com/statisticsnorway/ssb-statstruk/blob/main/docs/images/statstruk.png)

## Installation

You can install the _statstruk_ via [pip] from [PyPI]:

```console
pip install ssb-statstruk
```

## Usage

For examples on running a rate model see the [Quick guide to running a rate model with **_statstruk_**](https://statisticsnorway.github.io/ssb-statstruk/guide_rate.html). Further function references are given in the [Reference guide]. Theory used in the caluclations is described in the theory references for Homogenous models, [Rate models], and Regression models.

## Contributing

Contributions are very welcome.
To learn more, see the [Contributor guide](https://github.com/statisticsnorway/ssb-statstruk/blob/main/docs/contributing.md).

## License

Distributed under the terms of the [MIT license](https://github.com/statisticsnorway/ssb-statstruk/blob/main/license),
_SSB Statstruk_ 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].

[statistics norway]: https://www.ssb.no/en
[pypi]: https://pypi.org/
[ssb pypi template]: https://github.com/statisticsnorway/ssb-pypitemplate
[file an issue]: https://github.com/statisticsnorway/ssb-statstruk/issues
[pip]: https://pip.pypa.io/
[Reference guide]: https://statisticsnorway.github.io/ssb-statstruk/reference.html
[rate models]: https://statisticsnorway.github.io/ssb-statstruk/theory_rate.html

<!-- github-only -->

[license]: https://github.com/statisticsnorway/ssb-statstruk/blob/main/LICENSE
[Contributor guide]: https://github.com/statisticsnorway/ssb-statstruk/blob/main/docs/CONTRIBUTING.md
[reference guide]: https://statisticsnorway.github.io/ssb-statstruk/reference.html
