Team:UT Dallas/Infographics
From 2012.igem.org
(Difference between revisions)
Line 9: | Line 9: | ||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js"></script> | <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js"></script> | ||
<script type='text/javascript' src='https://2012.igem.org/Team:UT_Dallas/script.js?action=raw&ctype=text/javascript'></script> | <script type='text/javascript' src='https://2012.igem.org/Team:UT_Dallas/script.js?action=raw&ctype=text/javascript'></script> | ||
- | + | <script type="text/javascript" src="http://www.google.com/jsapi"></script> | |
<script type="text/javascript"> | <script type="text/javascript"> | ||
- | + | google.load('visualization', '1', {packages: ['geochart']}); | |
- | function | + | function draw_map(year_num) |
- | + | ||
- | + | ||
{ | { | ||
- | + | document.getElementById('visualization').innerHTML='Loading . . .'; | |
- | + | var data=null; | |
- | + | var data_2012 = google.visualization.arrayToDataTable([['Country', 'Teams'],['Australia',1],['China',30],['India',4],['Indonesia',1],['Japan',12],['Korea',4],['Taiwan',4],['Congo',1],['Belgium',1],['Denmark',2],['France',4],['Germany',10],['Israel',1],['Italy',2],['Netherlands',7],['Norway',1],['Poland',1],['Scotland',2],['Slovenia',1],['Spain',3],['Sweden',2],['Switzerland',2],['Turkey',3],['United Kingdom',7],['Argentina',1],['Brazil',1],['Chile',1],['Colombia',1],['Costa Rica',1],['Panama',3],['Mexico',8],['United States',56],['Canada',11]]); | |
- | + | var data_2011 = google.visualization.arrayToDataTable([['Country', 'Teams'],['Australia',2],['China',21],['India',3],['Japan',9],['Korea',4],['Taiwan',2],['Belgium',2],['Denmark',3],['France',5],['Germany',5],['Italy',2],['Netherlands',4],['Norway',1],['Poland',1],['Scotland',3],['Spain',3],['Sweden',1],['Switzerland',1],['Turkey',4],['United Kingdom',5],['Brazil',1],['Colombia',1],['Panama',2],['Mexico',3],['United States',43],['Canada',10],['South Africa',1],['Hungary',1]]); | |
- | + | var data_2010 = google.visualization.arrayToDataTable([['Country', 'Teams'],['Australia',3],['China',11],['India',3],['Japan',9],['Korea',3],['Taiwan',2],['Belgium',1],['Denmark',2],['France',3],['Germany',8],['Italy',1],['Netherlands',2],['Poland',1],['Scotland',1],['Slovenia',1],['Spain',2],['Sweden',2],['Switzerland',2],['Turkey',2],['United Kingdom',8],['Panama',1],['Mexico',3],['United States',36],['Canada',7],['South Africa',1],['Hungary',1]]); | |
- | } | + | var data_2009 = google.visualization.arrayToDataTable([['Country', 'Teams'],['Australia',2],['China',9],['India',4],['Japan',6],['Korea',2],['Taiwan',2],['Belgium',2],['Denmark',2],['France',2],['Germany',4],['Italy',2],['Netherlands',2],['Poland',1],['Scotland',1],['Slovenia',1],['Spain',2],['Sweden',2],['Switzerland',1],['Turkey',1],['United Kingdom',8],['Brazil',1],['Colombia',2],['Mexico',2],['United States',30],['Canada',10],['Singapore',1]]); |
+ | var data_2008 = google.visualization.arrayToDataTable([['Country', 'Teams'],['Australia',1],['China',9],['India',1],['Japan',3],['Belgium',1],['France',2],['Germany',2],['Italy',2],['Netherlands',2],['Poland',1],['Scotland',1],['Slovenia',1],['Spain',1],['Switzerland',2],['Turkey',2],['United Kingdom',5],['Colombia',1],['Mexico',2],['United States',28],['Canada',10],['Singapore',1]]); | ||
+ | var data_2007 = google.visualization.arrayToDataTable([['Country', 'Teams'],['Australia',1],['China',5],['India',1],['Japan',2],['Italy',2],['Scotland',1],['Slovenia',1],['Turkey',1],['Colombia',1],['Mexico',1],['United States',25],['Canada',6]]); | ||
+ | var data_2006 = google.visualization.arrayToDataTable([['Country', 'Teams'],['India',1],['Japan',2],['Korea',1],['Germany',1],['Scotland',1],['Slovenia',1],['Switzerland',1],['Turkey',1],['United Kingdom',2],['Colombia',1],['Mexico',1],['United States',23],['Canada',3]]); | ||
+ | var data_2005 = google.visualization.arrayToDataTable([['Country', 'Teams'],['Switzerland',1],['United Kingdom',1],['United States',10],['Canada',1]]); | ||
+ | var data_2004 = google.visualization.arrayToDataTable([['Country', 'Teams'],['United States',5]]); | ||
+ | var options = { | ||
+ | colorAxis: {colors: ['green','yellow','red']}, | ||
+ | width: 1000, | ||
+ | height: 700 | ||
+ | }; | ||
+ | var geochart = new google.visualization.GeoChart(document.getElementById('visualization')); | ||
+ | if(year_num==2012) | ||
+ | data=data_2012; | ||
+ | else if(year_num==2011) | ||
+ | data=data_2011; | ||
+ | else if(year_num==2010) | ||
+ | data=data_2010; | ||
+ | else if(year_num==2009) | ||
+ | data=data_2009; | ||
+ | else if(year_num==2008) | ||
+ | data=data_2008; | ||
+ | else if(year_num==2007) | ||
+ | data=data_2007; | ||
+ | else if(year_num==2006) | ||
+ | data=data_2006; | ||
+ | else if(year_num==2005) | ||
+ | data=data_2005; | ||
+ | else if(year_num==2004) | ||
+ | data=data_2004; | ||
+ | geochart.draw(data,options); | ||
+ | } | ||
+ | //google.setOnLoadCallback(draw_2012); | ||
</script> | </script> | ||
<link href="https://2012.igem.org/Team:UT_Dallas/test/page.css?action=raw&ctype=text/css&purtryjryjytu=eryw" rel="stylesheet"> | <link href="https://2012.igem.org/Team:UT_Dallas/test/page.css?action=raw&ctype=text/css&purtryjryjytu=eryw" rel="stylesheet"> | ||
Line 32: | Line 62: | ||
This year, it has been X years since iGEM first started. We wanted to highlight some of the defining moments and show them to the rest of the iGEM world through these infographics! Enjoy! | This year, it has been X years since iGEM first started. We wanted to highlight some of the defining moments and show them to the rest of the iGEM world through these infographics! Enjoy! | ||
</div> | </div> | ||
- | + | <div id="visualization"></div> | |
- | < | + | <input type='button' value='2012' onClick="draw_map(2012)"> |
- | + | <input type='button' value='2011' onClick="draw_map(2011)"> | |
- | + | <input type='button' value='2010' onClick="draw_map(2010)"> | |
- | + | <input type='button' value='2009' onClick="draw_map(2009)"> | |
- | < | + | <input type='button' value='2008' onClick="draw_map(2008)"> |
- | + | <input type='button' value='2007' onClick="draw_map(2007)"> | |
- | + | <input type='button' value='2006' onClick="draw_map(2006)"> | |
- | + | <input type='button' value='2005' onClick="draw_map(2005)"> | |
- | + | <input type='button' value='2004' onClick="draw_map(2004)"> | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
</div> | </div> | ||
</html> | </html> |
Revision as of 23:09, 24 September 2012