USGSSource

class sasquatchbackpack.sources.USGSSource(config, topic_name='usgs_earthquake_data')

Bases: DataSource

Backpack data source for the USGS Earthquake API.

Parameters:
  • config (USGSConfig) – USGSConfig to transmit relevant information to the Source

  • topic_name (str) – Specific source name, used as an identifier

Methods Summary

get_records()

Call the USGS Comcat API and assembles records.

load_schema()

Query the USGS API using the current provided parameters, then update results.

Methods Documentation

get_records()

Call the USGS Comcat API and assembles records.

Returns:

List[dict] – A payload consisting of a list of dictionaries, each containing data about a specific earthquake in the build results.

Return type:

list[dict]

load_schema()

Query the USGS API using the current provided parameters, then update results.

Return type:

str