Downloading Data Files
The prerequisite for doing this exercise is that you have successfully completed the previous one. A JSON object representing a dataset card should be available in your API testing tool or at least in your web browser.
Our objective is to obtain one of the data files listed in the dataset's resources. To be specific, let’s choose a CSV file.
Each data file is represented by a descriptor in the dataset card. An array of data file descriptors is available in the _source.resources
property of the dataset card. An example descriptor is shown below.
{
"name": "CSV",
"format": null,
"mimetype": "text/csv",
"d_ext": ".csv",
"d_mime": "text/csv",
"url": "https://rigis-edc.opendata.arcgis.com/api/download/v1/items/847dae37f36e4b8dbbee806d2b8dbdc7/csv?layers=0"
}
To download a CSV file associated with the dataset:
- Locate the array of data file descriptors in the dataset card object.
- Find a descriptor where the
format
property isCSV
. - Copy the target URL from the
url
property. - Download the file using your API testing tool or web browser.
- Enjoy.
NOTE
Since data files are hosted on dataset owners’ websites, they may be temporarily unavailable or require specific access permissions. Dateno cannot guarantee permanent availability of any data file. If the file mentioned in this topic is unavailable, try downloading another file or retrieving a different dataset card.