Making the choice between accessing data using an API or downloading a snapshot of the data and storing it locally can be a hard decision.
Dataset snapshots are a point-in-time snapshot of any given dataset. So, unlike accessing data via an API, the version of the data in snapshots may not always reflect the most up-to-date data. Many of the snapshots on data.wa.gov.au are recreated every night, but others are only updated weekly or monthly. For many users of data this either may not be an issue, or the ease of access to snapshots (i.e. simply downloading a file) is a worthwhile trade-off.
For more information about determining the age of a snapshot see the section entitled How do I know if the data snapshot has been updated? further on in this article.
Deciding which option is best for you will vary from case to case -
- Are always up-to-date with the latest data provided by data custodians.
- Can be simple to use in supported software. e.g. For geospatial data APIs, there are many common GIS and web-based mapping tools that integrate with APIs without needing to download, extract, and re-host the data yourself.
- Often support a range of advanced querying and filters options to enable fast and easy access to larger datasets without the need to download the whole dataset.
- Datasets which are completely open and public may be accessed without needing to register for an account.
- Retrieving any moderately sized dataset may require many consecutive HTTP web requests to retrieve the data, merge it together into a single dataset, before saving it to your local system.
- Are inherently more prone to failure and slower response times due to the technical complexity inherent in receiving, parsing, querying, and translating data directly from the database.
- Available in a variety of formats suitable for a wide range of desktop and web-based software.
- Are less prone to failure due to the lack of technical complexity - snapshots are simply hosted on a fileserver with none of the technical overhead of accessing databases or providing APIs.
- Are stored as ZIP files to reduce their file sizes (where relevant).
- May not always contain the latest data. Snapshot are recreated on a daily, weekly, or monthly basis and data will often change several times between the creation of one snapshot and the next.
- It's not possible to filter snapshots before downloading them, so accessing larger datasets may involving downloading several gigabytes in order to extract only a few megabytes of data.
For more information about accessing data and the APIs available on data.wa.gov.au please see Available APIs & data formats.