2 releases
0.1.1 | Mar 9, 2023 |
---|---|
0.1.0 | Mar 9, 2023 |
#5 in #seismic
16KB
400 lines
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
~3–4.5MB
~110K SLoC