Skip to main content

Fast SUS and climate data workflows for Brazil - Python edition

Project description

climasus4py

PyPI Python Versions License: MIT

Fast SUS and climate data workflows for Brazil - Python edition.

Documentation: https://climasus.github.io/climasus4py_documentation/

Installation

Install from PyPI:

pip install climasus4py

Install with optional extras:

pip install "climasus4py[all]"

Install latest from GitHub:

pip install git+https://github.com/climasus/climasus4py.git

Quick Example

import climasus as cs

result = cs.sus_pipeline(
    system="SIM-DO",
    uf="SP",
    year=[2021, 2022, 2023],
    lang="en",
    groups=["dengue"],
    time="month",
    geo="state",
)

print(result.df().head())

Step-by-step Example

import climasus as cs

# 1. Import and cache
x = cs.sus_import("SIM-DO", "SP", [2021, 2022])

# 2. Clean
x = cs.sus_clean(x)

# 3. Standardize
x = cs.sus_standardize(x, lang="en")

# 4. Filter
x = cs.sus_filter(x, groups=["dengue"], age_min=0, age_max=80)

# 5. Create variables
x = cs.sus_variables(x, age_group="who", epi_week=True)

# 6. Aggregate
x = cs.sus_aggregate(x, time="month", geo="state")

# 7. Export
cs.sus_export(x, "output/dengue_sp.parquet")

Shared Metadata

climasus4py consumes metadata from climasus-data (disease groups, dictionaries, UFs, regions). This dependency is installed automatically.

You can force update local metadata when needed:

from climasus import update_climasus_data
update_climasus_data()

Contributing

  • Pull requests and issues are welcome.
  • Run tests locally before opening PRs.
  • Include a minimal reproducible example for bug reports.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

climasus4py-0.1.3.tar.gz (147.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

climasus4py-0.1.3-py3-none-any.whl (53.4 kB view details)

Uploaded Python 3

File details

Details for the file climasus4py-0.1.3.tar.gz.

File metadata

  • Download URL: climasus4py-0.1.3.tar.gz
  • Upload date:
  • Size: 147.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for climasus4py-0.1.3.tar.gz
Algorithm Hash digest
SHA256 a1f9d3ce88c488024c4999170ea439c3aa1c8ae935de58b91ac87fe44d378a8d
MD5 d761ef28c0c60df7e875817ff0cdee1d
BLAKE2b-256 0bc741c8ce82d9a11f8ffb51209ba594bd7922d1ae9f0c8be0e59d239851ea6b

See more details on using hashes here.

Provenance

The following attestation bundles were made for climasus4py-0.1.3.tar.gz:

Publisher: publish-pypi.yml on climasus/climasus4py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file climasus4py-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: climasus4py-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 53.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for climasus4py-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3d0c8da7c39d4f82657a0bf2a0ed02e34fbe947b005ed73f0bbc7ab3f2d65178
MD5 06112683f00f77bc7f9de0e789680421
BLAKE2b-256 ed98227319b6eff2d7b7a6ea18d5d18e95f796855ac2a2d54c7835d9897d4095

See more details on using hashes here.

Provenance

The following attestation bundles were made for climasus4py-0.1.3-py3-none-any.whl:

Publisher: publish-pypi.yml on climasus/climasus4py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page