How can I download weather forecast data as a CSV file?

In this article, I’m going to show how to download weather forecast data as a standard CSV file that can be imported into thousands of data analysis and storage applications such as business intelligence systems, visualization tools, statistical analysis packages, and databases.

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=3COWYNhAEQg

The estimated time to complete this exercise is less than 5 minutes.

Step 1

mceclip1.png

We’ll start by going to the Visual Crossing Weather Data page.  Then we need to click on the link to go to weather data download page near the top of the page.

Step 2

mceclip0.png

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, you can click on the orange button on the right side of the login prompt.  Signing up for a free trial account will give you immediate access to a full 15-day weather forecast for any location around the globe.

Step 3

blobid0.png

For this example, we’ll select the option to manually enter a location to use for the weather forecast.  However, if you have a sheet of addresses or a list in a text file you could use those directly instead.

Step 4

blobid2.png

For the address, we’ll tell the system to 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.  Optionally, we can also give the location a friendly name for our own reference in the output data.  This feature can be useful when you are comparing multiple locations in the same dataset.

Step 5

blobid0.png

Next, we need to choose the query type.  Since the default Forecast option provides a 15-day daily weather forecast, we can just accept the default for the purpose of this tutorial.  However, in this panel there are other options as well including weather history queries, historical data summary reports, and hourly data.  These are among the many options covered by our other tutorials and videos.  Please take a look at those or reach out to us if you need more information on these options.

Step 6

blobid0.png

When we run the query the default view is the weather calendar.  This view provides a simple overview of the result data.  You will notice that if we entered a friendly name for the location, it will be shown here.  The calendar view is most useful for comparing data from different locations side-by-side.

Step 7

blobid1.png

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 see the various weather metrics that are provided in the output data.  These metrics 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 all of our weather metrics, please see our weather data documentation.

We can now download the data as a CSV by pressing the “Download all data” button for manual import into various analysis tools.  So, if you only need data for a single location, you can stop reading this tutorial now and begin using your weather data immediately.  However, often you need forecast data for more than one location.  So, we can continue with an additional step to show that working with multiple locations is as easy as working with one.

Step 8

blobid2.png

To add a second location, we need to click on the Locations button at the top of the window and then follow the steps that we used earlier to add an additional location manually.  That is, after clicking on the Locations button, we click on the Add Manual button and then enter a second location.  For this exercise, we can add any location that interests us, including international locations such as Paris France.

Step 9

blobid3.png

Then, when we rerun the weather query, we can see that the calendar view shows the two locations together for comparison.  If we gave each location a friendly name, that name will be shown here to allow us to easily recognize them.  We could also switch to the grid view again to see more data details.  However, most importantly for this exercise, we can click the “Download all data” button at the bottom of either view to download a CSV file containing the complete forecast for both locations.

We can then load this CSV into nearly any type of analysis tool.  For example, tools such as Microsoft Excel, many business intelligence packages, and nearly all database systems readily accept CSV data as input.

blobid4.png

Since CSV is a very standard data file format you will be able to easily load this same file into nearly any data analysis tool.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *