ecocloud Explorer can generated code snippets for downloading datasets.
These code snippets can be incorporated into your code to download the data into the server.
To use snippets:
- Perform a search (see discovery overview).
- Select the files you want to use by checking the checkboxes next to their links.
- Press the “View Snippets” button in the datasets selected box at the top of the page. This brings up the snippets page for the selected files.
- Copy the snippets for the language/mechanism you want to use. This can be done by pressing the “Copy to Clipboard” link next to the code snippet.
- Use the snippet in your code. For convenience, the “Launch Notebook” button launches a Jupyter server (just like the links on the tools page).
The selected files are listed in the datasets selected box at the top of the page. Multiple files can be selected. To remove a selected file, uncheck its checkbox or click on the cross on it in the datasets selected box.
On the snippets page, the “Download file” button can be used to download the file to your local computer. It performs the same function as the file’s link on the search results page.
Please check the dataset returned by the snippet, before relying on it.
Snippets are automatically generated from the information provided by the data publisher or entry provider, which (unfortunately) is not always complete or correct. Therefore, snippets do not always work as intended.
For example, some datasets claim the data is a CSV file, but the URL goes to a registration page where you need to enter an email address before the CSV file can be accessed.
Please visit the dataset publisher’s Website if you need more information about a particular dataset.
Snippets also depend on the data publisher maintaining the availability and contents of the dataset.