Skip to content

Commit

Permalink
Various small fixes to the docs (#1261)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximlt authored Jan 28, 2024
1 parent 68e0b35 commit a4abb10
Show file tree
Hide file tree
Showing 20 changed files with 80 additions and 36 deletions.
28 changes: 7 additions & 21 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,33 +34,19 @@ jobs:
MOZ_HEADLESS: 1
DISPLAY: ":99.0"
steps:
- uses: actions/checkout@v3
- uses: holoviz-dev/holoviz_tasks/[email protected]
with:
fetch-depth: "100"
- uses: conda-incubator/setup-miniconda@v2
with:
mamba-version: "*"
channels: pyviz/label/dev,conda-forge
- name: Fetch unshallow
run: git fetch --prune --tags --unshallow -f
name: Documentation
python-version: "3.11"
channels: pyviz,conda-forge,nodefaults
envs: "-o doc -o examples"
cache: true
conda-update: true
- name: Set and echo git ref
id: vars
run: |
echo "Deploying from ref ${GITHUB_REF#refs/*/}"
echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: conda setup
run: |
conda config --remove channels defaults
conda create -n test-environment python=3.8 pyctdev
- name: doit develop_install
run: |
conda activate test-environment
conda list
doit develop_install -o doc -o examples --conda-mode=mamba
- name: doit env_capture
run: |
conda activate test-environment
doit env_capture
- name: bokeh sampledata
run: |
conda activate test-environment
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ ENV/
doc/**/*.rst
doc/**/*.ipynb
doc/**/*.json
# thumbnails are downloaded on the fly
doc/reference/*/thumbnails/
# this dir contains the whole website and should not be checked in on main
builtdocs/
# mystnb
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
default_stages: [commit]
repos:
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.6.3
rev: 1.7.1
hooks:
- id: nbqa-flake8
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.5.0
hooks:
- id: check-builtin-literals
- id: check-case-conflict
Expand All @@ -20,13 +20,13 @@ repos:
exclude: (\.min\.js$|\.svg$)
- id: trailing-whitespace
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
rev: 7.0.0
hooks:
- id: flake8 # See 'setup.cfg' for args
args: [hvplot]
files: hvplot/
- repo: https://github.com/hoxbro/clean_notebook
rev: v0.1.10
rev: v0.1.14
hooks:
- id: clean-notebook
- repo: https://github.com/codespell-project/codespell
Expand Down
File renamed without changes
File renamed without changes
3 changes: 3 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
version = release = base_version(hvplot.__version__)
nbbuild_cell_timeout = 600

exclude_patterns = ['governance']

html_static_path += ['_static']

html_css_files += [
Expand Down Expand Up @@ -75,6 +77,7 @@
]
}
},
'thumbnail_url': 'https://assets.holoviz.org/hvplot/thumbnails',
}

nbsite_analytics = {
Expand Down
2 changes: 1 addition & 1 deletion doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ align: center

**`.interactive()` to turn data pipelines into widget-based interactive applications**

By starting a data pipeline with [`.interactive()`](getting_started/interactive.html) you can then inject widgets into an extract and transform data pipeline. The pipeline output dynamically updates with widget changes, making data exploration in Jupyter notebooks in particular a lot more efficient.
By starting a data pipeline with [`.interactive()`](./getting_started/interactive) you can then inject widgets into an extract and transform data pipeline. The pipeline output dynamically updates with widget changes, making data exploration in Jupyter notebooks in particular a lot more efficient.

::::{tab-set}

Expand Down
Binary file removed doc/reference/xarray/thumbnails/contour.png
Binary file not shown.
Binary file removed doc/reference/xarray/thumbnails/contourf.png
Binary file not shown.
Binary file removed doc/reference/xarray/thumbnails/image.png
Binary file not shown.
14 changes: 14 additions & 0 deletions examples/getting_started/interactive.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "66dddf49-c70a-4ed1-98e7-76703b82fa34",
"metadata": {},
"source": [
"hvPlot isn't only a plotting library, it is dedicated to make data exploration easier. In this guide you will see how it can help you to get better control over your data pipelines. We define a *data pipeline* as a series of commands that *transform* some data, such as aggregating, filtering, reshaping, renaming, etc. A data pipeline may include a *load* step that will provide the input data to the pipeline, e.g. reading the data from a data base. \n",
Expand All @@ -14,6 +15,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "e14aa834-59c2-4f13-af01-dcd653505350",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -23,6 +25,7 @@
},
{
"cell_type": "markdown",
"id": "d8f29718-cf71-4f84-b4be-3e1e3c4b8786",
"metadata": {},
"source": [
"We load a dataset and get a handle on its unique *air* variable."
Expand All @@ -31,6 +34,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "d60b6b3a-2a1e-4094-94b2-9cc8e5ea5242",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -41,6 +45,7 @@
},
{
"cell_type": "markdown",
"id": "63da0ac9-3b01-4c55-8855-6436e4575aca",
"metadata": {},
"source": [
"We want to better understand the temporal evolution of the air temperature over different latitudes compared to a baseline. The data pipeline we build includes:\n",
Expand All @@ -57,6 +62,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "5f7905ce-da82-43f2-8b27-84c5b868a588",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -78,6 +84,7 @@
},
{
"cell_type": "markdown",
"id": "61d07327-08ee-45c4-b5cc-c08adf50f046",
"metadata": {},
"source": [
"Without `.interactive()` we would manually change the values of `LATITUDE` and `ROLLING_WINDOW` to see how they affect the pipeline output. Instead we create two widgets with the values we expect them to take, we are basically declaring beforehand our parameter space. To create widgets we import [Panel](https://panel.holoviz.org) and pick two appropriate widgets from its [Reference Gallery](https://panel.holoviz.org/reference/index.html#widgets)."
Expand All @@ -86,6 +93,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "81684639-5d17-43aa-90b3-2590ed951272",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -97,6 +105,7 @@
},
{
"cell_type": "markdown",
"id": "a49cb2c6-2e69-4a17-9ca3-ceb918460765",
"metadata": {},
"source": [
"Now we instantiate an *Interactive* object by calling `.interactive()` on our data. This object mirrors the underlying object API, it accepts all of its natural operations. We replace the data by the interactive object in the pipeline, and replace the constant parameters by the widgets we have just created."
Expand All @@ -105,6 +114,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "55524639-5d5d-40c1-b76f-11da152fc6bd",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -114,6 +124,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "6f63c03e-79c2-4a6c-9203-2b4727894228",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -132,6 +143,7 @@
},
{
"cell_type": "markdown",
"id": "4bbe8553-f79c-4e46-9a58-93b7cdb3e92f",
"metadata": {},
"source": [
"You can see that now the pipeline when rendered doesn't only consist of its output, it also includes the widgets that control it. Change the widgets' values and observe how the output dynamically updates.\n",
Expand All @@ -144,6 +156,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "83e20794-0261-46f8-a094-1903937de550",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -154,6 +167,7 @@
},
{
"cell_type": "markdown",
"id": "c458f2a3-eeca-477f-b7c1-6b53e4d0f18c",
"metadata": {},
"source": [
"For information on using `.interactive()` take a look at the [User Guide](../user_guide/Interactive.ipynb)."
Expand Down
5 changes: 5 additions & 0 deletions examples/reference/tabular/andrewscurves.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "d8d7bf92-ae63-4122-9457-10c9ada6c6f1",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -11,6 +12,7 @@
},
{
"cell_type": "markdown",
"id": "915da73a-0a5f-4a40-aa4b-a65a6002c3e9",
"metadata": {},
"source": [
"Andrews curves provides a mechanism for visualising clusters of multivariate data.\n",
Expand All @@ -27,6 +29,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "d85a9c83-bd5d-4ac2-b1a0-0bb451a484e9",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -38,6 +41,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "780fc986-819b-4882-9c44-113b9a211d97",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -47,6 +51,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "4c721441-ecf3-4178-a55f-d43eed7d00a5",
"metadata": {},
"outputs": [],
"source": [
Expand Down
6 changes: 6 additions & 0 deletions examples/reference/tabular/lagplot.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "cb5dd3db-78c4-4a01-ba07-37f718f7425a",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -13,13 +14,15 @@
},
{
"cell_type": "markdown",
"id": "c7af165e-4231-49ea-81d7-d07ad81a05da",
"metadata": {},
"source": [
"Lag plots are most commonly used to look for patterns in time series data."
]
},
{
"cell_type": "markdown",
"id": "815a51ab-5f61-4bea-bb56-e11a0f117718",
"metadata": {},
"source": [
"Given the following time series:"
Expand All @@ -28,6 +31,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "283adbd9-3c42-4cb7-8c57-1d0e9fe1d25f",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -40,6 +44,7 @@
},
{
"cell_type": "markdown",
"id": "8a877a7d-11cb-4bcb-81e4-3936f061ba65",
"metadata": {},
"source": [
"A lag plot with `lag=1` returns:"
Expand All @@ -48,6 +53,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "52be318e-fccd-461d-9813-c231b6f2997c",
"metadata": {},
"outputs": [],
"source": [
Expand Down
5 changes: 5 additions & 0 deletions examples/reference/tabular/parallelcoordinates.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "98539b4c-af81-4ad7-9fe5-8e1b828ee3d8",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -11,6 +12,7 @@
},
{
"cell_type": "markdown",
"id": "0b7674d1-b972-4b43-9e96-18c0d0fcc125",
"metadata": {},
"source": [
"Parallel coordinates are a common way of visualizing and analyzing high-dimensional datasets.\n",
Expand All @@ -21,6 +23,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "b524875d-aaa6-40da-8b1a-9f42f636da6a",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -32,6 +35,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "02fa9997-0c52-4ee8-890f-9ce2a6352e3f",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -41,6 +45,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c737ec55-2c45-40dd-92d0-69464607bf7f",
"metadata": {},
"outputs": [],
"source": [
Expand Down
Loading

0 comments on commit a4abb10

Please sign in to comment.