Select to view content in your preferred language

Adding organization sample data folder

705
2
06-29-2020 08:55 AM
Labels (1)
KhalidTariq
New Contributor

Hi,

We are using ArcGIS notebook and we would like to deploy sample data files for our students who will be using Brandman Organization for completing assignments on ArcGIS Notebook. Please see the screenshot attached. Can this feature be added by August 2020 for our Fall classes?

2 Replies
LeeJohnston
New Contributor

For Universities and large use cases - this makes a lot of sense. Thank you Khalid. Lee

by Anonymous User
Not applicable

Hi Khalid & Lee,

Folder sharing is on the roadmap but a while off. In the meantime, you could provide each student with a notebook that would create the folder and download and/or unzip a file to it. Use the below code snippets as an example. The following creates a folder at the top level and then downloads a file to that new directory.

(If you prefer to provide the file manually, ignore the !wget command. The file can be added to the directory via the user interface. I say this because wget won't work with a lot of file hosting services (i.e. OneDrive) as those download URLs aren't truly direct download URLs)

!mkdir /arcgis/folder_name/
!wget "https://www.file_url.com/file.zip" -O /arcgis/folder_name/file_name.zip

Then, to unzip:

import zipfile

dataset = "/arcgis/folder_name/file_name.zip"
zipfile.ZipFile(dataset, "r").extractall("/arcgis/output_folder_name/")

All basic unix commands for managing directories work - (!rm, !ls -a, etc.) - so if anyone makes a mess of their directories they should have enough control to clean it up. (Sidenote - recursive delete is not currently implemented. If you wish to delete a folder, everything in it must be individually deleted first. Recursive delete will be coming in a future release.)

If you have anymore questions feel free to reply to this post.

Josh