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 getting started and installation instructions to the welcome page #12

Merged
merged 13 commits into from
Dec 4, 2024

Conversation

weiji14
Copy link
Member

@weiji14 weiji14 commented Nov 14, 2024

Editing the front page to include a one-click Binder link to run the Jupyter notebooks, and steps for people to get a conda virtual environment set up locally for the AGU24 pre-conference workshop.

Screenshot

image

TODO:

  • Adding quickstart binder button and installation instructions
  • Add sphinx-design cards in 3x2 grid layout for the 6 tutorials
  • Include thumbnails of the best looking figure in each tutorial (do after all tutorials are ready)
  • etc

References:

Editing the front page to include a one-click Binder link to run the Jupyter notebooks, and steps for people to get a conda virtual environment set up locally for the AGU24 pre-conference workshop.

Based on EGU22 short course at GenericMappingTools/egu22pygmt#10.
Adding the 6 main tutorials as sphinx-design cards in a 3x2 grid. Each card has the tutorial title, author(s), and tags/badges. The tags hint at which libraries/methods will be covered, and also the datasets that are used.
@weiji14 weiji14 self-assigned this Nov 14, 2024
book/intro.md Outdated
{bdg-secondary-line}`japan_quakes`
{bdg-info}`pandas`
{bdg-info}`geopandas`
{bdg-info-line}`airbnb`
Copy link
Member

Choose a reason for hiding this comment

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

Not sure about this; I would prefer to include "choropleth map"

Suggested change
{bdg-info-line}`airbnb`
{bdg-info-line}`choropleth map`

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I could use some advice on what tags/badges to add. My current thought process is to include:

  • bdg-primary: pygmt or gmt
  • bdg-primary-line: GMT module used (e.g. coast, plot, etc)
  • bdg-info: External library used (e.g. pandas, xarray)
  • bdg-secondary-line: GMT remote-dataset used (e.g. earth_relief, earth_age, etc)

The {bdg-info-line}`airbnb` here was intended to show external non GMT remote-datasets used, but I do agree that having AirBnB here looks weird. We could maybe add some tags for concepts being taught such as choropleth-map as you suggested, or scatterplot, etc.

Ref: color of badges/tags: https://sphinx-design.readthedocs.io/en/sbt-theme/badges_buttons.html#badges

Copy link
Member

Choose a reason for hiding this comment

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

Yep, I got your main idea behind the structure of these tags / badges and I definitely like this idea! And I think mentioning special concept / specific visualization is a good addition.

Even the file contains "airbnb" currently the column “population” is used for the choropleth-map (there are a lot of different columns / quantities in this dataset).

yvonnefroehlich

This comment was marked as off-topic.

@yvonnefroehlich yvonnefroehlich added the documentation Improvements or additions to documentation label Nov 28, 2024
weiji14 and others added 5 commits December 2, 2024 13:45
Co-authored-by: Yvonne Fröhlich <[email protected]>
Sort alphabetically, change `bdg-info` to `bdg-success` for more differentiation (also, unsure why primary and info colour is the same now?), and add more tags based on new tutorial updates.
Also choosing other teaser images for Tutorial 1, 2, 3.
Figure is too long, so just getting the bottom part only. Using a 75dpi version.
Remove the h2 heading and do some more sphinx-design grid nesting to squeeze out more vertical space for the thumbnail images. The grids are now adaptive too, and will turn from 3 columns to 1 column on narrow width screens (e.g. mobile devices).

Ref: https://sphinx-design.readthedocs.io/en/sbt-theme/grids.html#nesting-grids.
@weiji14 weiji14 marked this pull request as ready for review December 4, 2024 04:57
@weiji14
Copy link
Member Author

weiji14 commented Dec 4, 2024

Ok, spent way too much time on the grid layout, but this PR is finally ready for review! Screenshot of the thumbnail images on the front page:

image

