Saturday, August 26, 2006

Drinking Coors makes you Drunk





DenverPost.com - Coors takes lesser hit on drunk charge

Pete Coors provides proof that even Coors beer makes you drunk. In what has to be a proud moment for all the marketing execs at Coors he plead guilty to driving while impaired.

Sunday, July 30, 2006

Stop-motion animation



What a fun experiement! I actually read about this in my kids "National Geographic Kids" magazine when the "Wallace & Grommit" movie came out last year. You use your digital camera to take multiple stills and then piece them together in iMovie to make a stop-motion animation. The way you used to draw the cartoons in the corner of a pad of paper and then flip through it. DIY click here.

Of course the kids had to add their little bit at the end. And they provided added vocals on the improvised soundtrack! :)

Tuesday, July 25, 2006

Changes at the ballpark

I have not been to the ballpark in probably over 2 years and I noticed some things while I was at the game last night. Besides the fact that the Cards lost in an impressive pitching performance by Jeff Francis...I noticed
  • The men's room is labeled "Hombres" in addition to "Men". I'm not a strict "English-only" American, but does the men's room with it's universal "man" symbol really need to be bi-lingual?
  • The men's room is equiped with syringe disposal. I presume for the growing American population suffering from diabetes and that will have to administer insulin at the ballgame.
So we are left with the anecdotal facts that there are more Spanish-speaking, and diabetic Americans...at least at the ballpark.

Thursday, July 06, 2006

Roots of our human family tree are remarkably shallow

Casa Grande Valley Newspapers Inc.: "Roots of our human family tree are remarkably shallow"

Interesting article on how we are all cousins...really.

Monday, June 26, 2006

Tetons/Yellowstone Trip


Teton range
Originally uploaded by ziebold.

Pics from our trip to Grand Tetons and Yellowstone NP are in. Click here.

Tetons/Yellowstone Videos

Tried out the new video feature on the camera in Grand Tetons and Yellowstone NPs.

Tuesday, May 23, 2006

Wolves in RMNP

One of the alternatives mentioned in the new Rocky Mountain National Park "Elk and Vegetation Plan" includes re-introducing wolves (2 pairs, followed by 14 more over 20 years) to help control the elk population in the park. The wolf and elk are a predator-prey pair in nature. When one is missing, nature gets out of balance. In RMNP, with no wolves, the elk have multiplied to an unhealthy level. Too many elk eat too much vegetation (which in turn is habitat for other animals that must then leave the park) and spread disease (elk in the park have contracted and are spreading chronic wasting disease). I spoke with a RMNP ranger a while back and he gave this explanation and pointed out the counter-example of the cougar and deer predator-prey pair. Cougar are still prevalent in the park and thus deer numbers have been kept in check.

The success of the Yellowstone Wolf Restoration will hopefully lead to RMNP choosing the wolf alternative again here.

Wednesday, May 10, 2006

The Bike Man

This NYT piece caught my eye, and glad it did. Had never heard/read the story of "the Bike Man". 66-year-old Heinz Stücke has been travelling the world by bike since 1962. He's travelled an estimated 335,000 miles across 211 countries and territories. His travelogue is posted here.

"To travel is to learn something about one another, to meet people, to respect them and better still to make friends so that in the future we may live together in peace."

Friday, April 28, 2006

Speeding Up GPolyline Loads

The GPolyline object from Google Maps API is very nice. You feed it an array of GPoints and it creates a line connecting those points. It creates an image overlay of the line on a Google server and sends it back to your map. Or if you're using IE, it will use the VML in IE to draw the line. You can tell it what color, width and opacity to set for the line.

