In this article, I’m going to show you how to easily download historical weather 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=Ruh2n6HwblQ
If you would like to download weather forecast data as a CSV, see the companion article.
The estimated time to complete this exercise is less than 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 box. Your free trial account will give you instant access to historical weather data for any location around the globe.
In this example, we’ll select the option to manually enter a location to use for our historical weather query. Alternately, we could load a sheet of addresses or paste in a list as plain text if we have a location list already available. These are both easy ways to add multiple locations quickly for bulk analysis.
Instead of actually entering an address, we’ll ask the system to automatically enter our current location by clicking on the “Populate from your location” link below the location text box. Alternately, we could manually enter an address, a city name, or a postal code. Optionally, we can give the location a friendly name so that we can identify it easily in the output data.
Next, we need to choose the query type. Since we are interested in weather reports from the past, we’ll select the Historical Data option. However, in this panel there are other options as well such as weather forecast queries, historical data summary reports, and hourly data. These, and many other options, are covered by our other tutorials and videos.
When we select the Historical Data option, the parameters page opens for us to set the parameters for an historical weather data query. The primary option that we need to select is the Date Range. Use the calendar selectors for the start and end points to select a range that you are interested in for your analysis. The left-hand side calendar selects the starting date and the right-hand side calendar selects the ending date. You may select a month, a few months, an entire year, or more depending upon your needs and account level.
When we run the query the default view is the weather calendar. This view provides a simple overview of the result data. It is very useful for comparing data from multiple locations side-by-side.
To see our data in more detail, we can change to the grid view by clicking the “Raw Grid” button near the top of the page. This view shows a single row for each day of the requested range and 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 our various weather metrics, 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 the weather history for a single location, you can stop reading this tutorial now and begin using your weather data immediately. However, often you need historical weather 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.
To add a second location, we need to click on the Locations button at the top of the window and then follow the steps from earlier to add an additional location manually. For this exercise, we can add any location that interests us, including international locations such as Paris France.
Then, when we rerun the weather query, we can see that the calendar view now shows the two locations together for comparison. If we gave each location a friendly name earlier, that name will be shown in the calendar view to allow us to easily differentiate them. We could also switch to the grid view to see more details in our data. 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 weather history for both locations over the time period the we requested earlier.
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.
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.
On the web interface there is a mode to show Raw Data which shows your data in a more technical grid format. This is just a different view of the data than what is seen above. However it also includes a checkbox for “Show All Columns” . This checkbox will add more advanced weather metrics to your grid and will then also be exported to CSV when downloaded. This is true for variables such as Wind Direction.
If you would like to learn more about using Visual Crossing Weather options such as weather forecasts, multiple location import, and use within other analysis tools please see our other tutorials.