Hi,
here my newest app, Budapest guide for personal use for my upcoming trip. I say for personal use as I’ve placed only the POIs I’m going to visit.
In the drawer you can find a translator tab, a currency conversion tab and a weather tab; the weather forecasts are in step of three hours. Next thing I’m going to do is to group the forecasts by day using the relations.
I love the weather forecast screen! What service do you use to get the data in? If you did that in Google Sheets, could you share how you did it here?
Also: you should visit the Hospital in the Rock.
Hey Mark, I use a script to pull the data from openweathermap, free plan allow to get 5 days forecast in step of three hours. I’ll send you the sheet in private msg as in the script there is my api key. In the script i have a function to calculate the time difference between the UTC time and Rome time and display the forecast in local time. I don’t use openweathermap icons because the icons are low quality.
Thanks for the suggestion.
Here is the script to get the data:
function myMeteo_Budapest() {
var location = ‘Budapest,hu’;
var apikey = ‘XXXXXXXXXXXXXX’; // Replace with your API key
var forecastWeatherUrl = ‘http://api.openweathermap.org/data/2.5/forecast?q=’ +
location + ‘&units=metric&lang=it&apikey=’ + apikey;
var response = UrlFetchApp.fetch(forecastWeatherUrl);
var json = response.getContentText();
var weatherData = JSON.parse(json);
//Logger.log(weatherData)
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(‘ImportApi’);
sheet.clear();
for (i=0; i<40; i++) {
var data_ora_prev = weatherData.list[i].dt_txt;
var meteo_icona = weatherData.list[i].weather[0].icon;
var meteo_descrizione = weatherData.list[i].weather[0].description;
var min_temp = weatherData.list[i].main.temp_min;
var max_temp = weatherData.list[i].main.temp_max;
var pressione = weatherData.list[i].main.pressure;
var umidita = weatherData.list[i].main.humidity;
var copertura = weatherData.list[i].clouds.all;
var dir_vento = weatherData.list[i].wind.deg;
var vel_vento = weatherData.list[i].wind.speed;
sheet.appendRow([data_ora_prev, meteo_icona, meteo_descrizione, min_temp, max_temp, pressione, umidita, copertura, dir_vento, vel_vento]);
}
var getTimeUrl = ‘http://api.timezonedb.com/v2.1/convert-time-zone?key=XMBBZ92QIVM0&format=json&from=UTC&to=Europe/Budapest’;
var resptime = UrlFetchApp.fetch(getTimeUrl);
var json = resptime.getContentText();
var time = JSON.parse(json);
var diff_orario = time.offset;
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(‘ImportApi’);
sheet.getLastRow();
sheet.appendRow([diff_orario]);
}
Very cool! Both the app and the script!
Great job