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

Setup Notebook #1

Open
wants to merge 52 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
10f052c
Update README.md
cyschneck Sep 20, 2024
aca2ff8
update environment.yml
cyschneck Sep 20, 2024
7ccbd71
setup coordinates and plotting
cyschneck Sep 20, 2024
842f0c8
great circle arc and path
cyschneck Sep 23, 2024
e736332
cross track distance
cyschneck Sep 24, 2024
0514cdd
update terminology
cyschneck Sep 25, 2024
ffba73f
setup descriptions within templates
cyschneck Sep 25, 2024
376dc54
fix myst link
cyschneck Sep 25, 2024
9b21120
fix url
cyschneck Sep 25, 2024
dab637f
update header image URLs
cyschneck Sep 25, 2024
fbb6318
table of contents
cyschneck Sep 25, 2024
49fa1da
edit spelling
cyschneck Sep 25, 2024
92b8713
update math with equations
cyschneck Sep 25, 2024
7a1e080
fix imports
cyschneck Sep 25, 2024
27dadf4
setup midpoint and fractional points
cyschneck Sep 26, 2024
2b70219
check if a point lies on arc with tolerance
cyschneck Sep 26, 2024
05d9604
fix removed variable
cyschneck Sep 26, 2024
7ab2a05
compare geodesic and unit sphere
cyschneck Sep 26, 2024
f8e584d
great circle parallels
cyschneck Sep 27, 2024
6fd7f34
intersection of great circles
cyschneck Sep 27, 2024
b4fbc03
angles and directed angles
cyschneck Sep 30, 2024
bbd9780
add geopy import
cyschneck Sep 30, 2024
ab126c4
area and perimeter
cyschneck Oct 1, 2024
68e0b00
point contained within polygon
cyschneck Oct 1, 2024
b08165c
plot center of polygon
cyschneck Oct 1, 2024
208feb0
update toc
cyschneck Oct 2, 2024
3011453
fix url ref
cyschneck Oct 2, 2024
3a69414
traffic url
cyschneck Oct 2, 2024
58b43a4
remove anchor
cyschneck Oct 2, 2024
b83e14a
update overview
cyschneck Oct 2, 2024
778a10d
triangular patch
cyschneck Oct 2, 2024
7d2ff70
plot antipodal points
cyschneck Oct 8, 2024
1c28dc0
add rockford, distance from boulder->boston
cyschneck Oct 8, 2024
a17f313
determine if lst pts in polygon
cyschneck Oct 8, 2024
b820f7a
combine point and list of points functions
cyschneck Oct 9, 2024
7bd789c
update function name
cyschneck Oct 9, 2024
6a0c0e1
import numpy
cyschneck Oct 9, 2024
2699ff0
edit descriptions
cyschneck Oct 9, 2024
c4c329d
simple plot ct
cyschneck Oct 9, 2024
aea35c9
spherical distance to degrees
cyschneck Oct 9, 2024
cc8c75a
postive/negative ct distances
cyschneck Oct 9, 2024
b351d0c
display points not within
cyschneck Oct 9, 2024
d427908
spelling edits
cyschneck Oct 10, 2024
4d29066
reference edits
cyschneck Oct 11, 2024
d281d13
update .loc
cyschneck Oct 15, 2024
2b0cb5e
reorganize toc
cyschneck Oct 15, 2024
aa0e2c5
edits
cyschneck Dec 18, 2024
5226c1c
Merge branch 'ProjectPythia:main' into main
cyschneck Dec 23, 2024
f28e32b
update contributors, thumbnail
cyschneck Dec 23, 2024
792179b
Update README.md
cyschneck Dec 23, 2024
3e27cba
update edits
cyschneck Dec 23, 2024
faefcc9
update links
cyschneck Dec 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 7 additions & 43 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,48 +1,12 @@
cff-version: 1.2.0
message: "If you use this cookbook, please cite it as below."
authors:
# add additional entries for each author -- see https://github.com/citation-file-format/citation-file-format/blob/main/schema-guide.md
- family-names: Rose
given-names: Brian E. J.
orcid: https://orcid.org/0000-0002-9961-3821 # optional
website: https://github.com/brian-rose # optional
affiliation: University at Albany (State University of New York) # optional
- family-names: Kent
given-names: Julia
orcid: https://orcid.org/0000-0002-5611-8986
website: https://github.com/jukent
- family-names: Schneck
given-names: Cora
orcid: https://orcid.org/0009-0009-1415-5170
website: https://github.com/cyschneck
affiliation: UCAR/NCAR
- family-names: Tyle
given-names: Kevin
orcid: https://orcid.org/0000-0001-5249-9665
website: https://github.com/ktyle
affiliation: University at Albany (State University of New York)
- family-names: Clyne
given-names: John
orcid: https://orcid.org/0000-0003-2788-9017
website: https://github.com/clyne
affiliation: UCAR/NCAR
- family-names: Camron
given-names: Drew
orcid: https://orcid.org/0000-0001-7246-6502
website: https://github.com/dcamron
affiliation: UCAR/Unidata
- family-names: Grover
given-names: Maxwell
orcid: https://orcid.org/0000-0002-0370-8974
website: https://github.com/mgrover1
affiliation: Argonne National Laboratory
- family-names: Ford
given-names: Robert R.
orcid: https://orcid.org/0000-0001-5483-4965
website: https://github.com/r-ford
affiliation: University at Albany (State University of New York)
- family-names: Paul
given-names: Kevin
orcid: https://orcid.org/0000-0001-8155-8038
website: https://github.com/kmpaul
affiliation: NVIDIA
- name: "Cookbook Template contributors" # use the 'name' field to acknowledge organizations
- name: "Great Circle Cookbook contributors" # use the 'name' field to acknowledge organizations
website: "https://github.com/ProjectPythia/great-circle-cookbook/graphs/contributors"
title: "Cookbook Template"
abstract: "A sample cookbook description."
title: "Great Circle Cookbook"
abstract: "A cookbook which covers the background and mathematics of working with great circles with plotting"
77 changes: 61 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
<img src="thumbnail.png" alt="thumbnail" width="300"/>