I loaded the shapefile for the Superior trails and found that there were 475 lines with 5,772 data points. This was a pretty incredible load on the application. It takes a long time for a browser to load that much data on a page. And Google has to generate all those line images and send them back for you. So, I was trying to figure out a way to speed up the loading of the polylines. I read from some other sources that cutting down on the number of data points from the shapefile would help. But, I felt that with the hiking trails, I didn't want to lose any detail by leaving out data. Then I wondered if I couldn't use asynchronous requests (AJAX). If I could make each request for a line asynchronously, then it wouldn't seem like the application had died when you added the trails to the map. It worked really great. I built a little PHP script to be called asynchronously for each line (475 times). It would then query the database for the points for that line. It still takes a while to process that many requests, but the map does not block and wait while it's off fetching the lines.

As before, you can see it here: http://gregz.is-a-geek.net

Tuesday, April 25, 2006

Shapefile Coordinate Systems and Google Maps

While I worked for the town parks and rec. committee, I met the GIS consultant who did the town's mapping. I realized he could give me an ArcView shapfile of the trails and bike routes to put on my Google Maps mashup. I used shp2text which is a handy utility to convert shapfiles into either xml, gpx, or csv that I could then load into MySQL.

Problem. Once converted, I could tell the data points for the lines were not right. I knew what the long/lat coordinates were for points in the town and none of these matched from the shapefile dump. Looking back at my email from the GIS guy, he said the shapefile was "coordinate base is Colorado State Plane, Central Zone, NAD1983, Feet" Googling around for info on coordinate systems pointed out that of course the ArcView export was CO state. The Google Maps API expects WGS84 longitude/latitude coordinates.

Lucky for me my friend could easily produce a new shapefile export with the WGS84 coordinates. You can see an example of the GPolyline from the shapefile by clicking on "Show Bike Routes" on the map.

Friday, April 21, 2006

Hacking Google Maps Geocoding

Geocoding - the process of converting a street address to longitude/latitude. Necessary because the Google Maps API expects longitude/latitude numbers based on the WGS 84. And in order for your points to resolve correctly on the map you are using (Google/Navteq in my case), you would hope to have geocoding from that same source. And as we know Google does not offer this service.

I'm sure Navteq is holding Google to some agreement not to provide this service with their APIs. Think of it. Navteq's business is providing this data. They spend lots money with their high-tech cruiser vans traveling every road to collect the data. They charge Google big bucks for it. They don't want Google giving it away for free.

So what are your options since Google offers no geocoding service?

US Census TIGER data

You can use the geocoder.us free web service that has loaded this data for the US. I loaded the data for my county into MySQL. Hey, it's for a database course, right? So why not load the data and play with it. But what I found was the data showed a number of inaccuracies and there was quite a bit of missing data. It didn't map well onto Google.

Yahoo! Maps REST API

Yahoo! offers a REST API for gecoding. It's easy to use and open. My friend that works at Yahoo! was eager for me to use it. :) But similar problem. It works best when placing points on a Yahoo! map, not a Google Map. The points end up being off just enough.

Hack Google

Not a good idea for a commercial app (I'm sure Google might complain), but for my grad school project, I thought it might be worth exploring. And sure enough there is various scripts out there on doing just that. If you call a url like http://maps.google.com/maps?q=[your address here]&output=js (note the output=js at the end), Google returns a Javascript function with the longitude/latitude that you are looking for inside. However, just to prove that this is not an ideal solution, Google has changed the format of this output so that any of the previous hacks would no longer work. It's not a public API afterall! :) My script is shown below.




<html>
<head>
    <title>Google Geocode</title>
</head>

<body>
<h2>Google Geocode</h2>
<form name="mainform" action="">" method="GET">
    <b>Address:</b> <input type="text" size="40" name="address" value="">">
    <input type="submit" name="geo" value="Google Geocode">
</form>

<hr />
<b>Geo-location:</b>
<ul>
<?php
if (array_key_exists('geo', $_REQUEST)) {
    $result = get_long_lat($_REQUEST['address']);
    print_r("<li>Longitude: ".$result["longitude"]);
    print_r("<li>Latitude: ".$result["latitude"]);
}
?>
</ul>
</body>
</html>

<?php

