Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify iteration and indexing for catalog.datasets #117

Open
deeplycloudy opened this issue Apr 8, 2021 · 3 comments · May be fixed by #118
Open

Clarify iteration and indexing for catalog.datasets #117

deeplycloudy opened this issue Apr 8, 2021 · 3 comments · May be fixed by #118

Comments

@deeplycloudy
Copy link
Contributor

deeplycloudy commented Apr 8, 2021

I just used this notebook to remind myself how to get data from a THREDDS server, and managed to confuse myself when using catalog.datasets, as documented in siphon#361. I proposed a documentation fix to the DatasetCollection class, but also wanted to propose some changes to this notebook.

Specifically,

  • In section 1, cell 4: cat.datasets, when printed, looks like a list. I recommend adding "Here, cat.datasets is a dictionary, and what you see above is a list of its keys, which are also the filenames of the datasets. Accessing cat.datasets with one of these keys will return the Dataset that can be used to download the data, as you'll see below."
  • In section 3, above cell 10: "As noted above, the dataset name can be used to access each Dataset, but we can also index by position.
  • and below cell 11: "As you might have noticed, datasets is a special kind of dictionary that can be indexed in two ways, but it doesn't work like a list when you loop over it. Instead, since datasets is a dictionary, if you loop through it you will get a sequence of keys: the filenames. So, to loop through each Dataset and download it, you would writefor ds_name in datasets: datasets[ds_name].download(). That could be useful if you want to further filter out datasets based on the dataset name."

That might not be the best / shortest wording for a workshop setting, so suggestions welcome.

@deeplycloudy
Copy link
Contributor Author

Also (@dcamron ?) is there anything special about updating content in the tutorial notebooks? Is it just the main notebook that has to be updated?

@dcamron
Copy link
Member

dcamron commented Apr 8, 2021

Yeah, there's nothing special to making changes to notebooks for outside contributors right now, and it should be fine for you to just update this notebook. Feel free to open a PR with these changes to Siphon Overview.ipynb and just clear any outputs after you confirm that it fully executes in your environment. I'll be glad to review it.

@deeplycloudy
Copy link
Contributor Author

Thanks @dcamron, it's ready, after some rethinking of my proposed fix, for your review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants