Science Score: 100.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 1 DOI reference(s) in JOSS metadata -
✓Academic publication links
Links to: zenodo.org -
✓Committers with academic emails
3 of 8 committers (37.5%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
Keywords from Contributors
Repository
A python library for impact crater data science
Basic Info
- Host: GitHub
- Owner: cjtu
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://craterpy.readthedocs.io/
- Size: 14 MB
Statistics
- Stars: 20
- Watchers: 5
- Forks: 8
- Open Issues: 13
- Releases: 14
Topics
Metadata Files
README.md
Craterpy: Impact crater data science in Python
Overview
Craterpy makes it easier to work with impact crater data in Python. Highlights:
- convert a table of crater data to a GeoDataFrame or GIS-ready shapefile
- extract zonal statistics associated with each crater in circlular or annular regions (rasterstats)
- eliminate some pain points of planetary GIS analysis (antimeridian wrapping, projection conversions, etc.)
Note: Craterpy is not a crater detection algorithm (e.g. PyCDA), nor is it a crater count age dating tool (see craterstats).
Note: Craterpy is in development. We appreciate bug reports and feature requests on the issues board.
Quickstart
Install with pip install craterpy then follow the full worked example in the docs Getting Started.
Demo
Quickly import tabluar crater data from a CSV and visualize it on a geotiff in 2 lines of code:
```python from craterpy import CraterDatabase, sample_data
cdb = CraterDatabase(sampledata['vestacraters.csv'], 'Vesta', units='m') cdb.plot(sample_data['vesta.tif'], alpha=0.5, color='tab:green') ```

Clip and plot targeted regions around each crater from large raster datasets.
python
cdb.add_circles('crater_rois', 3)
cdb.plot_rois(sample_data['vesta.tif'], 'crater_rois', range(1500, 1503))

Extract zonal statistics for crater regions of interest.
```python
Import lunar crater and define the floor and rim
cdb = CraterDatabase(sampledata['mooncraters.csv'], 'Moon', units='km') cdb.addannuli("floor", 0.4, 0.8) # Crater floor (exclude central peak and rim) cdb.addannuli("rim", 0.9, 1.1) # Thin annulus at crater rim
Compute summary statistics for every ROI see docs for supported stats
stats = cdb.getstats(sampledata['moon_dem.tif'], regions=['floor', 'rim'], stats=['median'])
Compute crater depth as rim elevation - floor elevation
stats['depth (m)'] = (stats.medianrim - stats.medianfloor) print(stats.head(3).round(2))
Name Rad Lat Lon medianfloor medianrim depth (m)
Olbers D 50.015 10.23 -78.03 -1452.50 -1322.88 129.62
Schuster 50.04 4.44 146.42 445.58 1976.97 1531.39
Gilbert 50.125 -3.20 76.16 -2213.66 -731.64 1482.02
```
Documentation
Full API documentation and usage examples are available at ReadTheDocs.
Installation
We recommend pip installing craterpy into a virtual environment, e.g. with conda or venv:
bash
pip install craterpy
- Note: Craterpy is currently only tested on Ubuntu and OS X but may work on some versions of Windows.
Contributing
There are two major ways you can help improve craterpy:
Report bugs or request new features on the issues board.
Contributing directly. See CONTRIBUTING.rst for full details. First time open source contributors are welcome!
Citing craterpy
Craterpy is MIT Licenced and is free to use with attribution. Citation information can be found here.
Owner
- Name: Christian J. Tai Udovicic
- Login: cjtu
- Kind: user
- Location: Honolulu, HI
- Website: cjtu.github.io
- Repositories: 26
- Profile: https://github.com/cjtu
Open planetary science, software dev, data science @openplanetary
JOSS Publication
Craterpy: Impact crater data science in Python
Authors
Tags
planetary science data analysis spatial analysisCitation (CITATION.cff)
cff-version: 1.2.0 type: software message: "If you use this software, please cite it as below." authors: - family-names: "Tai Udovicic" given-names: "Christian J." affiliation: University of Hawaii at Manoa orcid: "https://orcid.org/0000-0001-9972-1534" - family-names: "Essunfeld" given-names: "Ari" orcid: "https://orcid.org/0000-0001-8689-0734" title: "Craterpy" doi: 10.5281/zenodo.830057 url: "https://github.com/cjtu/craterpy" license: MIT
GitHub Events
Total
- Create event: 17
- Release event: 5
- Issues event: 34
- Watch event: 4
- Delete event: 16
- Member event: 1
- Issue comment event: 50
- Push event: 56
- Pull request review event: 17
- Pull request review comment event: 30
- Pull request event: 41
Last Year
- Create event: 17
- Release event: 5
- Issues event: 34
- Watch event: 4
- Delete event: 16
- Member event: 1
- Issue comment event: 50
- Push event: 56
- Pull request review event: 17
- Pull request review comment event: 30
- Pull request event: 41
Committers
Last synced: almost 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Christian | c****c@g****m | 214 |
| Cjtu | c****i@r****m | 41 |
| Cong | c****s@g****m | 3 |
| Cailin Gallinger | c****r@m****a | 3 |
| Cjtu | c****c@m****a | 2 |
| Alex Boivin | a****n@m****a | 1 |
| Dylan Hickson | d****n@g****m | 1 |
| dependabot[bot] | 4****] | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 34
- Total pull requests: 87
- Average time to close issues: almost 2 years
- Average time to close pull requests: 4 months
- Total issue authors: 7
- Total pull request authors: 7
- Average comments per issue: 0.65
- Average comments per pull request: 1.09
- Merged pull requests: 31
- Bot issues: 0
- Bot pull requests: 51
Past Year
- Issues: 24
- Pull requests: 42
- Average time to close issues: 22 days
- Average time to close pull requests: 12 days
- Issue authors: 4
- Pull request authors: 3
- Average comments per issue: 0.63
- Average comments per pull request: 1.24
- Merged pull requests: 21
- Bot issues: 0
- Bot pull requests: 15
Top Authors
Issue Authors
- cjtu (22)
- ESCostello (4)
- marcsit (3)
- athulpg007 (2)
- cgallinger (1)
- ghentr (1)
- cxong (1)
Pull Request Authors
- dependabot[bot] (51)
- cjtu (17)
- ariessunfeld (15)
- boivinalex (1)
- graduateddylinder (1)
- cgallinger (1)
- cxong (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 271 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 12
- Total maintainers: 1
pypi.org: craterpy
Impact crater data science in Python.
- Documentation: https://craterpy.readthedocs.io/
- License: MIT
-
Latest release: 0.9.4
published 5 months ago
Rankings
Maintainers (1)
Dependencies
- affine ==2.3.1
- attrs ==21.4.0
- certifi ==2022.6.15
- click ==8.1.3
- click-plugins ==1.1.1
- cligj ==0.7.2
- colorama ==0.4.5
- cycler ==0.11.0
- fonttools ==4.34.4
- importlib-metadata ==1.7.0
- kiwisolver ==1.4.4
- matplotlib ==3.5.2
- numpy ==1.21.6
- packaging ==21.3
- pandas ==1.3.5
- pillow ==9.2.0
- pyparsing ==3.0.9
- python-dateutil ==2.8.2
- pytz ==2022.1
- rasterio ==1.2.10
- setuptools-scm ==7.0.5
- six ==1.16.0
- snuggs ==1.4.7
- tomli ==2.0.1
- typing-extensions ==4.3.0
- zipp ==3.8.1
- 131 dependencies
- black ^22.6 develop
- jupyter ^1.0.0 develop
- myst-parser ^0.18.0 develop
- pylint ^2.8.2 develop
- pytest ^6.2.4 develop
- pytest-cov ^2.11.1 develop
- sphinx ^5.1.1 develop
- sphinx-rtd-theme ^1.0.0 develop
- matplotlib ^3.4.2
- numpy ^1.20.2
- pandas ^1.2.4
- python ^3.8,<3.10
- rasterio ^1.2.8
- affine ==2.3.1
- attrs ==22.1.0
- certifi ==2022.6.15
- click ==8.1.3
- click-plugins ==1.1.1
- cligj ==0.7.2
- colorama ==0.4.5
- cycler ==0.11.0
- fonttools ==4.34.4
- kiwisolver ==1.4.4
- matplotlib ==3.5.2
- numpy ==1.23.1
- packaging ==21.3
- pandas ==1.4.3
- pillow ==9.2.0
- pyparsing ==3.0.9
- python-dateutil ==2.8.2
- pytz ==2022.1
- rasterio ==1.3.0
- setuptools-scm ==7.0.5
- six ==1.16.0
- snuggs ==1.4.7
- tomli ==2.0.1
- typing-extensions ==4.3.0
- Gr1N/setup-poetry v4 composite
- actions/cache v2 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- codecov/codecov-action v1 composite
- actions/checkout v2 composite
- actions/setup-python v1 composite
- actions/checkout v2 composite
- actions/setup-python v1 composite