# (Replace_with_your_title) Cookbook
# Great Circle Cookbook

[![nightly-build](https://github.com/ProjectPythia/great-circle-cookbook/actions/workflows/nightly-build.yaml/badge.svg)](https://github.com/ProjectPythia/great-circle-cookbook/actions/workflows/nightly-build.yaml)
[![Binder](https://binder.projectpythia.org/badge_logo.svg)](https://binder.projectpythia.org/v2/gh/ProjectPythia/great-circle-cookbook/main?labpath=notebooks)
[![DOI](https://zenodo.org/badge/860220270.svg)](https://zenodo.org/badge/latestdoi/860220270)

This Project Pythia Cookbook covers ... (replace `...` with the main subject of your cookbook ... e.g., _working with radar data in Python_)
This Project Pythia Cookbook covers the background and mathematics of working with great circles and, where available, this cookbook will demonstrate how to determine the features of a great circle with both existing open-source Python packages and through spherical trigonometry


## Motivation

(Add a few sentences stating why this cookbook will be useful. What skills will you, "the chef", gain once you have reached the end of the cookbook?)
A great circle is the largest circle that can be drawn onto a sphere (like the Earth) that is the same diameter of the sphere. Great Circle arcs connect two positions on the curved surface of a planet like Earth and are commonly used for navigation that relies on "as-the crow flies" directions like planes, ships, and satellites

<p align="center">
<img src="https://github.com/user-attachments/assets/5ffe9566-d869-4e20-bef0-f5864502b2df" width="400"/>
</p>

_Image Source: [Wolfram MathWorld](https://mathworld.wolfram.com/GreatCircle.html)_

Great circles are commonly used in navigation, satellites in remote sensing, and working with coordinates on planets, but can be difficult to find resources to fully explain how to use them.

## Authors

[First Author](@first-author), [Second Author](@second-author), etc. _Acknowledge primary content authors here_
[Cora Schneck](https://github.com/cyschneck)

### Contributors

Expand All @@ -24,15 +33,53 @@ This Project Pythia Cookbook covers ... (replace `...` with the main subject of

## Structure

(State one or more sections that will comprise the notebook. E.g., _This cookbook is broken up into two main sections - "Foundations" and "Example Workflows."_ Then, describe each section below.)
This cookbook is broken into two main sections:
- Foundations and Terminology
- Working with Great Circles

### Foundations and Terminology

- "Great Circle Terminology": Covers the important terminology for working with and understanding great circles
- "Coordinate Systems": Covers important terminology and functions required to understand and converted to different types of coordinate systems like Cartesian, Spherical, Polar, and Latitude/Longitude

### Section 1 ( Replace with the title of this section, e.g. "Foundations" )
Each section will make use of plotting to visually demonstrate concepts with `matplotlib` and `cartopy`

(Add content for this section, e.g., "The foundational content includes ... ")
### Working with Great Circles

### Section 2 ( Replace with the title of this section, e.g. "Example workflows" )
This is the main section of this notebook and will cover specific details about how to understand and calculate important features in great circles.

(Add content for this section, e.g., "Example workflows include ... ")
#### 1. **Great Circle Arcs and Paths**
- Distance between Points on a Great Circle Arc
- Spherical Distance to Degrees
- Determine the Bearing of a Great Circle Arc
- Generate a Great Circle Arc with Intermediate Points
- Determine the Midpoint of a Great Circle Arc
- Generate a Great Circle Path
- Determine an Antipodal Point

#### 2. **Great Circles and a Point**
- Determine the distance of a point to a great circle arc (cross-track and along-track distance)
- Determine if a point lies on a great circle arc and path (with and without tolerances)

#### 3. **Great Circles and Parallels**
- Determine the maximum latitude on a Great Circle Path
- Determine the minimum latitude on a Great Great path
- Determine when a great circle path crosses parallels

#### 4. **Intersections of Great Circles**
- Find the intersection of two great circle paths (always exists)
- Find the intersection of two great circle arcs (if it exists)

#### 5. **Angles and Great Circles**
- Calculate the acute and obtuse angle of two Great Circle paths
- Calculate the Directed Angle of two Great Circle paths based on an intersection point
- Working with Spherical Triangles formed by great circle arcs

#### 6. **Spherical Polygons and Areas**
- Determine clockwise/counterclockwise ordering of points on spherical polygon
- Area and Permieter of quadrilateral patch on a unit sphere
- Determine if a given point is within a spherical polygon
- Mean center of spherical polygon

## Running the Notebooks

Expand All @@ -59,22 +106,20 @@ Jupyter](https://foundations.projectpythia.org/foundations/getting-started-jupyt

If you are interested in running this material locally on your computer, you will need to follow this workflow:

(Replace "cookbook-example" with the title of your cookbooks)

1. Clone the `https://github.com/ProjectPythia/cookbook-example` repository:
1. Clone the `https://github.com/ProjectPythia/great-circle-cookbook` repository:

```bash
git clone https://github.com/ProjectPythia/cookbook-example.git
git clone https://github.com/ProjectPythia/great-circle-cookbook.git
```

1. Move into the `cookbook-example` directory
1. Move into the `great-circle-cookbook` directory
```bash
cd cookbook-example
cd great-circle-cookbook
```
1. Create and activate your conda environment from the `environment.yml` file
```bash
conda env create -f environment.yml
conda activate cookbook-example
conda activate cookbook-gc
```
1. Move into the `notebooks` directory and start up Jupyterlab
```bash
Expand Down
12 changes: 10 additions & 2 deletions _gallery_info.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
thumbnail: thumbnail.png
tags:
domains:
- sampledomain
- great circle
- geodesic
- spherical trigonometry
- remote sensing
packages:
- samplepackage
- numpy
- uxarray
- geopy
- pyproj
- matplotlib
- cartopy
13 changes: 11 additions & 2 deletions _toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ parts:
- caption: Preamble
chapters:
- file: notebooks/how-to-cite
- caption: Introduction
- caption: Foundations
chapters:
- file: notebooks/notebook-template
- file: notebooks/foundations/1_terminology
- file: notebooks/foundations/2_coordinates
- caption: Tutorials
chapters:
- file: notebooks/tutorials/1_arc_path
- file: notebooks/tutorials/2_arc_to_point
- file: notebooks/tutorials/3_parallels_max_min
- file: notebooks/tutorials/4_path_intersection
- file: notebooks/tutorials/5_angles
- file: notebooks/tutorials/6_polygon_area
11 changes: 10 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
name: cookbook-dev
name: cookbook-gc
channels:
- conda-forge
dependencies:
- jupyter-book
- jupyterlab
- sphinx-pythia-theme
- numpy
- uxarray
- geopy
- pyproj
- matplotlib
- cartopy
- pip
- pip:
- jupyterlab-myst
Loading
Loading