#data #source #retrieve #earthquake #seismic #usgs #cenc

dizhen

Library to retrieve seismic data

2 releases

0.1.1 Mar 9, 2023
0.1.0 Mar 9, 2023

#6 in #seismic

BSD-3-Clause

16KB
400 lines

dizhen

crates.io,link=https://crates.io/crates/dizhen docs.rs,link=https://docs.rs/dizhen

dizhen (地震, earthquake) is a Rust library to retrieve seismic (earthquake) data from various sources.

It CAN NOT be used for early warning; use your local early warning service.

.Supported sources

.Example [source,rust]

use dizhen::{CENCSource, USGSSource, Source};

let ceic = CENCSource::new();
let usgs = USGSSource::new();
dbg!(ceic.get_latest()?.first(), usgs.get_latest()?.first());

lib.rs:

For data sources, see Source and re-exported *Source structs.

Time values are chrono::DateTime<Utc>.

use dizhen::{CENCSource, USGSSource, Source};

let ceic = CENCSource::new();
let usgs = USGSSource::new();
dbg!(
ceic.get_latest().unwrap().first(),
usgs.get_latest().unwrap().first()
);

Dependencies

~4–5.5MB
~99K SLoC