Back to APIs list

Weather API examples & templates

Use these vals as a playground to view and fork Weather API examples and templates on Val Town. Run any example below or find templates that can be used as a pre-built solution.
charmaine avatar
charmaine
runGetWeather
Cron
In the following example code, we are using getWeather from stevekrouse/getWeather . It uses the free wttr.in service to get weather data. Add these lines to your code Replace Brooklyn, NY with your location Click Run Now View the output in the val’s logs import { getWeather } from "https://esm.town/v/stevekrouse/getWeather"; let weather = await getWeather("Brooklyn, NY"); console.log(weather.current_condition[0].FeelsLikeF)
0
mattwd7 avatar
mattwd7
weatherBasedActivityAlerting
Cron
///////////////////////
0
stevekrouse avatar
stevekrouse
BIGweather
HTTP
Big Weather Display Displays the current day's weather information BIG so you can see it from far away. I LOVE this val. My girlfriend and I use it everyday. We have an old chromebook slate set up in the corner of our apartment, so we can get the daily weather at a glance without our phones. Currently it's hardcoded for: prospect heights, brooklyn charts of the temp and % change of precipitation Probably easiest for you to fork it and change it to suit your needs vs making it customizable
0
yasinarfaht avatar
yasinarfaht
weatherApp
HTTP
@jsxImportSource https://esm.sh/react@18.2.0
0
stevekrouse avatar
stevekrouse
getWeather
Script
Forked from sdan/getWeather
4
deepmojo avatar
deepmojo
evaltownWorker
HTTP
Forked from maxm/evaltownWorker
0
bhavana avatar
bhavana
weatherForecastDashboard
HTTP
@jsxImportSource https://esm.sh/react@18.2.0
0
stevekrouse avatar
stevekrouse
umbrellaReminder
Cron
☔️ Umbrella reminder if there's rain today Setup Fork this val 👉 https://val.town/v/stevekrouse.umbrellaReminder/fork Customize the location (line 8). You can supply any free-form description of a location. ⚠️ Only works for US-based locations (where weather.gov covers). How it works Geocodes an free-form description of a location to latitude and longitude – @stevekrouse.nominatimSearch Converts a latitude and longitude to weather.gov grid – @stevekrouse.weatherGovGrid Gets the hourly forecast for that grid Filters the forecast for periods that are today and >30% chance of rain If there are any, it formats them appropriately, and sends me an email
9
flafi87 avatar
flafi87
periodical_weather_telegram
Cron
An interactive, runnable TypeScript val by flafi87
0
stevekrouse avatar
stevekrouse
weatherGPT
Cron
4
escalona avatar
escalona
getWeather
Script
Forked from stevekrouse/getWeather
0
patrickjm avatar
patrickjm
simpleWeather
Script
An interactive, runnable TypeScript val by patrickjm
0
flafi87 avatar
flafi87
weather_forecast_in_the_morning
Cron
An interactive, runnable TypeScript val by flafi87
0
fehmi17 avatar
fehmi17
weatherAppTR
HTTP
@jsxImportSource https://esm.sh/react
0
Croniac avatar
Croniac
WundergroundStationDisplayV2
HTTP
Forked from Croniac/WundergroundStationDisplay
0
csshsh avatar
csshsh
weatherDescription
HTTP
An interactive, runnable TypeScript val by csshsh
0