function get_long_lat($q) {
  $q = urlencode($q);
  $gm = fopen('http://maps.google.com/maps?q=' . str_replace('','+',$q) . '&output=js','r');
  $tmp = stream_get_contents($gm);
  fclose($gm);
  $x = preg_replace('/.*\{center: \{lat: ([^,]*),lng: ([^}]*).*/', "|$1|$2|", trim($tmp));
  list($dmy,$lat_value, $lng_value) = explode("|",$x );
  return(array('longitude'=>$lng_value, 'latitude'=>$lat_value));

}
?>


My Superior trails map project includes an address field that uses this code to geocode the provided address and insert a marker on the map.

Thanks to Dan Moore for his insights and feedback on geocoding options.

Tuesday, April 18, 2006

Superior Google Maps Mashup

I am wrapping up a semester project for my graduate database course. The assignment was to build a dynamic website driven by a backend database. I chose to build a Google Maps mashup for my town (Superior, CO). Overlaying data about parks, trails, bike routes onto a Google Map.

I got the idea from Chicago Bike Map mashup. I'm an avid cyclist and I thought something like this would be cool for my local area. And I volunteered for the town on parks, recreation, and trails. I got to know the GIS consultant for the town and realized he would be able to provide the data I needed to overlay on Google Maps.

So I'll be posting nerdy updates here on things I've done and learned. Once I have the app hosted somewhere more permanent (currently on iBook laptop), I'll put up a pointer to it.

Update: I've got this hosted now. Go to, http://gregz.is-a-geek.net/

Monday, April 10, 2006

It Was a Moth!

Since my kids have been old enough to ask, they have wondered "Daddy, what kind of bugs do you have in your computer? Are they spiders! Or beetles! Tee Hee!" :)

Leave it to a thorough entry in the Wikipedia to answer the question. While the term bug has been around since engineers built things (Edison used the term as long ago as 1878), The first computer bug is popularly attributed to a 1947 Relay Calculator being tested at Harvard. You can see the actual bug at the Smithsonian. Here is a picture:So, the answer is "It was a moth!" that actually got stuck in the relay.

Friday, April 07, 2006

Solar Eclipse as Seen from Space

Check out this very cool photo of recent solar eclipse as captured from the International Space Station.

Saturday, March 18, 2006

Suspicious Inquires Into Climate Science

As previously mentioned, the Bush administration attempts to silence science is deeply troubling. Now U.S. Senator Jame Inhofe is making some suspicious inquiries into the research going on at the National Center for Atmospheric Research (NCAR, up the road in Boulder). Inhofe is chairman of the Senate Committee on Environment and Public Works and is asking for a review of NCAR's 40-year old contract from NSF. A review of this contract and NCAR's compete bid with NSF is reasonable, however there are numerous reasons for suspicion:
  • the Senate Committee on Commerce, Science & Transportation has jurisdiction for science inquiries, not Inhofe's committee.
  • he is asking for a list of all NCAR and UCAR staff and job titles, a list of NCAR and UCAR employees under contract with non-National Science Foundation agencies and organizations including salary information; and a list of research projects including funding for the past three years, among other information. This is information outside the scope of a compete review.
  • Inhofe in a quote from 2003, "With all of the hysteria, all of the fear, all of the phony science, could it be that manmade global warming is the greatest hoax ever perpetrated on the American people? It sure sounds like it." NCAR is one of the world's top climate-change research institutions.
Credit to Todd Neff from Daily Camera for reporting on this.

Friday, March 17, 2006

Bleaching coral reefs continues

Ghostly coral bleachings haunt the world's reefs
Rising sea temperatures (due to global warming) cause coral reef to expel the algae living in coral polyps which provide food and the vivid color that make them so beautiful. This limit is 84F. If ocean temperatures cool, coral can recover from a bleaching, however extended bleaching kills the coral. Bleaching occurred in 1998 and 2002 on the Great Barrier Reef. 2005 saw bleaching in the Caribbean and now the Keppel Islands.

