Table of Contents
Introduction
libcomcat is a project designed to provide a Python equivalent to the ANSS ComCat search API. This includes a Python library that provides various classes and functions wrapping around the ComCat API, and a number of command line programs that use those:
findidFind the ID of an event closest to input parameters (time, latitude, longitude). Also can provide the authoritative ID if an event id is provided.getcsvGenerate csv or Excel files with basic earthquake information.geteventhistGenerate csv or Excel files with a history of product submission for an event. Can also create a timeline demonstrating when different product versions were released along with their summaries.getmagsDownload all available magnitudes from all sources.getpagerDownload information that represents the PAGER exposure and loss results.getphasesGenerate csv or Excel files with phase information.getproductDownload ComCat product contents (shakemap grids, origin quakeml, etc.)
Installation
libcomcat is now installable via pip:
pip install usgs-libcomcat
Uninstalling and Updating
To uninstall:
pip uninstall usgs-libcomcat
To update:
pip install --upgrade usgs-libcomcat
Motivation
libcomcat is a python wrapper for the Comprehensive Catalog (ComCat), which has a web page interface and API. ComCat contains information in Events which contain Products. Products contain Contents in the form of files, maps, etc.
The ComCat interface is very user friendly, but does not support automation. The API supports automation, but limits the number of events that can be returned to 20,000. libcomcat uses the API in a way that allows for:
- Searches returning more than 20,000 eventsource
- Automation of product file downloads
- Extraction of information in product content files
Documentation
Documentation can be found in the docs folder:
Example Jupyter notebooks show how the API can be used to get and manipulate information from ComCat:
Note: The ShakeMap/DYFI Station Pairs Notebook requires a geodetic distance calculation function
, which can be installed via: pip install geopy
- Classes Notebook
- Dataframes Notebook
- Detailed Event Notebook
- Event History Notebook
- Magnitude Comparison Notebook
- Phase and Magnitude Notebook
- Search Notebook
- Get ShakeMap/DYFI Station Pairs Notebook
Getting Help
Any questions about libcomcat can be directed to the primary author:
Mike Hearne mhearne@usgs.gov
Citation
If you wish to cite this work in your own publication, you may use this DOI: https://doi.org/10.5066/P91WN1UQ
Metadata
Release files for usgs-libcomcat 2.1.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| usgs_libcomcat-2.1.12.tar.gz | 958.1 kB | Without provenance | Details for usgs_libcomcat-2.1.12.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| usgs_libcomcat-2.1.12-py3-none-any.whl | Python 3 | none | any | Details for usgs_libcomcat-2.1.12-py3-none-any.whl |
Total release size: 1.9 MB
Release files / usgs_libcomcat-2.1.12.tar.gz
| Download URL | usgs_libcomcat-2.1.12.tar.gz |
|---|---|
| Size | 958.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ec67e23d860486d3430dab4c887bc75da91b693b436f634c8881d286dce3bd79
|
|
BLAKE2b-256 checksum How to use checksums |
af4e37b396893e9f214bb40523ad5b4080b1ddb725e384a5917d3718ceba01a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.5
|
Release files / usgs_libcomcat-2.1.12-py3-none-any.whl
| Download URL | usgs_libcomcat-2.1.12-py3-none-any.whl |
|---|---|
| Size | 976.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
66882d2a95504b48ae36cb9d25687ca0444de48932601975f1c3510cc2f0189d
|
|
BLAKE2b-256 checksum How to use checksums |
0b2012902049bda60850bed690cff2831ebaa7c09e3fd1f6ebc46bab9c25a95e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.5
|
Security for usgs-libcomcat 2.1.12
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.