Anybody who has been near me in the fall or winter for the past 8 or so years has probably noticed that I cough. A lot. I often feel like I should have a t-shirt that says, "It's not contagious, I promise!" The short story is that it's most likely allergies and I'm working on it. I found an excellent specialist last year who does neat things like apply science to the problem, rather than just telling me I have asthma. (I do not have asthma.) For the first time in many years, I might be close to a cure for this stupid cough—or at least suppression of symptoms through the magic of corticosteriods. It's already January and my ribs don't hurt from coughing. I can't express how amazing that is. Yay!
Anyhow, that's just the background information. The ridiculous impulse I'm having right now is that I actually want to cough for just a little while longer because I just wrote an Android app to track it. Why didn't I think of this before? It's a very simple app that just asks for a severity level: 1, 2, 3, or 4. When I cough, I pick a severity and click a button. Easy as pie.
After a button is clicked, the app goes out and gets weather from OpenWeatherMap, air quality from AirNow, and then logs everything to New Relic Insights, which is a data analytics platform (disclaimer: I work for New Relic). It has been a lot of fun to build, and I signed up for an Android course through Coursera so I can learn about the things I inevitably did wrong as I slapped it together.
My plan going forward is to clean it up and put it out on Github so other people can fork/contribute/laugh at my source code. I hope it will be useful for others who want to track similar symptoms that have them seeking specialists. In light of that, my next step is probably to find a better way to store the data. Insights was an easy way to get started, but I have a limited retention policy and it's not good for sharing the app with others, should anybody else want to use it. I also want to play around with D3.js to see if I can come up with a good way to visualize the relationships between, say, humidity, temperature, and the severity of my cough. Of course, there are a lot more things I can do with it. For instance, it would probably be good to know when I start or stop medications, start and stop exercising, etc., so I could add some sort of event logging. Jesse also had the idea of doing a little Arduino project that will let me get temperature and humidity data for the room I'm in rather than the current weather in whatever city I'm in.
Here's a look a the super minimal user interface. This could definitely look better, but I was eager to start collecting data before I start mucking around with pretty buttons.
And here's some sample weather data in Insights (air quality didn't fit in a screenshot). I don't have enough data yet to show some good graphs, but this gives you the general idea.
To sum up, this has been good fun, and I'm excited to be writing some code. I'll be even more excited if it helps me gain insight into this cough of mine. I think it will. I mean, even if the steroids stop the cough, cold air will still be a trigger, so maybe I can use it to figure out the minimum conditions needed before I can ride my bike to work again. That would be pretty sweet!