Ignoring the obvious ecological disaster when coral is bleached or killed (coral ecosystems are often called "the nurseries of the seas"...anyone that saw Finding Nemo know this.), there is an obvious visual impact. Bleached coral is ugly. No one wants to scuba or snorkel through a bleached coral reef. This impacts tourism in all areas affected. Not to mention leaving us with a sad, empty feeling looking at these ghostly reefs.

Wednesday, March 08, 2006

Cardboard Box Entered into Toy Hall of Fame

First, I had no idea there was such a thing as the Toy Hall of Fame.

The National Toy Hall of Fame® was established in 1998 by A.C. Gilbert’s Discovery Village, a children’s museum in Salem, Oregon, to recognize toys that have achieved longevity and national significance in the world of play and imagination. The hall quickly outgrew its original home and in 2002, Strong Museum, which houses the world’s largest and most comprehensive collection of toys and dolls (more than 70,000 items), acquired it and moved it to its permanent home in Rochester, New York. The hall serves as an interpretive gateway to Strong Museum’s world-renowned collection and provides additional opportunities for both hands-on experiences and intergenerational memory sharing among guests.

Second, how cool!? The cardboard box has been inducted. Who doesn't remember making believe a cardboard box was a rocket, fort, castle, ship, house, whatever.

The Chinese invented cardboard in the 1600s. The English played off that invention and created the first commercial cardboard box in 1817. Pleated paper, an early form of corrugated board, initially served as lining for men’s hats. By the 1870s, corrugated cardboard cushioned delicate glassware during shipment. Stronger, lined corrugated cardboard soon followed. American Robert Gair produced the first really efficient cardboard box in 1879. His die-cut and scored box could be stored flat and then easily folded for use. Refinements followed, enabling cardboard cartons to substitute for labor-intensive, space-consuming, and weighty wooden boxes and crates. Today, cardboard boxes are widely appreciated for being strong, light, inexpensive, and recyclable.

Over the years, children sensed the possibilities inherent in cardboard boxes, recycling them into innumerable playthings. The strength, light weight, and easy availability that make cardboard boxes successful with industry have made them endlessly adaptable by children for creative play. Shoe boxes serve as ideal settings for scenes and dioramas. Small boxes take on alternate roles as dollhouse furniture. Wheels drawn on the side turn a box into a car. Really large boxes—from washers, stoves, big-screen TVs, or refrigerators—can offer children even greater opportunity for creativity. With nothing more than a little imagination, those boxes can be transformed into forts or houses, spaceships or submarines, castles or caves. Inside a big cardboard box, a child is transported to a world of his or her own, one where anything is possible.

Monday, March 06, 2006

Hummingbirds rock!

Small brains, long memories - the tiny hummingbird

Too cool. They migrate 2000 miles twice a year (Canada to Mexico, and back). And this new study shows they have really good memory about specific flowers and when they last visited the flower. Guess it's good news if you get a hummingbird to visit your yard. Chances are he/she will remember and return!

Thursday, March 02, 2006

Wind decision takes gusts

Aspen Ski Company (they runs Aspen's four mountains and two hotels) has made the biggest wind energy purchase ever in the ski industry. They are going 100% wind. They will need to draw wind power down the grid from Wyoming wind farms because this is such a big order. They follow on the heels of other big corps that are doing so, Whole Foods, Fedex Kinkos, Starbucks, Nike, Patagonia, and my favorite New Belgium Brewery (Fort Collins).

Sunday, February 26, 2006

Silencing Science

The Bush administration is rife with failures and travestries, but for scientists this has to be one of the most concerning. Not necessarily news, but this pair of interviews from NPR (NPR : Bush Science Push Fails to Transform Critics) clearly lays out the issues of how the adminstration has injected policy into issues that are clearly dictated by science. As Dr. Kennedy states, while this has been the case for quite some time in politics, "We have hit a new watermark."