Skip to content

Commit 70b8079

Browse files
committed
docs: add api workflow guides and jupyter notebooks
This also: - enable MyST-NB for rendering and executing Markdown and Jupyter notebooks - configure notebook execution settings for docs builds - add workflow guides to documentation navigation and index - link workflow guides from getting started and usage guides
1 parent 84fbc86 commit 70b8079

17 files changed

+10899
-11
lines changed

docs/source/conf.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
"sphinx.ext.autodoc",
3535
"sphinx.ext.intersphinx",
3636
# third-party extensions
37-
"myst_parser",
38-
# "myst_nb",
37+
# "myst_parser", # imported by myst_nb automatically
38+
"myst_nb",
3939
"autodoc2",
4040
"sphinx_copybutton",
4141
"sphinx_inline_tabs",
@@ -47,7 +47,8 @@
4747
# The suffix of source filenames.
4848
source_suffix = {
4949
".rst": "restructuredtext",
50-
".md": "markdown",
50+
".md": "myst-nb",
51+
".ipynb": "myst-nb",
5152
}
5253

5354
# The master toctree document.
@@ -95,6 +96,16 @@
9596
]
9697
myst_heading_anchors = 3
9798

99+
# -- MyST-NB execution configuration ------------------------------------------
100+
# https://myst-nb.readthedocs.io/en/latest/configuration.html#config-intro
101+
102+
nb_execution_mode = "force"
103+
nb_execution_timeout = 300
104+
nb_execution_raise_on_error = True
105+
106+
nb_output_stderr = "show"
107+
nb_merge_streams = True
108+
98109

99110
# -- Options for autodoc2 -------------------------------------------------
100111
# https://sphinx-autodoc2.readthedocs.io/en/latest/config.html

docs/source/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,6 @@ memory usage: 43.7+ KB
226226

227227
This guide has provided you with the fundamental steps to install and use the `gfw-api-python-client` for making basic API requests.
228228

229-
To further explore the capabilities of our APIs (`4Wings`, `Vessels`, `Events`, `Insights`, `Datasets`, `References`, etc.), please refer to the detailed [Usage Guides](usage-guides/index). These guides delve into specific use cases and demonstrate how to effectively leverage the `gfw-api-python-client` for your data exploration needs.
229+
To further explore the capabilities of our APIs (`4Wings`, `Vessels`, `Events`, `Insights`, `Datasets`, `References`, etc.), please refer to the detailed [Usage Guides](usage-guides/index) and [Workflow Guides](workflow-guides/index). These guides delve into specific use cases and demonstrate how to effectively leverage the `gfw-api-python-client` for your data exploration needs.
230230

231231
Happy coding and data exploring!

docs/source/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ The `gfw-api-python-client` simplifies access to Global Fishing Watch (GFW) data
1414
getting-started
1515
installation
1616
usage-guides/index
17+
workflow-guides/index
1718
```
1819

1920
```{toctree}
@@ -49,6 +50,10 @@ To learn about how to use `gfw-api-python-client`, check out the following resou
4950
- [Insights API](usage-guides/insights-api)
5051
- [Datasets API](usage-guides/datasets-api)
5152
- [References Data API](usage-guides/references-data-api)
53+
- [Workflow Guides](workflow-guides/index)
54+
- [Analyze apparent fishing effort in Senegalese EEZ](workflow-guides/workflow-01-analyze-apparent-fishing-effort-senegalese-eez)
55+
- [Analyze apparent fishing effort in Argentinian EEZ](workflow-guides/workflow-02-analyze-apparent-fishing-effort-argentinian-eez)
56+
- [Analyze a fleet in Ghanaian EEZ](workflow-guides/workflow-03-analyze-fleet-in-ghanaian-eez)
5257

5358
If you find bugs, need help, or want to contribute, check out the following resources:
5459

