{"id":50786763,"url":"https://github.com/climateimpactlab/isku","last_synced_at":"2026-06-12T08:04:14.713Z","repository":{"id":356176010,"uuid":"1231330187","full_name":"ClimateImpactLab/isku","owner":"ClimateImpactLab","description":"Minimalist Xarray-based climate impact projection framework.","archived":false,"fork":false,"pushed_at":"2026-06-05T06:56:49.000Z","size":509,"stargazers_count":3,"open_issues_count":7,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-05T08:17:30.338Z","etag":null,"topics":["library","python","xarray"],"latest_commit_sha":null,"homepage":"https://climateimpactlab.github.io/isku/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ClimateImpactLab.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"docs/support.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-06T21:26:32.000Z","updated_at":"2026-06-05T06:56:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ClimateImpactLab/isku","commit_stats":null,"previous_names":["brews/isku","climateimpactlab/isku"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ClimateImpactLab/isku","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClimateImpactLab%2Fisku","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClimateImpactLab%2Fisku/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClimateImpactLab%2Fisku/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClimateImpactLab%2Fisku/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ClimateImpactLab","download_url":"https://codeload.github.com/ClimateImpactLab/isku/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClimateImpactLab%2Fisku/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34234591,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["library","python","xarray"],"created_at":"2026-06-12T08:04:10.273Z","updated_at":"2026-06-12T08:04:14.708Z","avatar_url":"https://github.com/ClimateImpactLab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# isku\n\n[![python-test](https://github.com/climateimpactlab/isku/actions/workflows/python-test.yaml/badge.svg)](https://github.com/climateimpactlab/isku/actions/workflows/python-test.yaml)\n[![codecov](https://codecov.io/gh/climateimpactlab/isku/graph/badge.svg?token=G53WDRL97C)](https://codecov.io/gh/climateimpactlab/isku)\n[![Documentation](https://github.com/climateimpactlab/isku/actions/workflows/docs.yml/badge.svg)](https://github.com/climateimpactlab/isku/actions/workflows/docs.yml)\n\nMinimalist Python + Xarray-based climate impact projection framework for researchers with little time.\n\n\u003e [!WARNING]\n\u003e This package is in early development. It is likely to change in breaking ways.\n\n## Features\n\n* Define and apply three-step models to project climate effects, impacts, and damages.\n\n* Extract regionalized variables from regularly gridded data, such as downscaled general circulation model output.\n\n* Minimalist.\n\n* Loosely coupled components and protocols for quick scripts with functions or gnarly OOP-heavy applications.\n\n* Designed around [Xarray](https://xarray.dev/) to work with larger-than-memory datasets and distributed computing (dask!), GPUs, TPUs, streaming datasets.\n\n* Great for weird ad hoc projects and researchers that love rechunking big data!\n\n## Example\n\n### Projection\n\nProjecting data with a model in `isku` is similar to the preprocess/predict/postprocess workflow you might already be familar with.\n\nIn `isku`, we could do a linear model with pre/post-processing like:\n\n```python\nimport isku\n\nimport numpy as np\nimport xarray as xr\n\n# Some toy input data to work with.\ninput_data = xr.Dataset(\n    {\n        \"coef\": ([\"region\"], [0, 0, 0]),\n        \"tas\": ([\"region\"], [1, 2, 3]),\n    }\n)\n\n# Define a basic workflow for the projection model, pre/post-processing steps.\ndef _preprocess(ds):\n    my_coef = ds[\"coef\"] + 1\n    my_tas = ds[\"tas\"]\n    return xr.Dataset({\"coef\": my_coef, \"tas\": my_tas})\n\n\ndef _linear_impact_model(ds):\n    y = ds[\"coef\"] * 2 + ds[\"tas\"]\n    return xr.Dataset({\"impact\": y})\n\n\ndef _postprocess(ds):\n    return ds[[\"impact\"]] + 10\n\n\ntest_impact_model = isku.build_projection_template(\n    pre=_preprocess,\n    project=_linear_impact_model,\n    post=_postprocess,\n)\n\n# Put it together and run the projection.\nprojected = isku.project(input_data, model=test_impact_model)\n```\n\nThis example uses pure functions to define workflow, or template, steps. This can be useful for quick analysis but `isku` also accepts\ncustom objects adhering to the select protocols. The intent is that components can be quickly used, ignored, extended or\nreplaced as needed by a project.\n\n### Extracting regions\n\nThe relationship between data transformations and region extraction can be complex in impact and damage research.\n\nSay you have temperature data on a regular latitude-longitude grid. You need to extract regions from this grid, e.g.\npolitical boundaries, but you need to weight each temperature grid point by the proportion of the region's population\nexposed to temperature within each region. To make matters more complex you likely need to be specific about additional processing and transformation\nbefore and after regionalization. This is a niche case but a common headache.\n\nWe can handle this type of transformation in `isku` like:\n\n```python\nimport isku\n\nimport numpy as np\nimport xarray as xr\n\n\n# Define some toy data to transform and regionalize.\ngridded_data = xr.DataArray(\n    np.arange(25).reshape([5, 5]),\n    dims=(\"lon\", \"lat\"),\n    coords={\n        \"lon\": np.arange(5),\n        \"lat\": np.arange(5),\n    },\n    name=\"variable1\",\n).to_dataset()\n\n# Refine regions and how they weight each grid point in the gridded data.\n# This is usually read from file, but we're making up a quick example dataset.\nmy_regions = isku.GridWeightingRegions(\n    xr.Dataset(\n        {\n            \"region\": ([\"idx\"], [\"a\", \"a\", \"a\", \"b\"]),\n            \"weight\": ([\"idx\"], [0.3, 0.3, 0.3, 1.0]),\n            \"lon\": ([\"idx\"], [2, 3, 4, 1]),\n            \"lat\": ([\"idx\"], [0, 0, 0, 2]),\n        },\n    )\n)\n\n# Define workflow with pre/post regionalization transformations.\ndef _add_one(ds):\n    return ds[[\"variable1\"]] + 1\n\n\ndef _add_ten(ds):\n    return ds[[\"variable1\"]] + 10\n\n\nmy_extraction_workflow = isku.build_extraction_template(\n    pre=_add_one,  # Before regionalization.\n    post=_add_ten,  # After regionalization.\n)\n\n\n# Put it all together to extract regions from gridded data.\ntransformed = isku.extract_regions(\n    gridded_data,\n    template=my_extraction_workflow,\n    regions=my_regions,\n)\n```\n\n\n## Installation\n\nisku is a Python package [available for download from PyPI](https://pypi.org/project/isku/).\n\nUsing `pip` you can install this package with\n\n```\npip install isku\n```\n\nbest practice suggest installing the package into a virtual environment.\n\nFor a `uv` project this is\n\n```\nuv add isku\n```\n\nInstall the unreleased and unstable bleeding-edge version of the package with:\n\n```shell\npip install git+https://github.com/climateimpactlab/isku\n```\n\nusing `pip` or with a project in `uv`, do\n\n```shell\nuv add git+https://github.com/climateimpactlab/isku\n```\n\n## Is this any good?\n\nYes.\n\n## Support\n\n`isku` is open-source software made available under the terms of either the MIT License or the Apache License 2.0, at your option.\n\nAsk questions about usage or general discussion on the project's [discussion page](https://github.com/ClimateImpactLab/isku/discussions).\n\nPlease file issues and bugs in the project's [issue tracker](https://github.com/ClimateImpactLab/isku/issues).\n\nPlease see the [contributing guide](https://github.com/ClimateImpactLab/isku/blob/main/CONTRIBUTING.md) if you would like to contribute.\n\nChanges for each release are summarized in [the changelog](https://github.com/ClimateImpactLab/isku/blob/main/CHANGELOG.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclimateimpactlab%2Fisku","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclimateimpactlab%2Fisku","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclimateimpactlab%2Fisku/lists"}