Most of us would answer "blue, the sky is blue."
The sky is the ultimate canvas. From day to night the palette changes and subtle differences in weather blend to create new combinations. Clouds, stars, birds, aircraft -- each uniquely effect the view.
This project aims to answer the obvious question with a straightforward answer. By taking input from webcams scattered across the country and selecting the most prevelant color in any given "sky" region, we can produce the most basic color element and answer the question: What Color Is The Sky?
04.25.2010 - 22:22
One of the problems with working with so much data is scale. That is, even the smallest programming shortcuts end up as
big problems. I had a page that would take each source's "samples" and generate the daily color pattern so that you could
see the change in day / night cycle. The problem was that I was using inefficient HTML code for the generation of the
image. This meant that most people visiting the page would get fed up and just leave.
SO, I went back to the drawing board
and re-wrote the pattern generating code the right way. I used a few smart queries to create time buckets to normalize the
collected sky colors. Using this method, the data would line up better in rows and columns. Then using Perl and
ImageMagick, I generate a PNG pixel by pixel. The end result is a much smaller image and a much quicker load.
12.09.2009 - 19:08
The sky pattern is finally starting to take shape. As the seasons change,
we should start to see a lengthening of the day. It's interesting to note
that the "night" pattern of the San Francisco webcam is shifted due to the
time difference. Perhaps I can collect images from each time zone and compare
the day/night cycles. Or even better, find a camera in a different hemisphere!
11.18.2009 - 21:55
Ugh. Found a problem with the main Perl program that collects the color data. Basically it would cycle through all of
the sources to be updated and go through the sequence of downloading the image, cropping, and then selecting the max and min
color code. Unfortunately, I made a huge programming error: I forgot to clear my variables. Most importantly, I forgot to
clear my counting hash. So naturally, the same color was showing up in subsequent sources. What got me is that sometimes it
was different. That's because a particular color out-counted the previous sources max color.
Long story short, I think I now have it fixed. Colors should be different across sources and everything is right in the
world. Except for the version of MySQL that I'm using doesn't support datediff. Getting along without datediff is a royal
Copyright (C) 2009-2011 - Sean Keplinger
Images are copyright their prospective owners.