Weather app with just Google Sheet Formula!

So I came across here various topics about a weather app, but all of the cases use the script magic or Zapier, I been searching the web and found a way to make it work fetching the info from a website using pure formulas .

I’m new to glide, so im reaching to you to make it work in any place, country, city.

Hope it help’s others in then community.

All you need its the city and the date and it will give you weather, temperature, comfort feels, wind and humidity.

=Query(IMPORTHTML(“https://www.timeanddate.com/weather/usa/“&If(Counta(split(A1,” “))=2,lower(split(A1,” “))&”-”&index(lower(split(A1," “)),1,2),lower(split(A1,” “)))&”/ext",“table”,1)," select Col3,Col4,Col5,Col6,Col8 where Col1=‘“&text(A2,“DDD”)&Char(10)&text(A2,“MMM”)&” “&INDEX(split(A2,”/“),1,2)&”’ ",2)

result:

3 Likes

Wow! Thank you for sharing this with us! :grinning:

1 Like

Just trying to create one for my self but this surpasses my knowledge. Looking forward to see how this works for your multiple feature apps! :wink:

2 Likes

Actually, this I could just paste in a column next to the addresses…You have given me ideas! :grinning: :upside_down_face:

2 Likes

the formula is missing a bracket

It work it for me. Let me check and edit!

I also received an error regarding number of arguments… Where do you put the location in the above formula?

check the picture, You put in A1 city and A2 the date, it works for me
but need it for other country!

the formula is in A3 as in the picture

Thanks. It’s giving me a parse error for some reason. I even put your City and Date in. I’ll look more at it later. Have some ideas!

I’ll make a public copy later to everyone check it out! Maybe somebody can make it work for what I’m aiming for!

1 Like

problem solved

As I’m reading if you need to fetch info from another city you need to first check in the webpage if it does exist and how the page get it. I’ll be working on this for today! Hopefully some body can give a hand! Cheers mate

found a way to fetch from a zip code, same rows in the sheet as in first way I shared!

=Query(IMPORTHTML(“https://www.timeanddate.com/weather/@z-us-“&A1&”/ext",“table”,1)," select Col3,Col4,Col5,Col6,Col8 where Col1='”&text(A2,“DDD”)&Char(10)&text(A2,“MMM”)&" “&INDEX(split(A2,”/“),1,2)&”’ ",2)

2 Likes

found a way to change from Celsius to Fahrenheit or kelvin!

at the end of the URL higligthed like this you need to change it for the unit you need

?fut=1 for C

?fut=2 for F

?fut=3 for kelvin

=Query(IMPORTHTML(“https://www.timeanddate.com/weather/canada/“&If(Counta(split(A1,” “))=2,lower(split(A1,” “))&”-”&index(lower(split(A1," “)),1,2),lower(split(A1,” “)))&”/ext ?fut=1 “,“table”,1),” select Col3,Col4,Col5,Col6,Col8 where Col1=‘“&text(A2,“DDD”)&Char(10)&text(A2,“MMM”)&” “&index(split(A2,”/“),1,2)&”’ ",2)

2 Likes

I tried your formula…couldn’t get it to work…Im sure I messed it up somewhere when I did the copy/paste…Im going to try it again later.

1 Like

I am still getting the PARSE error.

image

And this is the formula I put in.
=Query(IMPORTHTML(“https://www.timeanddate.com/weather/usa/"&If(Counta(split(A1," 2 “))=2,lower(split(A1,” “))&”-”&index(lower(split(A1," “)),1,2),lower(split(A1,” “)))&”/ext",“table”,1)," select Col3,Col4,Col5,Col6,Col8 where Col1=’"&text(A2,“DDD”)&Char(10)&text(A2,“MMM”)&" “&INDEX(split(A2,”/"),1,2)&"’ ",2)

Thoughts?

1 Like

Sorry!, here is the shared sheet to copy I will add the other examples 2

weather app shared - Google Sheets

2 Likes

Here its the shared sheet to see it in action!
errors fixed

1 Like

Thank you!!! :grinning:

Thank you for the share, I see you have solved the problem.

However I had so many problems using Google Sheet’s import functions whether it be HTML, Feed or XML. It can break down any time and the update time is slow as well, especially for feeds so I don’t use them anymore.

2 Likes