Skip to main content
100%

Live Weather Data

✓ Published0🌍 Public
CCurran Kelleher
Last edited Jan 17, 2017
Created on Jan 17, 2017

This example displays the current temperature in London, updating every five minutes. It fetches live weather data from the OpenWeatherMap API using `d3.json` and presents the temperature in both Celsius and Fahrenheit. The page shows a large text label for each unit, with values formatted using `d3.format`. A `setInterval` timer triggers the API request repeatedly, replacing the displayed numbers with the latest measurements. The visualization relies on D3 v4 for data loading and DOM selection.

AI-generated description

This example shows how to fetch and display live weather data from OpenWeatherMap. Updates every 5 minutes.

If it's not working, probably you're looking at the HTTPS version, which blocks the HTTP request to the weather API. Try the non-HTTPS link: http://bl.ocks.org/curran/c7d740b2e91dda4f257d4174be506c42

Built with blockbuilder.org

mit Licensed

Similar vizzes