# SAFE
Stratified Assessment of Forecasts over Earth
[Preprint](https://n-masi.github.io/papers/safe_masi.pdf) and [Website](https://n-masi.github.io/safe)
### Installation
`pip install safe-earth`
To build from source instead:
```
# get repo
git clone git@github.com:N-Masi/safe.git
# create dev environment
conda create -n safe.env
conda activate safe.env
pip install --file requirements.txt
conda install --channel conda-forge pygmt plotly typing_extensions
```
<!--
If you are an authorized contributor and want to upload a new version to pypi:
```
python3 -m build
python3 -m twine upload dist/*
```
-->
<!-- When running directly from the source repository, run files with `python -m safe_earth.<directory>.<file_without_extension>` while in the `src/` subdirectory. -->
### Example
An example of using the package to collect metrics on 6 AIWP models across the territory, subregion, and income
attributes is availabe in `demos/wb2_240x121.py`. It assesses the models using 2020 ERA5 data.
### Data Notes
To unify the coordinate system across all integrated data sources, latitude ranges [-90, 90] with index 0 at -90, and longitude [-180, 180) but with index 0 at 0 and a wraparound from 180 to -180 in the middle. This is because metadata sourced from pygeoboundaries_geolab follows this coordinate system, and it is easiest to bring tabular data into conformance.
### Testing
Run `pytest` in the of the source repository directory.
Raw data
{
"_id": null,
"home_page": null,
"name": "safe-earth",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "climate, earth, fairness, machine learning, stratification, weather",
"author": null,
"author_email": "Nick Masi <nicholas_masi@alumni.brown.edu>, Daniel Cai <daniel_cai@brown.edu>, Randall Balestriero <randall_balestriero@brown.edu>",
"download_url": "https://files.pythonhosted.org/packages/16/49/c16f2ea46bef07b4791db9d1210d288db68070a7f9fa71cdc08b4135682e/safe_earth-0.0.6.tar.gz",
"platform": null,
"description": "# SAFE\nStratified Assessment of Forecasts over Earth\n\n[Preprint](https://n-masi.github.io/papers/safe_masi.pdf) and [Website](https://n-masi.github.io/safe)\n\n### Installation\n\n`pip install safe-earth`\n\nTo build from source instead:\n\n```\n# get repo\ngit clone git@github.com:N-Masi/safe.git\n\n# create dev environment\nconda create -n safe.env\nconda activate safe.env\npip install --file requirements.txt\nconda install --channel conda-forge pygmt plotly typing_extensions\n```\n<!-- \nIf you are an authorized contributor and want to upload a new version to pypi: \n\n```\npython3 -m build\npython3 -m twine upload dist/*\n```\n-->\n\n<!-- When running directly from the source repository, run files with `python -m safe_earth.<directory>.<file_without_extension>` while in the `src/` subdirectory. -->\n\n### Example\n\nAn example of using the package to collect metrics on 6 AIWP models across the territory, subregion, and income \nattributes is availabe in `demos/wb2_240x121.py`. It assesses the models using 2020 ERA5 data.\n\n### Data Notes\n\nTo unify the coordinate system across all integrated data sources, latitude ranges [-90, 90] with index 0 at -90, and longitude [-180, 180) but with index 0 at 0 and a wraparound from 180 to -180 in the middle. This is because metadata sourced from pygeoboundaries_geolab follows this coordinate system, and it is easiest to bring tabular data into conformance.\n\n### Testing\n\nRun `pytest` in the of the source repository directory.\n",
"bugtrack_url": null,
"license": null,
"summary": "Stratified Assessments of Forecasts over Earth",
"version": "0.0.6",
"project_urls": {
"Homepage": "https://n-masi.github.io/safe/",
"Repository": "https://github.com/n-masi/safe"
},
"split_keywords": [
"climate",
" earth",
" fairness",
" machine learning",
" stratification",
" weather"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "87a3f84263dc12294e811ee44881e8a4ded47a21beb74134e371d4ab21a61b61",
"md5": "8dc9e9b94403082529fb7ad96d2a111a",
"sha256": "6969a7772aa7dcc54326b6926bce611fefb12d2e70b4b2f39d8b6f07fddb9f12"
},
"downloads": -1,
"filename": "safe_earth-0.0.6-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "8dc9e9b94403082529fb7ad96d2a111a",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 26666410,
"upload_time": "2025-07-30T22:28:43",
"upload_time_iso_8601": "2025-07-30T22:28:43.199523Z",
"url": "https://files.pythonhosted.org/packages/87/a3/f84263dc12294e811ee44881e8a4ded47a21beb74134e371d4ab21a61b61/safe_earth-0.0.6-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "1649c16f2ea46bef07b4791db9d1210d288db68070a7f9fa71cdc08b4135682e",
"md5": "42c12d3b0db43c4fb9bd38d5ed89bd56",
"sha256": "bff1d84417619969ebc12d47267a5c2a94f6753a512601de93ffac278afc4eb7"
},
"downloads": -1,
"filename": "safe_earth-0.0.6.tar.gz",
"has_sig": false,
"md5_digest": "42c12d3b0db43c4fb9bd38d5ed89bd56",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 26619956,
"upload_time": "2025-07-30T22:28:46",
"upload_time_iso_8601": "2025-07-30T22:28:46.100074Z",
"url": "https://files.pythonhosted.org/packages/16/49/c16f2ea46bef07b4791db9d1210d288db68070a7f9fa71cdc08b4135682e/safe_earth-0.0.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-30 22:28:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "n-masi",
"github_project": "safe",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "numpy",
"specs": []
},
{
"name": "matplotlib",
"specs": []
},
{
"name": "pandas",
"specs": []
},
{
"name": "shapely",
"specs": []
},
{
"name": "tqdm",
"specs": []
},
{
"name": "lightning",
"specs": []
},
{
"name": "scikit-learn",
"specs": []
},
{
"name": "pyyaml",
"specs": []
},
{
"name": "torchvision",
"specs": []
},
{
"name": "torchaudio",
"specs": []
},
{
"name": "basemap",
"specs": []
},
{
"name": "xarray",
"specs": []
},
{
"name": "zarr",
"specs": []
},
{
"name": "kagglehub",
"specs": []
},
{
"name": "huggingface_hub",
"specs": []
},
{
"name": "geotiff",
"specs": []
},
{
"name": "cartopy",
"specs": []
},
{
"name": "geopy",
"specs": []
},
{
"name": "neuraloperator",
"specs": []
},
{
"name": "einops",
"specs": []
},
{
"name": "wandb",
"specs": []
},
{
"name": "kaggle",
"specs": []
},
{
"name": "gcsfs",
"specs": []
},
{
"name": "fsspec",
"specs": []
},
{
"name": "cfgrib",
"specs": []
},
{
"name": "cdsapi",
"specs": []
},
{
"name": "xesmf",
"specs": []
},
{
"name": "torch",
"specs": []
},
{
"name": "optuna",
"specs": []
},
{
"name": "dotenv",
"specs": []
},
{
"name": "rasterio",
"specs": []
},
{
"name": "geopandas",
"specs": []
},
{
"name": "pytest",
"specs": []
},
{
"name": "pytest-cov",
"specs": []
},
{
"name": "geojson",
"specs": []
},
{
"name": "requests_cache",
"specs": []
},
{
"name": "earthengine-api",
"specs": []
},
{
"name": "pygeoboundaries-geolab",
"specs": []
},
{
"name": "maskedtensor-nightly",
"specs": []
},
{
"name": "pytorch_lightning",
"specs": []
},
{
"name": "rich",
"specs": []
},
{
"name": "hydra-core",
"specs": []
},
{
"name": "wandb",
"specs": []
}
],
"lcname": "safe-earth"
}