<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Saneef Ansari, Designer &amp; Photographer</title>
	
	<link>http://saneef.com</link>
	<description>Information. Interfaces. Photography</description>
	<lastBuildDate>Fri, 27 Aug 2010 19:29:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Saneef" /><feedburner:info uri="saneef" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Zen</title>
		<link>http://feedproxy.google.com/~r/Saneef/~3/DVvL_KVvqfA/</link>
		<comments>http://saneef.com/zen/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 20:10:10 +0000</pubDate>
		<dc:creator>Saneef</dc:creator>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[black and white]]></category>
		<category><![CDATA[materials]]></category>
		<category><![CDATA[photograph]]></category>
		<category><![CDATA[stones]]></category>
		<category><![CDATA[zen]]></category>

		<guid isPermaLink="false">http://saneef.com/?p=150</guid>
		<description><![CDATA[Canon EOS Kiss Digital X &#124; Sigma 70-300mm F4-5.6 &#124; 1/80 s &#124; f7.1 &#124; ISO100]]></description>
			<content:encoded><![CDATA[<p><img src="http://saneef.com/wp-content/uploads/2010/08/20100225-IMG_6042-Edit.jpg" alt="Zen - Stones" title="Zen" width="790" height="592" class="size-full wp-image-109" /></p>
<p>Canon EOS Kiss Digital X | Sigma 70-300mm F4-5.6  | 1/80 s | f7.1 | ISO100</p>
<img src="http://feeds.feedburner.com/~r/Saneef/~4/DVvL_KVvqfA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://saneef.com/zen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://saneef.com/zen/</feedburner:origLink></item>
		<item>
		<title>“Conversations” – Sourcecode</title>
		<link>http://feedproxy.google.com/~r/Saneef/~3/fGKuYj3kYLM/</link>
		<comments>http://saneef.com/conversations-sourcecode/#comments</comments>
		<pubDate>Sun, 08 Aug 2010 13:31:27 +0000</pubDate>
		<dc:creator>Saneef</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://saneef.com/?p=135</guid>
		<description><![CDATA[For the recent, IxDA Bengaluru Student Chapter Launch the collateral and signage are designed by friend Jonathan, triangulated graphs as design elements depicting &#8211; &#8216;Catalyst for conversations&#8217;. I made the animation of the triangulated graph using Processing, for projection during the event. I&#8217;m releasing the the source-code here (Conversations-100808a.zip) under MIT License. The code is [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-137" title="Conversations" src="http://saneef.com/wp-content/uploads/2010/08/conversations_630x157_front.jpg" alt="" width="630" height="157" /></p>
<p>For the recent, <a title="IxDA Launch" href="http://hcibangalore.pbworks.com/IxDA-Bengaluru-Student-Chapter-Launch">IxDA Bengaluru Student Chapter Launch</a> the collateral and signage are designed by friend <a href="http://jonathandmello.com">Jonathan</a>, triangulated graphs as design elements depicting &#8211; &#8216;Catalyst for conversations&#8217;. I made the animation of the triangulated graph using <a href="http://processing.org">Processing</a>, for projection during the event. I&#8217;m releasing the the source-code here (<a href="http://saneef.com/wp-content/uploads/2010/08/Conversations-100808a.zip">Conversations-100808a.zip</a>) under MIT License.</p>
<p>The code is based on Processing <a href="http://processing.org/reference/PVector.html">PVector</a> Class. People who are starting with Processing, this would be helpful.</p>
<img src="http://feeds.feedburner.com/~r/Saneef/~4/fGKuYj3kYLM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://saneef.com/conversations-sourcecode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://saneef.com/conversations-sourcecode/</feedburner:origLink></item>
		<item>
		<title>Abandoned Stone Quarry</title>
		<link>http://feedproxy.google.com/~r/Saneef/~3/JxTt7gwQFyM/</link>
		<comments>http://saneef.com/abandoned-stone-quarry/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 17:31:57 +0000</pubDate>
		<dc:creator>Saneef</dc:creator>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[hdr]]></category>
		<category><![CDATA[photograph]]></category>

		<guid isPermaLink="false">http://saneef.com/?p=122</guid>
		<description><![CDATA[Canon EOS Kiss Digital X &#124; Canon EF-S 18-55mm f/3.5-5.6 USM &#124; HDR M S Palya Stone Quarry, Vidyaranyapura, Bangalore]]></description>
			<content:encoded><![CDATA[<p><img src="http://saneef.com/wp-content/uploads/2010/07/IMG_8043_4_2_tonemapped-2.jpg" alt="" title="Abandoned Quarry 1" width="790" height="527" class="size-full wp-image-109" /><img src="http://saneef.com/wp-content/uploads/2010/07/IMG_8012_3_1_tonemapped.jpg" alt="" title="Abandoned Quarry 2" width="790" height="527" class="size-full wp-image-109" /><img src="http://saneef.com/wp-content/uploads/2010/07/IMG_8015_6_4_tonemapped.jpg" alt="" title="Abandoned Quarry 3" width="790" height="527" class="size-full wp-image-109" /></p>
<p>Canon EOS Kiss Digital X | Canon EF-S 18-55mm f/3.5-5.6 USM  | HDR</p>
<p>M S Palya Stone Quarry, Vidyaranyapura, Bangalore</p>
<img src="http://feeds.feedburner.com/~r/Saneef/~4/JxTt7gwQFyM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://saneef.com/abandoned-stone-quarry/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://saneef.com/abandoned-stone-quarry/</feedburner:origLink></item>
		<item>
		<title>Daikanransha</title>
		<link>http://feedproxy.google.com/~r/Saneef/~3/SbH4QxcGndU/</link>
		<comments>http://saneef.com/daikanransha/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 13:05:14 +0000</pubDate>
		<dc:creator>Saneef</dc:creator>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[photograph]]></category>
		<category><![CDATA[split toning]]></category>

		<guid isPermaLink="false">http://saneef.com/?p=116</guid>
		<description><![CDATA[Canon EOS Kiss Digital X &#124; Canon EF-S 18-55mm f/3.5-5.6 USM &#124; 1/40 s &#124; f3.5 &#124; ISO400 Palette Town in Odaiba, Japan.]]></description>
			<content:encoded><![CDATA[<p><img src="http://saneef.com/wp-content/uploads/2010/06/20070901-_MG_3545.jpg" alt="" title="Daikanransha" width="790" height="527" class="size-full wp-image-109" /></p>
<p>Canon EOS Kiss Digital X | Canon EF-S 18-55mm f/3.5-5.6 USM  | 1/40 s | f3.5 | ISO400</p>
<p>Palette Town in Odaiba, Japan.</p>
<img src="http://feeds.feedburner.com/~r/Saneef/~4/SbH4QxcGndU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://saneef.com/daikanransha/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://saneef.com/daikanransha/</feedburner:origLink></item>
		<item>
		<title>New Dwellers</title>
		<link>http://feedproxy.google.com/~r/Saneef/~3/_5pe0ei6XZw/</link>
		<comments>http://saneef.com/new-dwellers/#comments</comments>
		<pubDate>Tue, 11 May 2010 19:26:39 +0000</pubDate>
		<dc:creator>Saneef</dc:creator>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[black and white]]></category>
		<category><![CDATA[photograph]]></category>

		<guid isPermaLink="false">http://saneef.com/?p=107</guid>
		<description><![CDATA[Canon EOS Kiss Digital X &#124; Canon EF-S 18-55mm f/3.5-5.6 USM &#124; 1/50 s &#124; f10 &#124; ISO200]]></description>
			<content:encoded><![CDATA[<p><img src="http://saneef.com/wp-content/uploads/2010/05/20100411-IMG_7135-Edit.jpg" alt="" title="New Dwellers" width="790" height="527" class="size-full wp-image-109" /></p>
<p>Canon EOS Kiss Digital X | Canon EF-S 18-55mm f/3.5-5.6 USM  | 1/50 s | f10 | ISO200</p>
<img src="http://feeds.feedburner.com/~r/Saneef/~4/_5pe0ei6XZw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://saneef.com/new-dwellers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://saneef.com/new-dwellers/</feedburner:origLink></item>
		<item>
		<title>Oval Maidan</title>
		<link>http://feedproxy.google.com/~r/Saneef/~3/LL9g-viwuuo/</link>
		<comments>http://saneef.com/oval-maidan/#comments</comments>
		<pubDate>Wed, 05 May 2010 13:48:11 +0000</pubDate>
		<dc:creator>Saneef</dc:creator>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[photograph]]></category>

		<guid isPermaLink="false">http://saneef.com/?p=84</guid>
		<description><![CDATA[Canon EOS Kiss Digital X &#124; Canon EF 50mm f/1.8 II &#124; 1/250 s &#124; f13 &#124; ISO100]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-86" title="20100321-IMG_6687" src="http://saneef.com/wp-content/uploads/2010/05/20100321-IMG_6687.jpg" alt="" width="790" height="527" /></p>
<p>Canon EOS Kiss Digital X | Canon EF 50mm f/1.8 II | 1/250 s | f13 | ISO100</p>
<img src="http://feeds.feedburner.com/~r/Saneef/~4/LL9g-viwuuo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://saneef.com/oval-maidan/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://saneef.com/oval-maidan/</feedburner:origLink></item>
		<item>
		<title>Chaos</title>
		<link>http://feedproxy.google.com/~r/Saneef/~3/1KJotmNO3Ug/</link>
		<comments>http://saneef.com/chaos/#comments</comments>
		<pubDate>Wed, 05 May 2010 13:44:01 +0000</pubDate>
		<dc:creator>Saneef</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Typography]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[photograph]]></category>

		<guid isPermaLink="false">http://saneef.com/?p=90</guid>
		<description><![CDATA[20&#8243; x 10&#8243; graphic composition as part our Graphic Design course. The composition started with making ink impressions using a nylon net. Then the impressions were scanned and interesting forms where selected later enlarged. The form on the right was made from the parts of the those forms. Finally the form together with the typographic [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://saneef.com/wp-content/uploads/2010/05/chaos_1024px.png" rel="lightbox[90]"><img class="wp-image-91" title="CHAOS 20&quot; x 10&quot;" src="http://saneef.com/wp-content/uploads/2010/05/chaos_790px.png" alt="" width="790" height="395" /></a></p>
<p>20&#8243; x 10&#8243; graphic composition as part our Graphic Design course. The composition started with making ink impressions using a nylon net. Then the impressions were scanned and interesting forms where selected later enlarged. The form on the right was made from the parts of the those forms. Finally the form together with the typographic grid laid out.</p>
<img src="http://feeds.feedburner.com/~r/Saneef/~4/1KJotmNO3Ug" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://saneef.com/chaos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://saneef.com/chaos/</feedburner:origLink></item>
		<item>
		<title>Old space</title>
		<link>http://feedproxy.google.com/~r/Saneef/~3/lU_cJ7_x7PE/</link>
		<comments>http://saneef.com/old-space/#comments</comments>
		<pubDate>Wed, 05 May 2010 13:33:55 +0000</pubDate>
		<dc:creator>Saneef</dc:creator>
				<category><![CDATA[Photography]]></category>

		<guid isPermaLink="false">http://saneef.com/?p=81</guid>
		<description><![CDATA[Previously I had posted my photographs on my photoblog named Phoogler. I&#8217;ve decided to wrap it up and to post all my works here at Saneef.com. From now on you can check this space for my photographs.]]></description>
			<content:encoded><![CDATA[<p>Previously I had posted my photographs on my photoblog named <a href="http://saneef.pixelring.net/phoogler">Phoogler</a>. I&#8217;ve decided to wrap it up and to post all my works here at Saneef.com. From now on you can check this space for my photographs.</p>
<img src="http://feeds.feedburner.com/~r/Saneef/~4/lU_cJ7_x7PE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://saneef.com/old-space/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://saneef.com/old-space/</feedburner:origLink></item>
		<item>
		<title>Visualization Tutorial: Number of living languages</title>
		<link>http://feedproxy.google.com/~r/Saneef/~3/nhq5LTethaI/</link>
		<comments>http://saneef.com/visualization-tutorial-number-of-living-languages/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 08:56:07 +0000</pubDate>
		<dc:creator>Saneef</dc:creator>
				<category><![CDATA[Visualization]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[interactive]]></category>
		<category><![CDATA[map]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://saneef.com/?p=34</guid>
		<description><![CDATA[This was my ‘Hello World’ program to data visualization. I started looking for some interesting data to visualize. After many days of lazy search, I decided start with small set of data. Finally locked on showing number of languages alive (Currently spoken) in each country. I’ll take you through the steps I followed. If you [...]]]></description>
			<content:encoded><![CDATA[<p>This was my ‘Hello World’ program to data visualization. I started looking for some interesting data to visualize. After many days of lazy search, I decided start with small set of data. Finally locked on showing number of languages alive (Currently spoken) in each country. I’ll take you through the steps I followed. <span id="more-34"></span>If you find something wrong in my steps, please give me suggestions to improve. </p>
<h2>Step 1: Data Collection</h2>
<p>Data. That&#8217;s free on net! Five minutes of search lead me to <a href="http://www.ethnologue.com/">Ethnologue</a>; where all of the world’s 6,909 known living languages are cataloged. I don&#8217;t need the whole data, only took the name of the country, ISO code for the country and count of the languages alive, and made into an Excel Sheet. You can download it from <a href='http://saneef.com/wp-content/uploads/2010/03/Country_Languages_List.xls'>here</a>. </p>
<h2>Step 2: Method for Visualization</h2>
<p>I googled for a easier way to represent this data. Went through Processing.js, Google Visualization APIs, Open source flash maps. I finally settled with Google Visualization API’s <a href="http://code.google.com/apis/visualization/documentation/gallery/geomap.html">Geomap</a>. Main reason, its is damn simple to visualize tabular data. </p>
<p>It&#8217;s a javascript API, so we can easily fed data by the help of a few lines of code.</p>
<h2>Step 3: Setting up the data as a &#8216;Data source&#8217; for the Google Visualization API</h2>
<p>As you can see in the <a href="http://code.google.com/apis/visualization/documentation/gallery/geomap.html#Example">example</a>, we can supply data using hardcoded values. But in my case there is lots of values, which I can&#8217;t hard code. So, I decided on passing the data to the API through JSON/XML. I exported the data sheet into as CSV file. Then imported CVS into a MySQL table (<a href="http://www.thejackol.com/2005/02/28/import-excelcsv-into-mysql/">How-to put CVS into MySQL</a>), where I can access using PHP to generate JSON or XML if required. </p>
<p>With this piece of PHP code I generated JSON from the table:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span>
<span style="color: #000088;">$username</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;database_user&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$password</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;database_password&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$database</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;database_name&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$link</span> <span style="color: #339933;">=</span>  <span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;database_host&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$username</span><span style="color: #339933;">,</span><span style="color: #000088;">$password</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$link</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Could not connect: '</span> <span style="color: #339933;">.</span> <span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #666666; font-style: italic;">//echo 'Connected successfully';</span>
&nbsp;
<span style="color: #339933;">@</span><span style="color: #990000;">mysql_select_db</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$database</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;Unable to select database&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$query</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT * FROM country_list&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$country_json</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data_item</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_fetch_array</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$result</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$country_json</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'country_name'</span> <span style="color: #339933;">=&gt;</span><span style="color: #000088;">$data_item</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'country'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'iso_code'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$data_item</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'iso_code'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'speaking'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$data_item</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'speaking'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'total'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$data_item</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'total'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
		<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> 
<span style="color: #666666; font-style: italic;">//print json_encode($country_json);</span>
&nbsp;
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-Type: text/javascript; charset=utf8'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$json</span><span style="color: #339933;">=</span> <span style="color: #0000ff;">'('</span><span style="color: #339933;">.</span><span style="color: #990000;">json_encode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$country_json</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">');'</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//must wrap in parens and end with semicolon</span>
<span style="color: #990000;">print_r</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'callback'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #000088;">$json</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//callback is prepended for json-p</span>
&nbsp;
<span style="color: #990000;">mysql_close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>The generated JSON can be seen <a href="http://dev.saneef.com/infoarena/languages/country_list_json.php">here</a>.</p>
<h2>Step 4: Setting Up the Google Visualization API</h2>
<p>Here is the code for the HTML page.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;html<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;head<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;script</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'text/javascript'</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">'http://www.google.com/jsapi'</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;script</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'text/javascript'</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    google.load(&quot;jquery&quot;, &quot;1.4.2&quot;);
    google.load('visualization', '1', {'packages': ['geomap']});
&nbsp;
    google.setOnLoadCallback(init_map);
&nbsp;
    function init_map(){
      $.ajax({
        url: 'country_list_json.php',
        success: drawMap
      });      
    }
&nbsp;
    function drawMap(incomingdata) {
      json_data = eval(incomingdata);
      var data = new google.visualization.DataTable();
&nbsp;
      data.addRows(json_data.length);
      data.addColumn('string', 'Country');
      data.addColumn('number', 'Number of Languages');
      data.addColumn('string','HOVER', 'Details');
      for(i=0;i<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;json_data.length</span>;i++<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></span>
<span style="color: #009900;">        data.setValue<span style="color: #66cc66;">&#40;</span>i, 0, json_data<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'iso_code'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #009900;">        data.setValue<span style="color: #66cc66;">&#40;</span>i, 1, parseInt<span style="color: #66cc66;">&#40;</span>json_data<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'speaking'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #009900;">        data.setValue<span style="color: #66cc66;">&#40;</span>i, 2, json_data<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'country_name'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #009900;">      <span style="color: #66cc66;">&#125;</span></span>
&nbsp;
&nbsp;
<span style="color: #009900;">      var options = <span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">&#125;</span>;</span>
<span style="color: #009900;">      options<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'dataMode'</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">'regions'</span>;</span>
<span style="color: #009900;">      //options<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'width'</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">'605px'</span>;</span>
<span style="color: #009900;">      //options<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'height'</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">'362px'</span>;</span>
<span style="color: #009900;">      options<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'colors'</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #66cc66;">&#91;</span>0xffe4da,0xcd3700<span style="color: #66cc66;">&#93;</span>;</span>
&nbsp;
<span style="color: #009900;">      var container = document.getElementById<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'map_canvas'</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #009900;">      var geomap = new google.visualization.GeoMap<span style="color: #66cc66;">&#40;</span>container<span style="color: #66cc66;">&#41;</span>;</span>
&nbsp;
<span style="color: #009900;">			google.visualization.events.addListener<span style="color: #66cc66;">&#40;</span></span>
<span style="color: #009900;">	      geomap, <span style="color: #ff0000;">'regionClick'</span>, function<span style="color: #66cc66;">&#40;</span>e<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #009900;">	      //alert<span style="color: #66cc66;">&#40;</span>e<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'region'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #009900;">	      window.open <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;http://www.ethnologue.com/show_country.asp?name=&quot;</span>+e<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'region'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>; </span>
<span style="color: #009900;">	    <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>; </span>
&nbsp;
<span style="color: #009900;">      geomap.draw<span style="color: #66cc66;">&#40;</span>data, options<span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #009900;">  <span style="color: #66cc66;">&#125;</span>;</span>
<span style="color: #009900;">  <span style="color: #000000; font-weight: bold;">&lt;/script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/head<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">'map_canvas'</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/html<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>Here, I uses jQuery AJAX [ $.ajax() ] to get the JSON and fed one by one to Data Table of Geomap API [ data.setValue() ]. Once the values are loaded, call the draw function [ geomap.draw() ] . Tada! Here we have an density map of the world based on number of living languages in each country; plus hovering over country gives the number of languages in that country and when clicked will takes us to the country page in Ethnologue.com.</p>
<p><iframe width="610" height="380" src="http://dev.saneef.com/infoarena/languages/index.htm"></p>
<p>Your browser doesn&#8217;t suppor iframes.</p>
<p></iframe></p>
<p><strong>Data Source:</strong> Lewis, M. Paul (ed.), 2009. Ethnologue: Languages of the World, Sixteenth edition. Dallas, Tex.: SIL International. Online version: <a href="http://www.ethnologue.com/">http://www.ethnologue.com/</a>.</p>
<img src="http://feeds.feedburner.com/~r/Saneef/~4/nhq5LTethaI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://saneef.com/visualization-tutorial-number-of-living-languages/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://saneef.com/visualization-tutorial-number-of-living-languages/</feedburner:origLink></item>
		<item>
		<title>Comparison of Various Design Prototyping Methods</title>
		<link>http://feedproxy.google.com/~r/Saneef/~3/gh8vtaKVea4/</link>
		<comments>http://saneef.com/comparison-of-various-design-prototyping-methods/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 12:38:58 +0000</pubDate>
		<dc:creator>Saneef</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Prototyping]]></category>
		<category><![CDATA[Visualization]]></category>
		<category><![CDATA[methods]]></category>

		<guid isPermaLink="false">http://saneef.com/?p=18</guid>
		<description><![CDATA[Here, I am trying to compare the various prototyping methods based on their &#8216;Interactivity / Testability&#8217; vs. &#8216;Communication of an Idea&#8217;. By &#8216;Testability&#8217; I mean, how effectively that prototype can be tested with the users. and by &#8216;Interactivity&#8217;, the extent to which a prototype can relate to the final product in the interaction. With the [...]]]></description>
			<content:encoded><![CDATA[<p>Here, I am trying to compare the various prototyping methods based on their &#8216;Interactivity / Testability&#8217; vs. &#8216;Communication of an Idea&#8217;.<span id="more-18"></span></p>
<div id="attachment_23" class="wp-caption aligncenter" style="width: 310px"><a href="http://saneef.com/wp-content/uploads/2009/12/Prototyping_Comparison.jpg" rel="lightbox[18]"><img class="size-medium wp-image-23" title="Comparison of Various Design Prototyping Methods" src="http://saneef.com/wp-content/uploads/2009/12/Prototyping_Comparison-300x228.jpg" alt="Sketches, Wireframes, Static Mockups, Paper Prototypes, Video Prototyping, Flash/Sliverlight Interactive Prototype" width="300" height="228" /></a><p class="wp-caption-text">Comparison of Various Design Prototyping Methods - Interactivity/Testability Vs. Communication of an Idea</p></div>
<p>By &#8216;Testability&#8217; I mean, how effectively that prototype can be tested with the users. and by &#8216;Interactivity&#8217;, the extent to which a prototype can relate to the final product in the interaction.</p>
<p>With the &#8216;Communication of an Idea&#8217;, I mean &#8216;How precisely an idea can be communicated?&#8217;.</p>
<p>Based on these factors, we can choose which prototype can be used for pitching or can be used for usability testing etc.</p>
<img src="http://feeds.feedburner.com/~r/Saneef/~4/gh8vtaKVea4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://saneef.com/comparison-of-various-design-prototyping-methods/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://saneef.com/comparison-of-various-design-prototyping-methods/</feedburner:origLink></item>
	</channel>
</rss>
