Skip to content

Commit

Permalink
deploy: 9819864
Browse files Browse the repository at this point in the history
  • Loading branch information
cyschneck committed Sep 25, 2024
1 parent 56df06c commit ac2eb06
Show file tree
Hide file tree
Showing 11 changed files with 5,842 additions and 137 deletions.
150 changes: 60 additions & 90 deletions _preview/1/_sources/notebooks/foundations/coordinates.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,35 +34,27 @@
"## Overview\n",
"If you have an introductory paragraph, lead with it here! Keep it short and tied to your material, then be sure to continue into the required list of topics below,\n",
"\n",
"1. This is a numbered list of the specific topics\n",
"1. These should map approximately to your main sections of content\n",
"1. Or each second-level, `##`, header in your notebook\n",
"1. Keep the size and scope of your notebook in check\n",
"1. And be sure to let the reader know up front the important concepts they'll be leaving with"
"1. Types of Coordinates\n",
"1. Convert Coordinates to All Coordinate Types\n",
"1. Plot Coordinates on a World Map"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Prerequisites\n",
"This section was inspired by [this template](https://github.com/alan-turing-institute/the-turing-way/blob/master/book/templates/chapter-template/chapter-landing-page.md) of the wonderful [The Turing Way](https://the-turing-way.netlify.app) Jupyter Book.\n",
"\n",
"Following your overview, tell your reader what concepts, packages, or other background information they'll **need** before learning your material. Tie this explicitly with links to other pages here in Foundations or to relevant external resources. Remove this body text, then populate the Markdown table, denoted in this cell with `|` vertical brackets, below, and fill out the information following. In this table, lay out prerequisite concepts by explicitly linking to other Foundations material or external resources, or describe generally helpful concepts.\n",
"\n",
"Label the importance of each concept explicitly as **helpful/necessary**.\n",
"\n",
"| Concepts | Importance | Notes |\n",
"| --- | --- | --- |\n",
"| [Intro to Cartopy](https://foundations.projectpythia.org/core/cartopy/cartopy.html) | Necessary | |\n",
"| [Understanding of NetCDF](https://foundations.projectpythia.org/core/data-formats/netcdf-cf.html) | Helpful | Familiarity with metadata structure |\n",
"| Project management | Helpful | |\n",
"| [Numpy](https://foundations.projectpythia.org/core/numpy.html) | Necessary | |\n",
"| [Pandas](https://foundations.projectpythia.org/core/numpy.html) | Necessary | |\n",
"| [Intro to Cartopy](https://foundations.projectpythia.org/core/cartopy/cartopy.html) | Helpful | Will be used for plotting |\n",
"| [Matplotlib](https://foundations.projectpythia.org/core/matplotlib.html) | Helpful | Will be used for plotting |\n",
"\n",
"- **Time to learn**: estimate in minutes. For a rough idea, use 5 mins per subsection, 10 if longer; add these up for a total. Safer to round up and overestimate.\n",
"- **System requirements**:\n",
" - Populate with any system, version, or non-Python software requirements if necessary\n",
" - Otherwise use the concepts table above and the Imports section below to describe required packages as necessary\n",
" - If no extra requirements, remove the **System requirements** point altogether"
"- **Time to learn**: 20 minutes"
]
},
{
Expand All @@ -76,54 +68,41 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Geodesic Coordinates"
"## Types of Coordinates"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Cartesian Coordinates"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Cartesian coordinates describe points in space based on perpendicular axis lines that meet at a singlle point of orign, where any point's position is described based on the distance to the orgin along xyz axis"
"### Geodesic Coordinates\n",
"\n",
"TODO"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Geodesic to Cartesian Coordinates\n",
"### Cartesian Coordinates\n",
"\n",
"Cartesian coordinates describe points in space based on perpendicular axis lines that meet at a singlle point of orign, where any point's position is described based on the distance to the orgin along xyz axis\n",
"\n",
"**Geodesic to Cartesian Coordinates**\n",
"\n",
"Assuming the earth's radius is 6378137 meters\n",
"```\n",
"x = radius * cos(latitude) * cos(longitude)\n",
"y = radius * cos(latitude) * sin(longitude)\n",
"z = radius * sin(latitude)\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Spherical Coordinates"
"z = radius * sin(latitude)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Spherical Coordinates\n",
"\n",
"Spherical coordinates describe points in space based on three values: radial distance (rho, r) along the radial line between point and the origin, polar angle (theta, θ) between the radial line and the polar axis, and azimuth angle (phi, φ) which is the angle of rotation of the radial line around the polar axis. With a fixed radius, the 3-point coordinates (r, θ, φ) provide a coordiante along a sphere\n",
"\n",
"- Radial distance: distance from center to surface of sphere\n",
Expand All @@ -141,16 +120,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Polar Coordinates"
"## Polar Coordinates\n",
"\n",
"TODO"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -841,7 +815,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Plot Points on Map"
"## Plot Coordinates on a World Map"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Imports"
]
},
{
Expand All @@ -854,6 +835,13 @@
"from cartopy import crs as ccrs, feature as cfeature"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### World Map"
]
},
{
"cell_type": "code",
"execution_count": 81,
Expand Down Expand Up @@ -890,6 +878,13 @@
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### United States Map"
]
},
{
"cell_type": "code",
"execution_count": 82,
Expand Down Expand Up @@ -926,34 +921,6 @@
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -966,26 +933,29 @@
"metadata": {},
"source": [
"## Summary\n",
"Add one final `---` marking the end of your body of content, and then conclude with a brief single paragraph summarizing at a high level the key pieces that were learned and how they tied to your objectives. Look to reiterate what the most important takeaways were.\n",
"\n",
"Coordinates on the Earth are measured in many different types of coordinate systems: Geodesic (latitude/longitude), cartesian, spherical, and polar. These coordinates will make future calculations simpler by converting a 2D coordinate like latitude/longitude into a 3D space that can be used for vector calculations\n",
"\n",
"In Python, coordinates can be mapped on to a world map via Matploblib and Cartopy\n",
"\n",
"### What's next?\n",
"Let Jupyter book tie this to the next (sequential) piece of content that people could move on to down below and in the sidebar. However, if this page uniquely enables your reader to tackle other nonsequential concepts throughout this book, or even external content, link to it here!"
"\n",
"Great Circle arcs and paths\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Resources and references\n",
"Finally, be rigorous in your citations and references as necessary. Give credit where credit is due. Also, feel free to link to relevant external material, further reading, documentation, etc. Then you're done! Give yourself a quick review, a high five, and send us a pull request. A few final notes:\n",
" - `Kernel > Restart Kernel and Run All Cells...` to confirm that your notebook will cleanly run from start to finish\n",
" - `Kernel > Restart Kernel and Clear All Outputs...` before committing your notebook, our machines will do the heavy lifting\n",
" - Take credit! Provide author contact information if you'd like; if so, consider adding information here at the bottom of your notebook\n",
" - Give credit! Attribute appropriate authorship for referenced code, information, images, etc.\n",
" - Only include what you're legally allowed: **no copyright infringement or plagiarism**\n",
" \n",
"Thank you for your contribution!"
"## Resources and references\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
Loading

0 comments on commit ac2eb06

Please sign in to comment.