Downloading Multiple Projects From the Riverscapes Data Exchange

Created by Philip Bailey, Modified on Thu, 29 May at 12:45 PM by Philip Bailey

It's common that people want to download multiple projects from the Riverscapes Data Exchange. This is currently a manual task that can be accomplished several ways.


Option 1 - Python Scripting


The Riverscapes Data Exchange has a rich API that can be used for searching and downloading project data. It's possible to perform a search that returns multiple projects and then loop over them and download some or all the data contained within the projects. We have a script that demonstrates this workflow:


https://github.com/Riverscapes/data-exchange-scripts/blob/main/scripts/utility/file_download.py


You can fork this repository and then either use your local computer or a GitHub CodeSpace to run this code. Refine the contents of the download_files_search.json file with the specific needs of your search. And then change line 32 in the file above to filter for specific files, or remove this line altogether to download all files within each project.


Option 2 - Command Line


The Riversscapes Command Line Interface (rscli) can be used to download individual projects, again with an optional regex file filter, that can be looped over to download multiple projects. One way to do this is to perform a search in the Riverscapes Data Exchange and then copy the project GUIDs for the results and paste them into a batch file along with the appropriate rscli download command:

rscli download --id PROJECT_GUID1 ./project1
rscli download --id PROJECT_GUID2 ./project2
rscli download --id PROJECT_GUID3 ./project3
Generic

The main downside of this approach is that each time the rscli command is executed it will require separate authentication (i.e. a new browser window will open for each line of the file). This will get annoying for anything more than a handful of projects and the scripting approach is recommended for these situations.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article