How to monitor your local weather with Grafana
Ever look at a wall of raw data and wonder, “How am I supposed to make sense of this?” That’s exactly where Grafana comes in, turning your data into beautiful dashboards with panels of graphs and other visualization types.
In this blog post, which is geared towards those new to Grafana, we’ll walk through an example that demonstrates how, exactly, Grafana can transform your data into eye-catching dashboards. To do this, we’ll build a free weather dashboard using Grafana Cloud. (Don’t have a Grafana Cloud account yet? No worries. We have a generous free-forever tier that you can sign up for today.)
A quick overview of Grafana and Grafana Cloud
Grafana is an open source solution that enables you to collect, correlate, and visualize your data, regardless of where that data is stored. This is because Grafana supports a vast number of data sources and accommodates a wide range of use cases — whether it’s monitoring server health or your kids completing their chores.
Introduced as an open source project in 2013, Grafana has grown to have a thriving community of more than 25 million users worldwide. (Note: if you want to learn more about the origins and evolution of Grafana, you can check out ‘The Story of Grafana’ documentary.)
Grafana Cloud, meanwhile, is our fully managed, cloud-hosted observability platform powered by the Grafana LGTM (Loki for logs, Grafana for visualization, Tempo for traces, Mimir for metrics) Stack. We’ll be using Grafana Cloud to create our free weather dashboard.
How to build a custom weather dashboard with Grafana Cloud
Now we’ll walk through an example of how to transform raw JSON data into a weather forecast dashboard using Grafana Cloud. It should take about 30 minutes to do, and when we’re finished, you’ll have a useful weather forecast dashboard that you can check right from your cell phone.
We’ll use a free public API from the U.S. National Weather Service that offers detailed forecast information for all areas in the United States. If you’re outside the U.S., you can use OpenMeteo (in Europe) or OpenWeatherMap (globally) to fetch your local weather data.
Here’s an example of the weather API response with data formatted as JSON:
It’s packed with useful info, but most people don’t want to read JSON to check the weather. This is where Grafana Cloud dashboards will come in.
We’ll also use the Infinity data source plugin for Grafana, which lets you query and visualize data from JSON, CSV, XML, and GraphQL endpoints (think of it as a universal plugin for ingesting data from almost anywhere). This plugin is how we will get the raw weather data that powers our dashboard.
Grafana Cloud will connect to the weather.gov API every time you load your dashboard, and render the results in a table.
Below you’ll find a brief summary of the steps to create your weather dashboard. For more detailed instructions, please check out this tutorial on GitHub.
- Sign up for Grafana Cloud: You can use any of our sign-in providers or sign up with an email address and password.
- Install the Infinity data source plugin.
- Import a preconfigured weather dashboard: Grafana Cloud allows you to import dashboards created by other users. If you can copy and paste some text, you can import a dashboard!
- Connect your local weather data using the National Weather Service API: To find your local weather station, you’ll use the National Weather Service grid points for your chosen city, based on your longitude and latitude.
- Customize the dashboard with your city’s name and bookmark it for later use. Its format is optimized for display on a mobile device.
Your Grafana Cloud adventure awaits
This exercise is just one small example of what you can achieve with Grafana Cloud.
To learn more, please check out these Grafana Cloud resources, including blog posts, technical docs, webinars, and quick-start guides. And if you have any questions, please reach out on our community forums or Slack.
Grafana Cloud is the easiest way to get started with metrics, logs, traces, dashboards, and more. We have a generous forever-free tier and plans for every use case. Sign up for free now!