Kausal Paths
A tool for predicting the future emissions of cities based on historical emission data and various climate actions.
https://github.com/kausaltech/kausal-paths
Category: Emissions
Sub Category: Emission Observation and Modeling
Keywords from Contributors
climate-change
Last synced: about 2 hours ago
JSON representation
Repository metadata
Kausal Paths to predict how the emissions of cities develop
- Host: GitHub
- URL: https://github.com/kausaltech/kausal-paths
- Owner: kausaltech
- License: agpl-3.0
- Created: 2021-04-13T13:35:29.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2026-02-23T14:03:27.000Z (5 days ago)
- Last Synced: 2026-02-23T22:11:57.982Z (4 days ago)
- Language: Python
- Size: 8.68 MB
- Stars: 10
- Watchers: 3
- Forks: 9
- Open Issues: 8
- Releases: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Publiccode: publiccode.yml
README.md
Kausal Paths
Kausal Paths is a tool for predicting the future emissions of cities based on historical emission data and various climate actions. Users can compare how emissions develop in different scenarios. Data is provided using a GraphQL API.
Installation
Prerequisites
Make sure you have installed the following:
- a package manager (e.g., homebrew for macOS, apt for Ubuntu, etc.)
- git
- python
- uv (python package manager)
- direnv (auto-loads environment variables)
- Beginner Hints: before direnv works you need to hook it into your shell: depending on which shell you're using (find out withecho $SHELL)
addeval "$(direnv hook bash)"to your~/.bashrcOReval "$(direnv hook zsh)"to your~/.zshrc(create those files if they don't exist yet).
After that, restart the terminal or runsource ~/.bashrcORsource ~/.zshrc.
Development
After cloning the repository, move to your project root directory (paths folder) and allow loading environment variables:
direnv allow
In the project root directory, create and activate a Python virtual environment:
uv venv
source .venv/bin/activate
Install the required Python packages:
uv sync
Configure the PyPI index URL in your .envrc file (create it if it doesn't exist yet) if you have access to the Kausal private extensions (ask a team member for access):
export UV_INDEX_KAUSAL_USERNAME=...
export UV_INDEX_KAUSAL_PASSWORD=...
Then install the dependencies like this:
uv sync --extra kausal
If you need to run Jupyter notebooks, include the notebook dependency group:
uv sync --group notebook --extra kausal
Create a file called local_settings.py in your repository root with the following contents:
from paths.settings import BASE_DIR
DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'paths',
'ATOMIC_REQUESTS': True,
}
}
Note for macOS users: You might need to install a few packages separately
brew install snappy CPPFLAGS="-I/opt/homebrew/include -L/opt/homebrew/lib" pip install python-snappybrew install postgresql@16 brew services start postgresql@16cd ~/Documents/kausal-paths # or wherever your project is source .venv/bin/activate uv pip install psycopg2brew install gdal geosthen set the library path in your local kausal-paths/local_settings.py to the correct path shown in
ls -la /opt/homebrew/lib/*gdal*:GDAL_LIBRARY_PATH = '/opt/homebrew/lib/libgdal.dylib' GEOS_LIBRARY_PATH = '/opt/homebrew/lib/libgeos_c.dylib'brew tap hashicorp/tap brew install hashicorp/tap/vault
Run migrations:
python manage.py migrate
Create a superuser:
You might need the following translations during the createsuperuser operation: käyttäjätunnus = username, sähköpostiosoite = e-mail
python manage.py createsuperuser
Compile the translation files:
python manage.py compilemessages
Set Credentials and update database:
-
First, make sure your team added your access rights in Vault keycloak and send you the command to login again.
-
Clone the scripts repository (ask a team mate where to find it).
-
Go to paths root directory and run the script
../scripts/common/switch-region.shwhile in paths root directory, which should automatically update all needed credentials in.secrets/db-backup -
Follow the instructions the command gives you, there's a variable you need to put in .env and then the commands to restore the db
Then run
dropdb paths ; createdb paths && DB_BACKUP_SECRET_PATH=.secrets/db-backup kausal_common/docker/manage-db-backup.sh restore
You can now run the backend:
python manage.py runserver
The GraphQL API is now available at http://127.0.0.1:8000/v1/graphql/.
Owner metadata
- Name: Kausal Tech
- Login: kausaltech
- Email: info@kausal.tech
- Kind: organization
- Description: We help cities bridge the gap between climate goals and actions.
- Website: https://kausal.tech
- Location: Helsinki
- Twitter: kausaltech
- Company:
- Icon url: https://avatars.githubusercontent.com/u/61085507?v=4
- Repositories: 23
- Last ynced at: 2024-04-24T05:56:58.098Z
- Profile URL: https://github.com/kausaltech
GitHub Events
Total
- Watch event: 2
- Delete event: 115
- Issue comment event: 90
- Push event: 1340
- Pull request review comment event: 74
- Pull request review event: 116
- Pull request event: 185
- Fork event: 2
- Create event: 124
- Commit comment event: 3
Last Year
- Watch event: 2
- Delete event: 114
- Issue comment event: 90
- Push event: 1302
- Pull request review comment event: 69
- Pull request review event: 111
- Pull request event: 179
- Fork event: 2
- Create event: 122
- Commit comment event: 3
Committers metadata
Last synced: 12 days ago
Total Commits: 3,530
Total Committers: 16
Avg Commits per committer: 220.625
Development Distribution Score (DDS): 0.587
Commits in past year: 1,348
Committers in past year: 11
Avg Commits per committer in past year: 122.545
Development Distribution Score (DDS) in past year: 0.593
| Name | Commits | |
|---|---|---|
| Jouni Tuomisto | j****o@k****h | 1457 |
| Juha Yrjölä | j****a@i****i | 838 |
| Michael Mechenich | m****h@g****m | 473 |
| Timo Tuominen | t****n@g****m | 286 |
| Bernhard Bliem | b****d@b****z | 225 |
| Matias Wargelin | m****n@k****h | 111 |
| Jan-Erik S. | 6****u | 100 |
| Joe Smallwood | j****d@k****h | 13 |
| Tero Tikkanen | t****n@g****m | 6 |
| Nadine-Cyra Freistetter | 8****r | 5 |
| philippestolz | 1****z | 4 |
| samuelkwijaya-wong | s****a@k****h | 3 |
| adinhodovic | h****n@g****m | 3 |
| Nadine-Cyra Freistetter | n****i@N****l | 3 |
| DeepL | n****l@w****g | 2 |
| Lilia Sviridova | s****a@g****m | 1 |
Committer domains:
- kausal.tech: 4
- weblate.org: 1
- bliem.xyz: 1
- iki.fi: 1
Issue and Pull Request metadata
Last synced: 4 days ago
Total issues: 11
Total pull requests: 317
Average time to close issues: about 2 months
Average time to close pull requests: 12 days
Total issue authors: 3
Total pull request authors: 11
Average comments per issue: 0.0
Average comments per pull request: 0.68
Merged pull request: 236
Bot issues: 0
Bot pull requests: 0
Past year issues: 1
Past year pull requests: 185
Past year average time to close issues: N/A
Past year average time to close pull requests: 4 days
Past year issue authors: 1
Past year pull request authors: 8
Past year average comments per issue: 0.0
Past year average comments per pull request: 0.94
Past year merged pull request: 132
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- juyrjola (5)
- terotik (5)
- MWargelin (1)
Top Pull Request Authors
- jtuomist (87)
- Bhavatu (56)
- MWargelin (54)
- tituomin (53)
- bbliem (26)
- mechenich (19)
- woodwoerk (11)
- rominf (6)
- ibrahim-string (2)
- samuelkwijaya-wong (2)
- lilia1891 (1)
Top Issue Labels
Top Pull Request Labels
- New feature (4)
- enhancement (2)
- Dependencies (2)
- Refactor (1)
- Documentation update (1)
- Bug fix (1)
Dependencies
- actions/checkout v2 composite
- docker/login-action v1 composite
- postgres 13 build
- ${APP_IMAGE-kausal-paths} latest
- ${DB_IMAGE-kausal-paths-postgres} latest
- ${REDIS_IMAGE-redis 6.0-alpine}
- actions/checkout v4 composite
- actions/download-artifact v4 composite
- actions/upload-artifact v4 composite
- codecov/codecov-action v5 composite
- codecov/test-results-action v1 composite
- harbor.kausal.tech/library/elasticsearch latest docker
- postgis/postgis 16-3.4-alpine docker
- 429 dependencies
- 213 dependencies
- @playwright/test ^1.42.0 development
- @types/node ^20.11.23 development
- ghcr.io/astral-sh/uv latest build
- mcr.microsoft.com/devcontainers/base debian build
- @playwright/test 1.55.1 development
- @types/node 20.19.17 development
- fsevents 2.3.2 development
- playwright 1.55.1 development
- playwright-core 1.55.1 development
- undici-types 6.21.0 development
- mjml ^5.0.0-alpha.6
- actions/checkout v4 composite
- actions/download-artifact v4 composite
- actions/upload-artifact v4 composite
- codecov/codecov-action v5 composite
- daun/playwright-report-summary v3 composite
- ${{inputs.backend_image}} * docker
- ${{inputs.ui_image}} * docker
- postgis/postgis 16-3.4-alpine docker
- redis 7-alpine docker
Score: 5.662960480135945