In this article, I’m going to show you how to easily load weather forecast data into Google sheets. We’ll walk through the process step-by-step showing you how to construct the query in Visual Crossing Weather and then use the query URL to import the weather results into Google Sheets.
Also see our companion article that discusses importing historical weather data into Google Sheets.
If you would like to follow along with a video as well, open a browser on the matching YouTube video here: https://www.youtube.com/watch?v=8FTptZgF7PQ
The estimated time to complete this exercise is about 5 minutes.
We’ll start by going to the Visual Crossing Weather Data page. We then need to click on the link to go to weather data download page near the top of the page.
Once on the log-in page, you will need to sign into your Visual Crossing Weather account. If you don’t already have an account simply click on the orange button on the right-hand side of the login page. Your free trial account will give you instant access to a full 15 day forecast for any location worldwide.
For this example, we’ll select the option to manually enter a location to use for the weather forecast. However, you could instead load a sheet of addresses or paste in a list as plain text.
As for the address itself, we will let the system use our current location by clicking on the “Populate from your location” link below the location text box. However, we could instead manually enter an address, a city name, or a postal code. We can optionally also give the location a friendly name for our own reference in the output data. However, there is typically little need to provide this alternate name if we are only working with a single location.
Next, we need to choose the query type. Since the default option provides a 15-day daily forecast, we can just accept the default for the purpose of this article. However, in this panel there are other options as well such as weather history queries, historical data summary reports, and hourly data. These are among the many options covered by our other tutorials and videos. Whatever type of weather data you need, Visual Crossing Weather can provide it for you.
When we run the query the default view is the weather calendar. This view provides a simple overview of the result data. It is also valuable for comparing data from different locations side-by-side.
To see more details we can change to the grid view by clicking the “Raw Grid” button near the top of the page. This view gives a single row for each record in the forecast data. In this example, we will have one row of forecast data for each day of the 15-day forecast at the location we selected earlier. You can now see the various weather metrics that are provided in the output data. These include common values such as temperature, precipitation, and wind as well as less common value such as heat index, cloud cover, and wind gusts. For more information on the details and how to use these less common weather metrics, please see our weather data documentation.
We could now download the data as a CSV by pressing the “Download all data” button for import into any analysis tool, but instead, we’ll switch to the API view to generate the query URL. Using a URL instead of a data import will allow Google Sheets to fetch the data live and allow us to refresh the data at any time within the Google Sheets interface. Since the default query URL output is CSV, we can simply press the “Copy full query” button to copy the query URL to the clipboard.
We can now use this URL to load the weather query results directly into Google Sheets. Loading the live result data is as simple as entering the URL into Google Sheets ImportData function. To do so, we would enter the following into the first sheet cell:
Where the “<URL>” is the value the we copied from the Visual Crossing Weather API page.
The final step before we can use this data is to format the date column as a Google Sheet date. To do so, we simply select the date column and then select the Date option under the Number options in the Format menu.
Now our weather forecast data is loaded and ready for analysis within the Google Sheets environment.
If you would like to learn more about using Visual Crossing Weather options such as history data, multiple location import, and use within other analysis tools please see our other tutorials.