Had to do mamba install 'pydata-sphinx-theme=0.15.3' to get the left sidebar to hide away properly (xref jupyter-book/jupyter-book#2160). I might pin that dependency later, but otherwise, please review this and I'll try to merge this tomorrow.

Copy link
Member

@yvonnefroehlich yvonnefroehlich left a comment

Choose a reason for hiding this comment

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

Just a few typo fixes for now - but this looks already very nice @weiji14 🙂! Will give this PR a more detailed review later the day!

book/intro.md Outdated
{bdg-secondary-line}`earth_age`
:::

:::{grid-item-card} Tutorial 2 - Integration with the Scientific Python Ecosystem: Pandas / GeoPandas
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
:::{grid-item-card} Tutorial 2 - Integration with the Scientific Python Ecosystem: Pandas / GeoPandas
:::{grid-item-card} Tutorial 2 - Integration with the scientific Python ecosystem: pandas / GeoPandas

Copy link
Collaborator

@jhtong33 jhtong33 Dec 4, 2024

Choose a reason for hiding this comment

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

I guess @weiji14 try to maintain consistency across all titles by capitalizing the first letter of each word throughout the page. Maybe it's just to ensure consistency on this page or to align with the style used in EGU22?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll take @yvonnefroehlich's suggestions on capitalization, we should try to match with the titles on the left side bar too.

book/intro.md Outdated Show resolved Hide resolved
Copy link
Member

@yvonnefroehlich yvonnefroehlich left a comment

Choose a reason for hiding this comment

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

Thanks, @weiji14, for working on the introduction page. This looks nice 🙂!

I personally like equal-sized cards more, at least a common horizontal line at which the upper edges of the cards of one row align. But if this is difficult to set up, we can leave the layout as is. Also for the EGU workshop, the height of the cards scales with the size of the images (please see https://www.generic-mapping-tools.org/egu22pygmt/intro.html).

book/intro.md Outdated Show resolved Hide resolved
book/intro.md Outdated Show resolved Hide resolved
Co-authored-by: Yvonne Fröhlich <[email protected]>
@weiji14
Copy link
Member Author

weiji14 commented Dec 4, 2024

Thanks, @weiji14, for working on the introduction page. This looks nice 🙂!

I personally like equal-sized cards more, at least a common horizontal line at which the upper edges of the cards of one row align. But if this is difficult to set up, we can leave the layout as is. Also for the EGU workshop, the height of the cards scales with the size of the images (please see https://www.generic-mapping-tools.org/egu22pygmt/intro.html).

Yeah, so the previous EGU22 short course used sphinx-panels which is now deprecated in favour of sphinx-design (see https://sphinx-design.readthedocs.io/en/sbt-theme/get_started.html#migrating-from-sphinx-panels), and I couldn't quite work out how to get 2 rows with a range of different heights to look nice (the EGU22 one only had 1 rows which was easier). I did try with equal-height cards per-row, but because each thumbnail figure has very different heights (e.g. Tutorial 4 had an extremely tall figure, compared to Tutorial 5 which is very short), there would be a lot of whitespace that didn't look very nice, so I've adapted the grid layout in commit ecf863f.

I'll merge this in first, so we at least have the installation instructions on the website (and @maxrjones can send the email to the participants). If anyone has time to alter the thumbnail layout, feel free to do that (but I'm guessing there are more important things to fix before that)!

@weiji14 weiji14 merged commit f8d4754 into main Dec 4, 2024
1 check passed
@weiji14 weiji14 deleted the doc/welcome-page branch December 4, 2024 20:37
@yvonnefroehlich
Copy link
Member

I personally like equal-sized cards more, at least a common horizontal line at which the upper edges of the cards of one row align. But if this is difficult to set up, we can leave the layout as is. Also for the EGU workshop, the height of the cards scales with the size of the images (please see https://www.generic-mapping-tools.org/egu22pygmt/intro.html).

Yeah, so the previous EGU22 short course used sphinx-panels which is now deprecated in favour of sphinx-design (see https://sphinx-design.readthedocs.io/en/sbt-theme/get_started.html#migrating-from-sphinx-panels), and I couldn't quite work out how to get 2 rows with a range of different heights to look nice (the EGU22 one only had 1 rows which was easier). I did try with equal-height cards per-row, but because each thumbnail figure has very different heights (e.g. Tutorial 4 had an extremely tall figure, compared to Tutorial 5 which is very short), there would be a lot of whitespace that didn't look very nice, so I've adapted the grid layout in commit ecf863f.

No worries. I already thought based on the comment "spent way too much time on the grid layout" that you already tried different layouts 🙈.
If people really want to work with the materials and play around with the codes, they will download the JNs. So, I do not think the layout of the cards is too important, and we should focus on more relevant aspects first.

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.

3 participants