diff --git a/howTo/apiOpenWeather.R b/howTo/apiOpenWeather.R index 200ea673b42c7b856e18eef719952ed6fc3707ae..cdca523c776adf7edb22973dafda1b1a241f0436 100644 --- a/howTo/apiOpenWeather.R +++ b/howTo/apiOpenWeather.R @@ -50,9 +50,10 @@ hourlyWeather <- unnest(hourlyWeather, cols = weather) # What to do with the data & presentation info # ..$pop = probablility of precipitation +message(paste0("The weather now is: ",currentWeather$weather$main, " and the temperature is ",round(currentWeather$temp)," degrees.")) + # Get icons - URLs -icon <- "10d" +icon <- currentWeather$weather$icon iconURL <- paste0("http://openweathermap.org/img/wn/",icon,"@2x.png") download.file(iconURL,paste0(here::here(),'/howTo/weatherAPI/icons/',icon,'.png'), mode = 'wb') -message(paste0("The weather now is: ",currentWeather$weather$main, " and the temperature is ",round(currentWeather$temp)," degrees."))