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

Blog post comparing climatology approaches #216

Merged
merged 35 commits into from
Dec 2, 2022

Conversation

hCraker
Copy link
Contributor

@hCraker hCraker commented Nov 28, 2022

Closes #214

During the (Re)Introduciton to ESDS event, an attendee asked for a comparison between using xarray.resample and xarray.groupby to compute climatology averages vs the geocat.comp method of doing these calculations. This PR adds a jupyter notebook to the 2022 blog posts. It also adds the dataset used in the example.

@hCraker hCraker added the calculations Posts related to operating on datasets label Nov 28, 2022
@hCraker hCraker linked an issue Nov 28, 2022 that may be closed by this pull request
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Heather Craker and others added 10 commits November 28, 2022 12:39
…ogy-approaches' into 214-blog-post-comparing-climatology-approaches

# Conflicts:
#	posts/2022/xarray-groupby-vs-geocat-climatology.ipynb
…ogy-approaches' into 214-blog-post-comparing-climatology-approaches

# Conflicts:
#	posts/2022/xarray-groupby-vs-geocat-climatology.ipynb
@hCraker hCraker marked this pull request as ready for review November 28, 2022 21:49
@hCraker hCraker requested a review from a team as a code owner November 28, 2022 21:49
@hCraker hCraker requested review from erogluorhan, rmshkv, anissa111 and a team and removed request for a team November 28, 2022 21:49
@hCraker
Copy link
Contributor Author

hCraker commented Nov 28, 2022

This is my first blog post for ESDS. Is there anything that I need to do to get the post to show up on the blog page? Currently when I click on the ReadTheDocs build for this branch, my post isn't visible

@@ -0,0 +1,423 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line #4.        time=range(1, None)


Reply via ReviewNB

@dcherian
Copy link
Contributor

dcherian commented Nov 29, 2022

Is there anything that I need to do to get the post to show up on the blog page?

You'll need to add author, title, and date metadata. Look at #159 (comment) or an existing notebook for the syntax.

xref #160

@hCraker
Copy link
Contributor Author

hCraker commented Nov 29, 2022

Thanks for all of the reviews.

@katiedagon

The xarray operation for seasonal means I'm most familiar with is the following: ds.groupby('time.season').mean()

It could be worth checking if that's the same as ds.resample(time='QS-DEC').mean().groupby('time.month').mean() which is what you're using for the unweighted version.

It's been so long since I did this computation the incorrect way, that I orgot groupby('time.season') was possible. I'll switch to that. Because of this, the difference might be smaller than 3C @dcherian

Thanks for all the spelling help! It turns out I'm useless without autocorrect and spellcheck @rmshkv

Heather Craker and others added 10 commits November 29, 2022 10:58
…ogy-approaches' into 214-blog-post-comparing-climatology-approaches

# Conflicts:
#	posts/2022/xarray-groupby-vs-geocat-climatology.ipynb
…ogy-approaches' into 214-blog-post-comparing-climatology-approaches

# Conflicts:
#	posts/2022/xarray-groupby-vs-geocat-climatology.ipynb
@hCraker hCraker requested review from rmshkv and dcherian November 29, 2022 17:50
@dcherian
Copy link
Contributor

Thanks @hCraker This is now rendering on RTD 👏

But something's wrong with linking to the image:

image

@hCraker
Copy link
Contributor Author

hCraker commented Nov 30, 2022

Thanks @hCraker This is now rendering on RTD 👏

But something's wrong with linking to the image:

image

Ah I was afraid of that. Let me look into this more. I haven't ever added static images to a notebook

@hCraker
Copy link
Contributor Author

hCraker commented Dec 2, 2022

@dcherian @katiedagon I've added a mask and fixed the rendering issues. I think we are good to go!

Copy link
Contributor

@katiedagon katiedagon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me, thanks @hCraker!

@hCraker hCraker merged commit 82ce171 into main Dec 2, 2022
@hCraker hCraker deleted the 214-blog-post-comparing-climatology-approaches branch December 2, 2022 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
calculations Posts related to operating on datasets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Blog post comparing climatology approaches
5 participants