User Tools

Site Tools


visualization

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
visualization [2010/10/04 16:24]
jasonkarl Page name changed from my_special_new_page to visualization
visualization [2010/10/04 16:29]
jasonkarl
Line 1: Line 1:
-Lorem ipsum+===== Visualization Playground ===== 
 + 
 +Estimated average annual wind erosion by state - 1982-2002. 
 +<​HTML>​ 
 +    <script type="​text/​javascript"​ src="​http://​www.google.com/​jsapi"></​script>​ 
 +    <script type="​text/​javascript">​ 
 +      google.load('​visualization',​ '​1',​ {packages: ['​intensitymap'​]});​ 
 +    </​script>​ 
 +    <script type="​text/​javascript">​ 
 +       
 +       ​function drawVisualization() { 
 +         var query = new google.visualization.Query( 
 +           '​https://​spreadsheets.google.com/​tq?​range=B1:​H50&​gid=0&​key=0Au_mqRXpfMXwdEo1S1pjMDNWZnIyUDJKWmNoV1RBZ2c'​);​ 
 + 
 +   
 +  // Send the query with a callback function. 
 +  query.send(handleQueryResponse);​ 
 +
 + 
 +function handleQueryResponse(response) { 
 +  if (response.isError()) { 
 +    alert('​Error in query: ' + response.getMessage() + ' ' + response.getDetailedMessage());​ 
 +    return; 
 +  } 
 + 
 +  var options = {'​region':'​usa',​ '​colors':​['#​234567','#​234567','#​234567','#​234567','#​234567','#​234567'​]};​ 
 +   
 +  var data = response.getDataTable();​ 
 +  visualization = new google.visualization.IntensityMap(document.getElementById('​visualization'​));​ 
 +  visualization.draw(data,​ options); 
 +
 +       
 + 
 +      google.setOnLoadCallback(drawVisualization);​ 
 +    </​script>​ 
 + 
 +    <div id="​visualization"​ style="​width:​ 300px; height: 300px;"></​div>​ 
 +</​HTML>​\\ \\ 
 +<​sub>​Source:​ NRCS. 2007. Summary Report 2007 National Resources Inventory</​sub>​
visualization.txt · Last modified: 2012/02/22 13:27 (external edit)