diff --git a/README.md b/README.md index 3852a68..e3bca81 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,54 @@ # PyKolada -A Python package for interacting with Kolada's statistical API. +A Python Wrapper for Kolada API + +## Overview + +This Python package provides a lightweight wrapper for the Kolada API, which allows users to access and interact with key performance indicators (KPIs) for Swedish municipalities and organizational units. The Kolada database, maintained by RKA (Rådet för kommunal analys), offers a rich set of data, and this wrapper simplifies the process of querying and retrieving this information. + +## Features + +- Access to various endpoints like KPI, KPI groups, municipalities, municipality groups, and organizational units. +- Support for querying data based on different parameters such as ID, title, description, operating area, year, etc. +- Handling of pagination to fetch all relevant data. +- Customizable queries with support for filtering and specifying primary keys. ## Installation -The package can be installed from PyPI using pip: -```bash -pip install kolada -``` -OR + +This package requires Python 3.8 or higher. +You can install it using pip: + ```bash pip install pykolada ``` -The two packages are identical, and depend on the same code. The only difference is the name of the package. +## Usage + +### Importing the Module + +```python +import pykolada +``` + +### Making Queries + +You can make queries to different endpoints. For example, to query KPI data: + +```python +kpi_data = pykolada.get_kpi(id='some_id', title='some_title') +``` + + +## Endpoints + +- `kpi` +- `kpi_groups` +- `municipality` +- `municipality_groups` +- `ou` +- `data` +- `oudata` + +Each endpoint supports different parameters for querying. Please refer to the documentation for detailed information. + +--- \ No newline at end of file diff --git a/pykolada/pykolada.py b/pykolada/pykolada.py index 40eaac4..699056f 100644 --- a/pykolada/pykolada.py +++ b/pykolada/pykolada.py @@ -528,11 +528,3 @@ def _save_non_data(folder_path=None): os.path.join(folder_path, f"{endpoint}.json"), "w", encoding="utf-8" ) as f: json.dump(json_data, f, indent=4, ensure_ascii=False) - - -# def main(): -# _save_non_data(folder_path="data") - - -# if __name__ == "__main__": -# main()