Skip to content
Snippets Groups Projects
Commit f69e1d5b authored by Tom Rushby's avatar Tom Rushby
Browse files

Update current weather message and icon saving.

parent cfca6ff8
Branches
Tags
No related merge requests found
......@@ -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."))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment