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

Create how to on custom local components #343

Merged
merged 4 commits into from Oct 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions docs/getting_started/core_concepts.md
Expand Up @@ -2,7 +2,7 @@

:::{admonition} What is the purpose of this page?
:class: important
This conceptual overview of creating a Lumen dashboard is meant to help you start generalizing what you achieved in the tutorial ([Build a dashboard](build_dashboard)). After this page you should start building your own dashboard. As you build, consult the relevant `How-to` guides or `Reference` pages, as needed.
This conceptual overview of creating a Lumen dashboard is meant to help you start generalizing what you achieved in the tutorial ([Build a dashboard](build_dashboard)). After this page you should start building your own dashboard. As you build, consult the relevant [How-to](../how_to/) guides or [Reference](../reference/) pages, as needed.
:::

## Overview
Expand Down Expand Up @@ -107,7 +107,7 @@ sources:
table_penguin: https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-07-28/penguins.csv
```

See the [Source Reference](lumen.sources.Source) for other source `types` and for the relevant `parameters`.
See the [Source Reference](lumen.sources.Source) for other source types and for the relevant parameters.

## Pipelines (data manipulation)
The `pipelines` section is where you list all the ways that you want the data to be **filtered** or **transformed**. If you don't need the data to be manipulated, you can just exclude this section.
Expand Down Expand Up @@ -138,7 +138,7 @@ pipelines:
field: island
```

See the [Filter Reference](../architecture/filter) for other filter `types` and for the relevant `parameters`.
See the [Filter Reference](../architecture/filter) for other filter types and for the relevant parameters.

### Transforms
Within the pipeline section, you can also apply a `transform` to the data, such as selecting only certain columns of the data.
Expand Down Expand Up @@ -170,7 +170,7 @@ pipelines:
columns: ['species', 'island', 'sex', 'year', 'bill_length_mm', 'bill_depth_mm']
```

See the [Transform Reference](../architecture/transform) for other transform `types` and for the relevant `parameters`.
See the [Transform Reference](../architecture/transform) for other transform types and for the relevant parameters.

## Targets (views)

Expand Down Expand Up @@ -240,7 +240,7 @@ targets:
height: 350
```

See the [View Reference](../architecture/view) for other view `types` and for the relevant `parameters`.
See the [View Reference](../architecture/view) for other view types and for the relevant parameters.

## Advanced Functionality
The following sections are meant to introduce you some of Lumen's advanced functionality. If you want to implement some of these features, explore their associated [How to](../how_to/index) guides for complete recipes.
Expand Down
14 changes: 9 additions & 5 deletions docs/getting_started/installation.md
@@ -1,7 +1,11 @@
# {octicon}`desktop-download;2em;sd-mr-1` Installation

## Setup
Lumen works with Python 3 on Linux, Windows, and Mac.
The recommended way to install Lumen is using the [conda](http://conda.pydata.org/docs/) command provided by [Anaconda](https://www.anaconda.com) or [Miniconda](http://conda.pydata.org/miniconda.html). You can also install Lumen using [Pip](https://pypi.org/).

The recommended way to install Lumen is using the [conda](https://docs.conda.io/projects/conda/en/latest/index.html) command that is included in the installation of [Anaconda or Miniconda](https://conda.io/projects/conda/en/latest/user-guide/install/index.html). To help you choose between Anaconda and Miniconda, review [this page](https://docs.conda.io/projects/conda/en/latest/user-guide/install/download.html#anaconda-or-miniconda). Completing the installation for either Anaconda or Miniconda will also install Python.

If you are not installing Anaconda or Miniconda, you can download Python directly from [Python.org](https://www.python.org/downloads/). In this case, you can install Lumen using [pip](https://pip.pypa.io/en/stable/), which comes with Python.

## Installing Lumen
1. Open up a terminal (Powershell if you are on Windows).
Expand All @@ -10,15 +14,15 @@ The recommended way to install Lumen is using the [conda](http://conda.pydata.or
- If this is not the case, you are not running the latest version, which may cause problems. TODO: *guidance on what to do if version is incorrect*

::::{tab-set}
:::{tab-item} Conda
:::{tab-item} conda
:sync: conda

``` bash
conda install -c pyviz -c conda-forge lumen -y
```

:::
:::{tab-item} Pip
:::{tab-item} pip
:sync: pip

``` bash
Expand All @@ -38,15 +42,15 @@ Source component specification declared unknown type 'intake'.
...install the missing package in the same way you did lumen:

::::{tab-set}
:::{tab-item} Conda
:::{tab-item} conda
:sync: conda

``` bash
conda install -c pyviz -c conda-forge intake -y
```

:::
:::{tab-item} Pip
:::{tab-item} pip
:sync: pip

``` bash
Expand Down
6 changes: 3 additions & 3 deletions docs/how_to/chain_python.md
Expand Up @@ -2,15 +2,15 @@

:::{admonition} What does this guide solve?
:class: important
When working with Lumen in Python, you can build branching pipelines that allow you have different processing steps and views on the same source data. For instance, you may want to display a table of filtered data alongside a view of aggregated data.
This guide will show you how to branch a pipeline in Python so that you can have different processing steps and views on the same source data.
:::

## Overview
The primary tool to create a branch of a Lumen pipeline is to use the `pipeline.chain` method. By chaining the `Pipeline` we can apply new processing steps while retaining the shared computations up to that point.
The primary tool to create a branch of a Lumen pipeline is to use the `pipeline.chain` method. By chaining the `Pipeline` we can apply new processing steps while retaining the shared computations up to that point. For instance, you may want to display a table of filtered data alongside a view of aggregated data.


## Initiating the pipeline
Let's start by creating a pipeline up to a branching point. See the [Build a dashboard in Python](ht_pipeline_python) how-to guide for a walkthrough of these initial steps.
Let's start by creating a pipeline up to a branching point. See the [Build a dashboard in Python](pipeline_python) how-to guide for a walkthrough of these initial steps.

```python
from lumen.pipeline import Pipeline
Expand Down
6 changes: 3 additions & 3 deletions docs/how_to/deploy.md
Expand Up @@ -2,20 +2,20 @@

:::{admonition} What does this guide solve?
:class: important
Whether you are still developing or have already completed your specification file, deployment creates a visual instantiation of your dashboard.
Whether you are still developing or have already completed your specification file, this guide will show you how to visualize your dashboard.
:::

Run the code below to start a Lumen server that displays your dashbboard in a browser window. Change `<dashboard.yaml>` to the path of your YAML specification file.


```console
``` bash
lumen serve <dashboard.yaml> --show
```

## Deploy during development

While developing with Lumen, it is a great idea to visualize the progress of your dashboard. The code below uses `--autoreload` to refresh the view every time you save your YAML specification file.

```console
``` bash
lumen serve <dashboard.yaml> --show --autoreload
```
3 changes: 2 additions & 1 deletion docs/how_to/index.md
Expand Up @@ -8,7 +8,6 @@ Lumen's How to Guides provide step by step recipes for solving essential problem
* [Override parameter defaults]()
* [Use variables and references]()
* [Set up authentication]()
* [Use local components]()

**Data intake**
* [Cache data](data_intake/cache)
Expand All @@ -23,6 +22,7 @@ Lumen's How to Guides provide step by step recipes for solving essential problem
* [Download data from dashboard](data_outtake/download_data)

**Build custom components**
* [Reference custom components](local_components)

**Lumen in Python**
* [Build a dashboard in Python](pipeline_python)
Expand All @@ -40,4 +40,5 @@ Build a dashboard in Python<pipeline_python>
Branch a pipeline in Python<chain_python>
Download data from dashboard<data_outtake/download_data>
Cache data<data_intake/cache>
Reference custom components<local_components>
```