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

Add a tutorial for datetime data #1193

Merged
merged 69 commits into from Jun 5, 2021
Merged

Conversation

noorbuchi
Copy link
Contributor

@noorbuchi noorbuchi commented Apr 7, 2021

This tutorial will help users understand how to plot data in date and time ranges. It will discuss the different possible formats of the data and give examples of how the plots can be customized. Many community members mentioned the need for this tutorial so our team (@munzekm, @cklima616, @nathandloria and I) will working on it.

Preview at https://pygmt-git-fork-noorbuchi-master-gmt.vercel.app/tutorials/date_time_charts.html

Fixes #549

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If adding new functionality, add an example to docstrings or tutorials.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash commands are:

  • /format: automatically format and lint the code
  • /test-gmt-dev: run full tests on the latest GMT development version

@seisman
Copy link
Member

seisman commented Apr 7, 2021

@noorbuchi It's recommended to create a new branch and commit changes to it, rather than committing directly to your master branch.

@noorbuchi noorbuchi changed the title Add placeholder Add Datetime Data Tutorial Apr 7, 2021
@noorbuchi
Copy link
Contributor Author

@noorbuchi It's recommended to create a new branch and commit changes to it, rather than committing directly to your master branch.

Thanks for mentioning that. We will definitely be using the git-flow in our fork to manage our work. I just had to push to the main branch in the fork to create a placeholder for our work

@noorbuchi
Copy link
Contributor Author

@seisman I've been working a bit on the tutorial and I have a small question. When plotting points, should we link to the page that specifies the possible input for styling points? If so, where can I find this page? Thank you!

@seisman
Copy link
Member

seisman commented Apr 12, 2021

When plotting points, should we link to the page that specifies the possible input for styling points? If so, where can I find this page?

I don't think we have a tutorial or a gallery example for different symbol styles yet.

@noorbuchi
Copy link
Contributor Author

When plotting points, should we link to the page that specifies the possible input for styling points? If so, where can I find this page?

I don't think we have a tutorial or a gallery example for different symbol styles yet.

Ok, I see. So should we try to explain the different shapes that the points could have? Similar to the -S flag in GMT official documentation here

@seisman
Copy link
Member

seisman commented Apr 12, 2021

When plotting points, should we link to the page that specifies the possible input for styling points? If so, where can I find this page?

I don't think we have a tutorial or a gallery example for different symbol styles yet.

Ok, I see. So should we try to explain the different shapes that the points could have? Similar to the -S flag in GMT official documentation here

No, it should be in a separate gallery example.

noorbuchi and others added 2 commits April 12, 2021 18:50
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
@noorbuchi
Copy link
Contributor Author

noorbuchi commented Apr 12, 2021

Hello @seisman @weiji14, I've been looking at the example you provided in #549 and I'm confused on what the frame argument is doing exactly. This is the example

fig = pygmt.Figure() 
with pygmt.config(FORMAT_TIME_MAP="abbreviation"): 
    fig.basemap( 
     region=["2020-1-24T", "2020-1-27T", 0, 1], 
     projection="X6c/1c", 
     frame=["pa1K", "sa1K", "NWse"], 
    ) 
fig.basemap(frame=["pa1K", "sa1K", "nwSE"])
fig.show()

I understand the purpose of NWse and nwSE which is choosing which borders are to be labeled and displayed. However, I wasn't able to find any PyGmt documentation for pa1K and sa1K here. Can you please either explain them or link to some documentation that does. Thanks a lot for the help!

@seisman
Copy link
Member

seisman commented Apr 12, 2021

However, I wasn't able to find any PyGmt documentation for pa1K and sa1K here. Can you please either explain them or link to some documentation that does. Thanks a lot for the help!

It's not documented in PyGMT yet. You can find it in the GMT documentation (https://docs.generic-mapping-tools.org/dev/cookbook/options.html#axes-settings and https://docs.generic-mapping-tools.org/dev/cookbook/options.html#cartesian-time-axes).

Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
examples/tutorials/date_time_charts.py Outdated Show resolved Hide resolved
examples/tutorials/date_time_charts.py Outdated Show resolved Hide resolved
examples/tutorials/date_time_charts.py Outdated Show resolved Hide resolved
examples/tutorials/date_time_charts.py Outdated Show resolved Hide resolved
examples/tutorials/date_time_charts.py Outdated Show resolved Hide resolved
examples/tutorials/date_time_charts.py Outdated Show resolved Hide resolved
examples/tutorials/date_time_charts.py Outdated Show resolved Hide resolved
examples/tutorials/date_time_charts.py Outdated Show resolved Hide resolved
examples/tutorials/date_time_charts.py Outdated Show resolved Hide resolved
examples/tutorials/date_time_charts.py Outdated Show resolved Hide resolved
examples/tutorials/date_time_charts.py Outdated Show resolved Hide resolved
examples/tutorials/date_time_charts.py Outdated Show resolved Hide resolved
examples/tutorials/date_time_charts.py Outdated Show resolved Hide resolved
Co-authored-by: Yao Jiayuan <coreman.seism@gmail.com>
Co-authored-by: Michael Grund <23025878+michaelgrund@users.noreply.github.com>
Copy link
Member

@weiji14 weiji14 left a comment

Choose a reason for hiding this comment

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

This is looking really good. Thanks @noorbuchi for keeping on top of this! Agree with @seisman that we shouldn't leave this PR for too long, but I would recommend a couple more rounds of polish, and merging by the end of the working week (Friday).

examples/tutorials/date_time_charts.py Outdated Show resolved Hide resolved
examples/tutorials/date_time_charts.py Outdated Show resolved Hide resolved
examples/tutorials/date_time_charts.py Outdated Show resolved Hide resolved
examples/tutorials/date_time_charts.py Outdated Show resolved Hide resolved
examples/tutorials/date_time_charts.py Outdated Show resolved Hide resolved
examples/tutorials/date_time_charts.py Outdated Show resolved Hide resolved
examples/tutorials/date_time_charts.py Outdated Show resolved Hide resolved
examples/tutorials/date_time_charts.py Outdated Show resolved Hide resolved
examples/tutorials/date_time_charts.py Outdated Show resolved Hide resolved
examples/tutorials/date_time_charts.py Outdated Show resolved Hide resolved
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
examples/tutorials/date_time_charts.py Outdated Show resolved Hide resolved
examples/tutorials/date_time_charts.py Outdated Show resolved Hide resolved
Copy link
Member

@core-man core-man left a comment

Choose a reason for hiding this comment

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

This tutorial looks great to me 😄😄 😄 @noorbuchi, @munzekm, @cklima616 and @nathandloria Thanks a lot for your continuous contributions. Plotting datetime charts is very useful and I have learned a lot from this tutorial.

Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Yao Jiayuan <coreman.seism@gmail.com>
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Jun 5, 2021
@seisman seisman changed the title Add Datetime Data Tutorial Add a tutorial for datetime data Jun 5, 2021
@seisman seisman merged commit dc1d227 into GenericMappingTools:master Jun 5, 2021
@maxrjones maxrjones mentioned this pull request Jun 20, 2021
13 tasks
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022
Co-authored-by: Claire Klima <klimac@allegheny.edu>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Nathan Loria <lorian@allegheny.edu>
Co-authored-by: Michael Grund <23025878+michaelgrund@users.noreply.github.com>
Co-authored-by: Claire <46755872+cklima616@users.noreply.github.com>
Co-authored-by: Yao Jiayuan <coreman.seism@gmail.com>
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add tutorial for plotting datetime inputs
8 participants