Twitter Feed Popout byInfofru

Adventures in .NET Software Craftsmanship!

Announcing UsgsClient Library 1.0

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.

Install-Package GeoJSON.NET -Version 1.0.60-alpha 
Install-Package UsgsClient

USGS Earthquake API

GeoJSON Summary Feed

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

GeoJSON Detail Feed

Retrieving detail information for earthquake id ak16139649.

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


For more information on how to install, use, issues, roadmap, or to contribute to the UsgsClient library go the project site at:


Back From The Dead - BlogEngine.NET

Ok, so it has been four years since I wrote a blog post, time does fly when you are writing code and chasing deadlines. Anyway, lately I have been feeling the need to revive my blog, most importantly because I have caught the writing bug again and also because I am extremely excited about how the software technology landscape is looking these days, but more about that later.  I wanted to focus on what I had to do to get my blog up and running again.  

Staying with BlogEngine.NET

My original blog ran on BlogEngine.NET version 1.6.1, these days there are a lot of better options if you are starting from scratch or upgrading your blog, but mostly out of curiosity and seeking the path of least resistance I decided to stay on BlogEngine.NET and upgrade to version 3.2.  The latest version of BlogEngine.NET provides a modern, responsive look and feel that allows readers to use a vast range of mobile devices to browse the content of this site.  At the end of day, this was really all I was looking to achieve in this effort, to make sure that the site no longer looked like a Web 2.0 website and that it adhered to modern web design standards.

How I made it work?

Upgrading from BlogEngine.NET was relatively straight forward. I followed the instructions provided at the following link and ran into very few issues. I did not migrate my custom content, scripts, theme, or styles as I intended to switch to a more modern theme.

Upgrading Blog Engine

Important Make sure you run all database scripts necessary to upgrade your database. Including those on the root /setup/[dbengine]/ folder.


Since I did not migrate the original theme the website did not render on the first attempt. Figuring out the problem was not trivial, but the only thing I needed to do was update the settings for BlogEngine.NET by running the following database script to change the theme back to the default. 


I am very satisfied with the end result. I did do some additional work that I will be posting about in the near future.  Additional work worth mentioning: Enabled Disqus as comment platform, added support for embedded Gist via a BlogEngine.NET extension, added a Social Bar that allows readers to share posts across the traditional social networking platforms (Facebook, Twitter, LinkedIn, and Google+).


Rumble Radar Released!

Recently, motivated by the launch of Windows 8 and the recent seismic activity on the Mid-Atlantic region.  I began to work on a very simple project, a Windows 8 Store application that showcases recent significant seismic activity worldwide using the data provided by the United States Geological Survey (  I am proud to announce that the first version of my app “Rumble Radar” is available now for download from the Windows 8 Store. 


Click here to download:

- Geocodes and groups significant earthquakes, as designated by USGS, for the past 7 days.
- Color encodes earthquakes using alert level, as assigned by USGS.
- Links to detail information at USGS Website. 

Roadmap/Future Enhancements
- Expand dataset to include all earthquakes of magnitude 2.5 and greater for the past 30 days.
- Interactive map of all earthquakes.
- Generate date based statistics per region.

WinJS: Do I have internet access?

Odds are the new shiny Windows Store application you are writing will pull some information from the internet for your users to consume.  In fact, the default templates that Microsoft provides already make that assumption. That makes it very likely that you will want to know if the device your application is running on has an active internet connection.  Well Microsoft provides us with a very rich Network API (click here for more info) that you could use to answer such a question. But if want to write less code or want to provide an abstraction layer from WinRTs API, then you could write something similar to this: 

A very basic sample would look like:

Or my favorite style:

TIP: Nokia Lumia 920 Internet Sharing //Build

Disclaimer: This post does not imply that the Internet Sharing feature will only work if you have the Spanish keyboard installed. It only implies that the build on the Windows Phone 8 devices handed out at //Build/ had an issue that prevented users on the ATT network to use Internet Sharing. My guess is that by adding a keyboard (any keyboard probably) to the device we are also triggering an update that solves the Internet Sharing issue.  

Update (11/26/2012):  If the issue happens again installing another keyboard does the trick (I used Vietnamese).

I was very excited to receive a Nokia Lumia 920 while attending the //Build conference last week, but was extremely disappointed that the Internet Sharing feature was not working even though my ATT plan supported it. Obviously, that was one of the first things I wanted to do since I wanted to share the Data Plan on the device with my brand new Microsoft Surface.  Well, by sheer luck, I was able to get it to work just follow the instructions bellow to enable it on your //Build Nokia Lumia 920 device: 

1) Go to Settings
2) Go to Keyboard
3) + Add Keyboards
4) Select Spanish (Spain)
5) Click on the checkmark icon to install.

The only reason why I found this workaround is because I write a lot of messages to my family in Spanish and I hate the fact that the English keyboard tries to autocorrect Spanish using an English dictionary as I type. But, little did I know that it was going to have this wonderful and unexpected side effect.