https://github.com/astropenguin/xarray-custom
:zap: Data classes for custom xarray creation
Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
✓DOI references
Found 3 DOI reference(s) in README -
○Academic publication links
-
✓Committers with academic emails
1 of 1 committers (100.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.3%) to scientific vocabulary
Keywords
Repository
:zap: Data classes for custom xarray creation
Basic Info
- Host: GitHub
- Owner: astropenguin
- License: mit
- Language: Python
- Default Branch: master
- Homepage: https://astropenguin.github.io/xarray-custom
- Size: 560 KB
Statistics
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 2
- Releases: 0
Topics
Metadata Files
README.md
xarray-custom
:zap: Data classes for custom xarray creation
TL;DR
xarray-custom is a third-party Python package which helps to create custom DataArray classes in the same manner as the Python's native dataclass. Here is an introduction code of what the package provides:
```python from xarray_custom import coord, dataarrayclass
@dataarrayclass class Image: """DataArray class to represent images."""
dims = 'x', 'y'
dtype = float
accessor = 'img'
x: coord('x', int) = 0
y: coord('y', int) = 0
def normalize(self):
return self / self.max()
```
The key features are:
```python
create a custom DataArray
image = Image([[0, 1], [2, 3]], x=[0, 1], y=[0, 1])
use a custom method via an accessor
normalized = image.img.normalize()
create a custom DataArray filled with ones
ones = Image.ones((2, 2), x=[0, 1], y=[0, 1]) ```
- Custom DataArray instances with fixed dimensions, datatype, and coordinates can easily be created.
- NumPy-like special functions like
ones()are provided as class methods. - Custom DataArray methods can be available via a custom accessor.
Requirements
- Python: 3.6, 3.7, or 3.8 (tested by the author)
- Dependencies: See pyproject.toml
Installation
shell
$ pip install xarray-custom
License
Copyright (c) 2020 Akio Taniguchi
- xarray-custom is distributed under the MIT License
- xarray-custom uses an icon of xarray distributed under the Apache 2.0 license
Owner
- Name: Akio Taniguchi
- Login: astropenguin
- Kind: user
- Location: Nagoya, Japan
- Company: Nagoya University
- Website: https://astropengu.in
- Twitter: astropengu_in
- Repositories: 76
- Profile: https://github.com/astropenguin
Project assistant professor (LMT-FINER)
GitHub Events
Total
Last Year
Committers
Last synced: about 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Akio Taniguchi | t****i@a****p | 193 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 8 months ago
All Time
- Total issues: 17
- Total pull requests: 12
- Average time to close issues: about 1 month
- Average time to close pull requests: 8 minutes
- Total issue authors: 2
- Total pull request authors: 1
- Average comments per issue: 0.24
- Average comments per pull request: 0.0
- Merged pull requests: 12
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- astropenguin (16)
- shaunc (1)
Pull Request Authors
- astropenguin (12)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 30 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 11
- Total maintainers: 1
pypi.org: xarray-custom
Data classes for custom xarray creation
- Homepage: https://github.com/astropenguin/xarray-custom
- Documentation: https://astropenguin.github.io/xarray-custom
- License: MIT
-
Latest release: 0.6.2
published over 5 years ago
Rankings
Maintainers (1)
Dependencies
- alabaster 0.7.12 develop
- appdirs 1.4.4 develop
- appnope 0.1.0 develop
- argon2-cffi 20.1.0 develop
- atomicwrites 1.4.0 develop
- attrs 19.3.0 develop
- babel 2.8.0 develop
- backcall 0.2.0 develop
- black 19.10b0 develop
- bleach 3.1.5 develop
- certifi 2020.6.20 develop
- cffi 1.14.1 develop
- chardet 3.0.4 develop
- click 7.1.2 develop
- colorama 0.4.3 develop
- decorator 4.4.2 develop
- defusedxml 0.6.0 develop
- docutils 0.16 develop
- entrypoints 0.3 develop
- flake8 3.8.3 develop
- idna 2.10 develop
- imagesize 1.2.0 develop
- importlib-metadata 1.7.0 develop
- iniconfig 1.0.1 develop
- ipykernel 5.3.4 develop
- ipython 7.16.1 develop
- ipython-genutils 0.2.0 develop
- jedi 0.17.2 develop
- jinja2 2.11.2 develop
- json5 0.9.5 develop
- jsonschema 3.2.0 develop
- jupyter-client 6.1.6 develop
- jupyter-core 4.6.3 develop
- jupyterlab 2.2.2 develop
- jupyterlab-server 1.2.0 develop
- markupsafe 1.1.1 develop
- mccabe 0.6.1 develop
- mistune 0.8.4 develop
- more-itertools 8.4.0 develop
- nbconvert 5.6.1 develop
- nbformat 5.0.7 develop
- notebook 6.1.1 develop
- packaging 20.4 develop
- pandocfilters 1.4.2 develop
- parso 0.7.1 develop
- pathspec 0.8.0 develop
- pexpect 4.8.0 develop
- pickleshare 0.7.5 develop
- pluggy 0.13.1 develop
- prometheus-client 0.8.0 develop
- prompt-toolkit 3.0.3 develop
- ptyprocess 0.6.0 develop
- py 1.9.0 develop
- pycodestyle 2.6.0 develop
- pycparser 2.20 develop
- pydata-sphinx-theme 0.3.1 develop
- pyflakes 2.2.0 develop
- pygments 2.6.1 develop
- pyparsing 2.4.7 develop
- pyrsistent 0.16.0 develop
- pytest 6.0.1 develop
- pywin32 228 develop
- pywinpty 0.5.7 develop
- pyzmq 19.0.2 develop
- regex 2020.7.14 develop
- requests 2.24.0 develop
- send2trash 1.5.0 develop
- snowballstemmer 2.0.0 develop
- sphinx 3.1.2 develop
- sphinxcontrib-applehelp 1.0.2 develop
- sphinxcontrib-devhelp 1.0.2 develop
- sphinxcontrib-htmlhelp 1.0.3 develop
- sphinxcontrib-jsmath 1.0.1 develop
- sphinxcontrib-qthelp 1.0.3 develop
- sphinxcontrib-serializinghtml 1.1.4 develop
- terminado 0.8.3 develop
- testpath 0.4.4 develop
- tornado 6.0.4 develop
- traitlets 4.3.3 develop
- typed-ast 1.4.1 develop
- urllib3 1.25.10 develop
- wcwidth 0.2.5 develop
- webencodings 0.5.1 develop
- zipp 3.1.0 develop
- numpy 1.19.1
- pandas 0.25.3
- python-dateutil 2.8.1
- pytz 2020.1
- pyyaml 5.3.1
- six 1.15.0
- toml 0.10.1
- xarray 0.15.1
- black ^19.10b0 develop
- flake8 ^3.8 develop
- ipython ^7.15 develop
- jupyterlab ^2.2 develop
- pydata-sphinx-theme ^0.3 develop
- pytest ^6.0 develop
- sphinx ^3.1 develop
- numpy ^1.18
- python ^3.6
- pyyaml ^5.3
- toml ^0.10
- xarray ^0.15