The Chariman of Google
Monday, February 26th, 2007They must forget to google search “Chariman Schmidt”.
See also “Look up Chariman”.
This video about “googleTube” is fun too.
They must forget to google search “Chariman Schmidt”.
See also “Look up Chariman”.
This video about “googleTube” is fun too.
I have been a fan of the “treemap” algorithm to visualize data with tree-like structure . Finally, I decide to implement one last Friday noon. After a few hours, I had a basic Treemap class in python. When I was testing the class, I found the algorithm can generate some interesting artistic painting effect.
The following is a composition using the Gene Ontology. I guess this is one of the many ways to visualize the so-called Systems Biology. You can also click on the image to see some other randomly generated compositions.
Inspired by Newsmap, I tried to see if I can use the python Treemap class and some javascript to map Diggs to a treemap. So, I spent a few hours in the last weekend making this little toy — Diggs in A Box.
It is rather primitive now and I can think a long TODO list to improve it. Hopefully, I will get some time to improve its functionality and appearance eventually. If you have any suggestions, please leave a message and I hope you find such presentation of data interesting and useful.
Technorati Tags: data visualization, digg, treemap
This function in javascript returns the X and Y used to fetch google map tiles by giving the longitude and latitude.
function getXYfromLatLon(lat, lon, zoomLevel) {
var lon = 180.0 + lon;
var x = Math.floor( (lon / 360.0) * 131072 ); /* 2^17 = 131072 */
x >>= zoomLevel;
var lat = lat / 180.0 * 3.1415926
var y = Math.PI - 0.5 * Math.log((1+Math.sin(lat))/(1-Math.sin(lat)))
y = Math.floor( (y / 2 / Math.PI) * 131072 );
y >>= zoomLevel;
return new Array(x,y);
}
This function returns the string used to fetch the satellite image tiles by give the X and Y from the getXYfromLatLon().
function getImageTileStrFromXY(x, y, zoomLevel) {
var quarter2letter = new Array("q","r","t","s");
var rtnStr = "t"
for (i=16-zoomLevel; i>=0; i--) {
var quarter =
(x & (1 < < i)) >> i | ( ((y & (1 < < i)) >> i) < < 1 );
rtnStr += quarter2letter[quarter];
}
return rtnStr;
}
Simple usage:
<script language="javascript">
var lon = -122;
var lat = 37;
var zl =3;
var XY = getXYfromLatLon(lat, lon, zl);
document.getElementById('img1').src=
"http://mt0.google.com/mt?v=w2.61&x="+XY[0]+"&y="+XY[1]+"&zoom="+zl;
var tileStr = getImageTileStrFromXY(XY[0], XY[1], zl);
document.getElementById('img2').src=
"http://kh0.google.com/kh?&v=20&t="+tileStr;
</script>
Technorati Tags: google map
| Lat (-90 ~ 90): | |
| Lon (-180 ~ 180): | |
| Zoom (0-17): |
|
|
|
|
|
|
This is another google map hack. I will write some details about this in the furture. In the mean time, you can also check this out. If you are interested in my source code for this hack, you probably know how to get it anyway.
Technorati Tags: google map
|
|
|
|
|
|
Click the tiles to zoom in for one level.
Clike the “back” button to go back.
The URL to extract Google’s satellite image tiles has a very simple encoding. It is simply “http://kh0.google.com/kh?&v=14?t=t” where the argument followed by t= is a string composed with letters “q”,”r”,”t” and “s”. These letters indicate the quarter of the image tile from the last image. For example, the first quarter (north-east) of the root image uses “t=tr”. The second quarter uses “t=tq”, the third quarter uses “t=tt” and the forth quarter uses “t=ts”. To get the next zoom level, you can just append either “r”,”q”,”t” and “s” in the argument. The longer the string, the higher the zoom level. As an example, the URL for the tile that shows Mt. Rainer is “http://kh0.google.com/kh?&v=14&t=tqtrtsqtrqrs/.” It would be straight forward to write a program to get the tiles you need by specifying longitude and latitude. This would be handy to composed satellite image for a region you like and print it out.
Technorati Tags: google map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This entry is a “get-away” weekday skiing trip photo collection.
Please move mouse over the thumbnails to see the pictures.
I woke up early in the morning, and my daughter was still in asleep. After three hours and two hundred miles drive, I was on the slope again. I skipped the last ski season so I had seen any snow for two years. It was great to go skiing again. It was a weekday, so everything was nice. No crowds. No line to wait. I only wished the snow could be better. It is a dry winter here in North California. We do not get much snow this season yet. The snow was firm but some groomed trails was decent.
I stayed mostly on the groomed trails. I started about 9:50 am and had a few runs on blue trails to warm myself up. After my hamburger lunch, I tried a few black diamond run which would be a lot more fun if the snow was better.
The mountain was quite and beautiful. This trip was probably the first time I saw Lake Tahoe from Alpine Meadows. Previous few trips to Alpine Meadows were cloudy and windy, but the snow was really awesome. Yesterday was a different day. It was a nice sunny day and it was more like a spring day than a winter day although it was still in January.
Since it was a weekday, I did not have to wait inline for getting on a lift. I was just skiing down and getting on lift again and again with only a few short lunch and water breaks in between. At the end, my upper leg muscles started to cramp and it forced me to take some sport drink to continue. After that, I decided to stay just in blue runs to enjoy the mountains and the snow in a relax way.
On the way back, there was a traffic jam around Sacramento, so I stopped by a Frys to see what newest electronics toy in the market. Well, I did not find a lot of exciting stuffs there. Anyway, I got home by 8:20 pm and I felt that the life was nice again.
Technorati Tags: skiing