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.
poorvis885
weatherDashboard
🌤️ AI Weather Dashboard
An interactive AI-powered weather dashboard that provides real-time weather updates and fun, insightful weather descriptions using GPT-4o. 🚀 Features 🌍 Real-time Weather Data – Fetches temperature, wind speed, and direction.
🤖 AI Weather Insights – Generates creative weather descriptions.
🎨 Dynamic UI Themes – Refreshing color schemes for better aesthetics.
🔍 Location Search – Search for any city worldwide. 🛠️ Tech Stack Frontend: React 18, TailwindCSS
APIs: Open-Meteo, OpenAI GPT-4o
Hosting: ESM-based module imports
HTTP

ljus
weatherGPT
WeatherGPT Transformed multiple vals to a single project.
This val uses the script service in the project askSMHI .
HTTP

stevekrouse
umbrellaReminder
☔️ 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
Cron
charmaine
runGetWeather
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)
Cron