docs/source/usage-guides/4wings-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ The 4Wings API often requires specifying geographic regions. You can use the [Re
374374

375375
## Next Steps
376376

377-
Explore the [Usage Guides](index) for other API resources to understand how you can combine the reporting and statistical capabilities of the 4Wings API with vessel information, event data, and more. Check out the following resources:
377+
Explore the [Usage Guides](index) and [Workflow Guides](../workflow-guides/index) for other API resources to understand how you can combine the reporting and statistical capabilities of the 4Wings API with vessel information, event data, and more. Check out the following resources:
378378

379379
- [Vessels API](vessels-api)
380380
- [Events API](events-api)

docs/source/usage-guides/datasets-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ memory usage: 60.6+ KB
169169

170170
## Next Steps
171171

172-
Explore the [Usage Guides](index) for other API resources. Check out the following resources:
172+
Explore the [Usage Guides](index) and [Workflow Guides](../workflow-guides/index) for other API resources. Check out the following resources:
173173

174174
- [4Wings API](4wings-api)
175175
- [Vessels API](vessels-api)

docs/source/usage-guides/events-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ Please be aware that the accuracy and completeness of the event data can vary. R
219219

220220
## Next Steps
221221

222-
Explore the [Usage Guides](index) for other API resources to understand how you can combine event data with information about vessels, and more. Check out the following resources:
222+
Explore the [Usage Guides](index) and [Workflow Guides](../workflow-guides/index) for other API resources to understand how you can combine event data with information about vessels, and more. Check out the following resources:
223223

224224
- [4Wings API](4wings-api)
225225
- [Vessels API](vessels-api)

docs/source/usage-guides/insights-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ memory usage: 180.0+ bytes
9898

9999
## Next Steps
100100

101-
Explore the [Usage Guides](index) for other API resources to understand how you can combine vessel insights with event data, vessel details, and more. Check out the following resources:
101+
Explore the [Usage Guides](index) and [Workflow Guides](../workflow-guides/index) for other API resources to understand how you can combine vessel insights with event data, vessel details, and more. Check out the following resources:
102102

103103
- [Vessels API](vessels-api)
104104
- [Events API](events-api)

docs/source/usage-guides/references-data-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ memory usage: 1.4+ KB
178178

179179
## Next Steps
180180

181-
Explore the [Usage Guides](index) for other API resources to understand how you can combine reference data with dynamic information about events, vessels, and more. Check out the following resources:
181+
Explore the [Usage Guides](index) and [Workflow Guides](../workflow-guides/index) for other API resources to understand how you can combine reference data with dynamic information about events, vessels, and more. Check out the following resources:
182182

183183
- [4Wings API](4wings-api)
184184
- [Vessels API](vessels-api)

docs/source/usage-guides/vessels-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ memory usage: 188.0+ bytes
198198

199199
## Next Steps
200200

201-
Explore the [Usage Guides](index) for other API resources to understand how you can combine vessel data with information about events, and more. Check out the following resources:
201+
Explore the [Usage Guides](index) and [Workflow Guides](../workflow-guides/index) for other API resources to understand how you can combine vessel data with information about events, and more. Check out the following resources:
202202

203203
- [4Wings API](4wings-api)
204204
- [Events API](events-api)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Workflow Guides
2+
3+
The sections below provide detailed instructions on how to combine Global Fishing Watch APIs to build powerful **workflows** and **applications** for a variety of **use cases** using the [gfw-api-python-client](https://github.com/GlobalFishingWatch/gfw-api-python-client). For additional context and expanded explanations, refer to the [API Workflows Guide (PDF)](https://globalfishingwatch.org/our-apis/assets/2025_GFW_API_Workflows.pdf), and [API Workflows](https://globalfishingwatch.org/our-apis/documentation#api-workflows) pages in the [GFW API documentation](https://globalfishingwatch.org/our-apis/documentation#introduction).
4+
5+
6+
> **Note:** See the [Datasets](https://globalfishingwatch.org/our-apis/documentation#api-dataset), [Data Caveats](https://globalfishingwatch.org/our-apis/documentation#data-caveat), and [Terms of Use](https://globalfishingwatch.org/our-apis/documentation#terms-of-use) pages in the [GFW API documentation](https://globalfishingwatch.org/our-apis/documentation#introduction) for details on GFW data, API licenses, and rate limits.
7+
8+
```{toctree}
9+
:maxdepth: 1
10+
11+
workflow-01-analyze-apparent-fishing-effort-senegalese-eez
12+
workflow-02-analyze-apparent-fishing-effort-argentinian-eez
13+
workflow-03-analyze-fleet-in-ghanaian-eez
14+
```

0 commit comments

Comments
 (0)