After the DC Earthquake of 2011, I became intrigued by the earthquake data exposed by the United States Geological Survey (USGS). During this time, I wrote my first app for the Windows Store that used USGS's earthquake data, Rumble Radar. Over the years, I have reused the data mainly for Spatial Data Visualization demos, but also as the basis of Xamarin, UWP and Windows Phone demos. What I failed to do, time and time again, was to build a reusable library for interacting with the USGS GeoJSON API. Therefore, I always had duplicated code in most of my demos which didn't necessarily add value to the topic or technology being showcased. That is why I wrote the UsgsClient library.
What is USGS Client?
USGS Client is a simple .NET Standard 1.1 Library that simplifies accessing USGS Earthquake API. On this release, it supports interacting with the GeoJSON Summary Feed and the GeoJSON Summary Detail. It is fully tested and built to be IOC container friendly.
Install the UsgsClient from Nuget by executing the following command.
USGS Earthquake API
Retrieving all significant earthquakes for the past week.
var svc = Usgs.Quakes.Feed(); var features = await svc .Summary( Magnitude.Significant, Timeframe.Week);
For documentation on the USGS Earthquake GeoJSON Summary Feed read the associated documentation at https://earthquake.usgs.gov
Retrieving detail information for earthquake id
var svc = Usgs.Quakes.Feed(); var quakeId = "us20009jd6"; var quake = await svc.Detail(quakeId);
For documentation on the USGS Earthquake GeoJSON Detail Feed read the associated documentation at https://earthquake.usgs.gov
For more information on how to install, use, issues, roadmap, or to contribute to the UsgsClient library go the project site at:
Roberto has been architecting and building software solutions using Microsoft technology for the past 14 years. Awarded a Microsoft MVP award for C# in 2007,2008 and 2010. Originally from the Dominican Republic, and the proud father of two beautiful daughters that make his life special.