xxxxxxxxxx
// API = Application Programming Interface
var baseurl = 'https://api.openweathermap.org/data/2.5/weather';
var city = 'Honolulu, Hawaii, USA';
var appid = '7bbbb47522848e8b9c26ba35c226c734';
var units = 'imperial';
function preload() {
var URL = baseurl+'?q='+city+'&units='+units+'&appid='+appid;
weather = loadJSON(URL);
}
function setup() {
createCanvas(windowWidth, windowHeight);
noLoop();
background(100);
stroke(0);
fill(0);
textSize(90);
text(weather.name, 100, 100);
text(weather.main.temp + ' F', 100, 200);
text(weather.weather[0].description, 100, 300);
}
function draw() {
}