Built with blockbuilder.org
| <!DOCTYPE html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script> | |
| <style> | |
| </style> | |
| </head> | |
| <body> | |
| <div class="container"></div> | |
| <script> | |
| // Just grab your API key from http://data.planetos.com/account/settings/ | |
| var API_KEY = 'd7d0466b16e24b7084d0c97ea8343762'; | |
| d3.json('http://api.planetos.com/v1/datasets/noaa_ww3_global_1.25x1d/point?lon=-50.5&lat=49.5&apikey='+API_KEY, function(error, json){ | |
| console.log(json); | |
| var html = '<ul>'; | |
| json.entries.forEach(function(d, i){ | |
| d3.entries(d.data).forEach(function(dB, iB){ | |
| html += '<li>' + dB.key + ': ' + dB.value + '</li>'; | |
| }); | |
| }); | |
| html += '</ul>'; | |
| document.querySelector('.container').innerHTML = html | |
| }); | |
| </script> | |
| </body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment