gadomski/glac.io — pull request #135 by gadomski (2014-09-18 21:41:10+00:00)
Title: Add wind rose visualization

This is the start of work on the windrose visualization. I've pushed the first pass up to the dev site: http://gadomski.github.io/glac.io/locations/hubbard/windrose.html.

So far I only have Hubbard working, and working in the roughest sense (there's one static visualization of all data). Additional work includes adding the other sites, doing month-by-month visualization, and probably more. But, we've got a start.

![screenshot_9_18_14__15_39](https://cloud.githubusercontent.com/assets/58314/4327722/53c335da-3f7c-11e4-8799-5f148e1784de.png)

In the course of developing this patch, I discovered a bug in our previous wind direction handling. Since wind directions are circular (359° is right next to 0°), a traditional mean doesn't work for averaging wind direction data. I [added a feature to our json api](https://github.com/gadomski/cwms-jsonapi/commit/7b752fb057d72ffa210c1573e45c42018cbc3df9) to provide circular averages when requested, then upgraded our timeseries fetcher (6410e7c579b14f26ef7e27750a19545a421ac51 and dbcefa188e85b03e0b4ea59b3e767dd80cc0d07b) to use this new ability. This changes our chart visualizations as well.

Immediate feedback always welcome, of course, and I'll be asking for more feedback as I build out the rest of the wind rose.