{"id":19407436,"url":"https://github.com/observingclouds/xbitinfo","last_synced_at":"2025-04-05T14:08:31.067Z","repository":{"id":37952513,"uuid":"476252206","full_name":"observingClouds/xbitinfo","owner":"observingClouds","description":"Python wrapper of BitInformation.jl to easily compress xarray datasets based on their information content","archived":false,"fork":false,"pushed_at":"2025-03-23T01:22:07.000Z","size":910,"stargazers_count":54,"open_issues_count":25,"forks_count":20,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-29T13:08:28.101Z","etag":null,"topics":["compression","gsoc-2024","pangeo","python","xarray"],"latest_commit_sha":null,"homepage":"https://xbitinfo.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/observingClouds.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-31T10:12:46.000Z","updated_at":"2024-10-28T10:35:11.000Z","dependencies_parsed_at":"2023-02-09T15:46:29.377Z","dependency_job_id":"590a23ca-58e7-4be5-a097-cb42b5a2f383","html_url":"https://github.com/observingClouds/xbitinfo","commit_stats":{"total_commits":417,"total_committers":14,"mean_commits":"29.785714285714285","dds":0.5467625899280575,"last_synced_commit":"7341975a65f97267ca4c1c124deb28f6694b380a"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/observingClouds%2Fxbitinfo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/observingClouds%2Fxbitinfo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/observingClouds%2Fxbitinfo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/observingClouds%2Fxbitinfo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/observingClouds","download_url":"https://codeload.github.com/observingClouds/xbitinfo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247345854,"owners_count":20924102,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["compression","gsoc-2024","pangeo","python","xarray"],"created_at":"2024-11-10T11:47:15.903Z","updated_at":"2025-04-05T14:08:31.050Z","avatar_url":"https://github.com/observingClouds.png","language":"Python","readme":"\u003ch1 align=\"center\"\u003e\n\u003cimg src=\"/docs/_static/xbitinfo_logo.svg\" width=\"300\"\u003e\n\u003c/h1\u003e\u003cbr\u003e\n\n# xbitinfo: Retrieve information content and compress accordingly\n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/observingClouds/xbitinfo/main?labpath=docs%2Fquick-start.ipynb) [![Open In SageMaker Studio Lab](https://studiolab.sagemaker.aws/studiolab.svg)](https://studiolab.sagemaker.aws/import/github/https://github.com/observingClouds/xbitinfo/blob/main/docs/quick-start.ipynb) [![CI](https://github.com/observingClouds/xbitinfo/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/observingClouds/xbitinfo/actions/workflows/ci.yaml) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/observingClouds/xbitinfo/main.svg)](https://results.pre-commit.ci/latest/github/observingClouds/xbitinfo/main) [![Documentation Status](https://readthedocs.org/projects/xbitinfo/badge/?version=latest)](https://xbitinfo.readthedocs.io/en/latest/?badge=latest) [![pypi](https://img.shields.io/pypi/v/xbitinfo.svg)](https://pypi.python.org/pypi/xbitinfo) ![Conda (channel only)](https://img.shields.io/conda/vn/conda-forge/xbitinfo)\n\n\nThis is an [`xarray`](xarray.pydata.org/)-wrapper around [BitInformation.jl](https://github.com/milankl/BitInformation.jl) to retrieve and apply bitrounding from within python.\nThe package intends to present an easy pipeline to compress (climate) datasets based on the real information content.\n\n\n## How the science works\n\n### Paper\n\nKlöwer, M., Razinger, M., Dominguez, J. J., Düben, P. D., \u0026 Palmer, T. N. (2021). Compressing atmospheric data into its real information content. Nature Computational Science, 1(11), 713–724. doi: [10/gnm4jj](https://doi.org/10.1038/s43588-021-00156-2)\n\n### Video\n\n[![Video](https://img.youtube.com/vi/kcbOdwfskmY/0.jpg)](https://www.youtube.com/watch?v=kcbOdwfskmY)\n\n### Julia Repository\n\n[BitInformation.jl](https://github.com/milankl/BitInformation.jl)\n\n## How to install\n### Preferred installation\n`conda install -c conda-forge xbitinfo`\n### Alternative installation\n`pip install xbitinfo` # ensure to install julia manually\n\n## How to use\n\n```python\nimport xarray as xr\nimport xbitinfo as xb\nexample_dataset = 'eraint_uvz'\nds = xr.tutorial.load_dataset(example_dataset)\nbitinfo = xb.get_bitinformation(ds, dim=\"longitude\")  # calling bitinformation.jl.bitinformation\nkeepbits = xb.get_keepbits(bitinfo, inflevel=0.99)  # get number of mantissa bits to keep for 99% real information\nds_bitrounded = xb.xr_bitround(ds, keepbits)  # bitrounding keeping only keepbits mantissa bits\nds_bitrounded.to_compressed_netcdf(outpath)  # save to netcdf with compression\n```\n\n\n## Credits\n\n- [Milan Klöwer](https://github.com/milankl) for [BitInformation.jl](https://github.com/milankl/BitInformation.jl)\n- [`Cookiecutter`](https://github.com/audreyr/cookiecutter) and [`audreyr/cookiecutter-pypackage`](https://github.com/audreyr/cookiecutter-pypackage)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobservingclouds%2Fxbitinfo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fobservingclouds%2Fxbitinfo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobservingclouds%2Fxbitinfo/lists"}