Skip to content
This repository has been archived by the owner on Mar 16, 2022. It is now read-only.

Commit

Permalink
Merge pull request #25 from jhegele/development
Browse files Browse the repository at this point in the history
v0.3.0
  • Loading branch information
jhegele authored Jun 15, 2020
2 parents 90ec713 + 0535b0d commit 4f87071
Show file tree
Hide file tree
Showing 60 changed files with 1,437 additions and 453 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.DS_Store
.envrc
node_modules
.python-version
.python-version
testing
.vscode
5 changes: 3 additions & 2 deletions app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

PUSHER_SECRET = os.environ.get('PUSHER_SECRET')

# OAuth Handling
@app.route('/auth/<channel_id>')
def auth(channel_id):
session['channel_id'] = channel_id
Expand Down Expand Up @@ -108,10 +109,10 @@ def api_get_prediction():
r = requests.post(url, json=payload, headers=headers)
return jsonify(r.json())

@app.route('/', defaults={'path': None})
@app.route('/<path:path>')
@app.route('/', defaults={'path': None})
def index(path):
return render_template('index.html')
return render_template('index.html')

if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000, debug=True)
76 changes: 76 additions & 0 deletions app/static/bundle.a4731e25abe3a96764a6.js

Large diffs are not rendered by default.

76 changes: 0 additions & 76 deletions app/static/bundle.js

This file was deleted.

16 changes: 1 addition & 15 deletions app/templates/index.html
Original file line number Diff line number Diff line change
@@ -1,15 +1 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Einstein Scenarios for Tableau</title>
</head>

<body>
<div id="root"></div>
<script src="{{ url_for('static', filename='bundle.js') }}" type="text/javascript"></script>
</body>

</html>
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Einstein Scenarios for Tableau</title></head><body><div id="root"></div><script src="../static/bundle.a4731e25abe3a96764a6.js"></script></body></html>
18 changes: 11 additions & 7 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
* Getting Started
* [Quick Start](quick-start.md)
* [How It Works](how-it-works.md)
* [Quick Start](./get-started/quick-start.md)
* [Video Walkthrough](./get-started/video-walkthrough.md)
* [How It Works](./get-started/how-it-works.md)
* Configuration
* [Global](config-global.md)
* [Predict](config-predict.md)
* [Explain](config-explain.md)
* [Preferences](./configuration/preferences.md)
* [Global](./configuration/global.md)
* [Predict](./configuration/predict.md)
* [Explain](./configuration/explain.md)
* [Action](./configuration/action.md)
* Help
* [FAQ](faq.md)
* [About](about.md)
* [FAQ](./help/faq.md)
* [About](./help/about.md)
* [Tips & Tricks](./help/tips-tricks.md)
* [Change Log](change-log.md)
18 changes: 18 additions & 0 deletions docs/change-log.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Change Log

## v0.3.0
_Released on:_

This is a major (beta) release consisting of the following new features, enhancements, and bug fixes:

* Added support for Einstein's next best actions via a new Action page
* Added preference configuration for the new Action page
* Added suggested mappings during setup process based on string similarity
* Reworked preferences controls to make them more concise and consistent
* Updated build process to provide greater automation

## v0.2.4
_Released on: 03 June 2020_

This is a minor release consisting of critical bug fixes detailed below.

* Added error messaging when Einstein returns no predictive models. Previously the extension would just spin endlessly.

## v0.2.3
_Released on: 02 June 2020_

Expand Down
47 changes: 0 additions & 47 deletions docs/config-explain.md

This file was deleted.

9 changes: 0 additions & 9 deletions docs/config-global.md

This file was deleted.

31 changes: 0 additions & 31 deletions docs/config-predict.md

This file was deleted.

21 changes: 21 additions & 0 deletions docs/configuration/action.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Action Configuration Options

The options below control how content is displayed on the Action page within the extension. The Action page handles displaying Einstein's "next best action" suggestions. Within the extension, these explanations (if more than one suggestion is returned by Einstein) are navigable using a set of arrows. The arrow color is set based on the accent color which can be configured in the [Global Preferences](./global.md).

![Action Configuration](../static/img/action-settings.png)

## Primary Text Formatting

Specify the value, unit, and weight of the text displayed at the top of the results. [More info on text configuration](../shared/text-config.md).

## Primary Number Formatting

Specify the number of decimal places, whether to use the thousands separator or not, and whether the number displayed at the top of the results should be treated as a percentage. [More info on number formatting](../shared/number-formatting.md).

## Secondary Text Formatting

Specify the value, unit, and weight of the text displayed below the primary text. [More info on text configuration](../shared/text-config.md).

## Secondary Number Formatting

Specify the number of decimal places, whether to use the thousands separator or not, and whether the number (or numbers) displayed as part of the text below the primary text should be treated as a percentage. [More info on number formatting](../shared/number-formatting.md).
26 changes: 26 additions & 0 deletions docs/configuration/explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Explain Configuration Options

The options below control how content is displayed on the Explain page within the extension. The Explain page consists, primarily, of two columns of information: the Value column which provides the impact value of what is shown in the Explanation column, and the Explanation column which provides the column and value or values that drove the impact detailed in the Value column.

![Explain Configuration](../static/img/explain-settings.png)

## Arrow Colors

Sets the color used when each arrow is displayed. The up arrow is displayed for any result where the value is > 0 while the down arrow is used for any result where the value is < 0.

## Header Text Formatting

Specify the value, unit, and weight of the text displayed in the table header. [More info on text configuration](../shared/text-config.md).

## Body Text Formatting

Specify the value, unit, and weight of the text displayed in the table body. [More info on text configuration](../shared/text-config.md).

## Value Field - Number Formatting

Specify the number of decimal places, whether to use the thousands separator or not, and whether the number displayed in the value column should be treated as a percentage. [More info on number formatting](../shared/number-formatting.md).

## Explanation Field - Number Formatting

Specify the number of decimal places, whether to use the thousands separator or not, and whether the number (or numbers) displayed in the explanation column should be treated as a percentage. [More info on number formatting](../shared/number-formatting.md).

19 changes: 19 additions & 0 deletions docs/configuration/global.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Global Configuration Options

## Background Color

This setting controls the background color of your extensions.

![Background Color](../static/img/global-background-color.png)

## Text Color

This setting controls both the text color _and_ the color of the loading indicator (spinner) in your extension.

![Text Color](../static/img/global-text-color.png)

## Accent Color

This setting controls the accent color that is used in the page selection menu at the top of the extension as well as on the navigation arrows in the Action page.

![Accent Color](../static/img/global-accent-color.png)
21 changes: 21 additions & 0 deletions docs/configuration/predict.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Predict Configuration Options

The options below control how content is displayed on the Predict page within the extension.

![Predict Configuration](../static/img/predict-settings.png)

## Text Size

Specify the value, unit, and weight of the text displayed on the Predict page. [More info on text configuration](../shared/text-config.md).

## Prefix

Text to be added _before_ the prediction result in the extension.

## Suffix

Text to be added _after_ the prediction result in the extension.

## Number Formatting

Specify the number of decimal places, whether to use the thousands separator or not, and whether the number should be treated as a percentage. [More info on number formatting](../shared/number-formatting.md).
17 changes: 17 additions & 0 deletions docs/configuration/preferences.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Preferences

## How to access Preferences

Click the gear icon on the bottom right of the extension window _after_ the extension has been setup.

![Open Preferences](../static/img/open-prefs.png)

## Navigation

Use the settings drop down to navigate to different settings.

![Settings Navigation](../static/img/prefs-navigate.png)

## Authoring vs viewing

Within Tableau extensions, there are two modes: authoring and viewing. Preferences are available to be set _only_ in authoring mode so, if you aren't seeing a gear icon or the gear icon doesn't show up in your published workbook, that is to be expected.
File renamed without changes.
6 changes: 5 additions & 1 deletion docs/quick-start.md → docs/get-started/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,8 @@ I like to use EA (for Einstein Analytics) as a prefix to make it easy to find th

# Adding the Extension

At this point, you're ready to add the extension to your dashboard. Drag an extension object onto your dashboard and select the TREX file you previously downloaded. The extension will walk you through the setup process.
At this point, you're ready to add the extension to your dashboard. Drag an extension object onto your dashboard and select the TREX file you previously downloaded. The extension will walk you through the setup process.

# Deploying / Managing Extensions on Tableau Server/Online

Please refer to Tableau's Knowledge Base for details on how to [use Dashboard Extensions](https://help.tableau.com/current/pro/desktop/en-us/dashboard_extensions.htm) and/or how to [manage extensions](https://help.tableau.com/current/server/en-us/dashboard_extensions_server.htm) on Tableau Server or Online.
12 changes: 12 additions & 0 deletions docs/get-started/video-walkthrough.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

<div style="width: 100%; height: 100% important!; display: flex; flex-direction: column; justify-content: center; align-items: center;">
<div style="display: flex; flex-direction: row;">
<div style="font-weight: bold; font-size: 25px; line-height: 100px;">Video Walkthrough</div>
</div>
<div>
Thanks to Tim Dries from <a href="https://www.biztory.com">Biztory</a>, one of Tableau's awesome partners, for putting this together. This is a great walkthrough that includes elements of building your model in Einstein as well as setting up the extension.
</div>
<div style="margin-top: 12px; width: 800px; height: 600px;">
<iframe width="560" height="500" src="https://www.youtube.com/embed/PrJOyozrOw0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
</div>
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions docs/help/tips-tricks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Tips & Tricks

## Update Prediction Based on Mark Selection

Credit to my colleagues John Demby and Curt Budd for figuring this one out. Partial credit to my colleague Andrea Gossett for asking about it before anyone else. Zero credit to me for totally missing the boat on this one. Now that everyone (except me) has received appropriate credit, let's discuss how this works.

This extension is linked to parameters but there may be cases where you want to use the extension and trigger updates based on mark selection on a worksheet within your dashboard. The key to making this work are parameter actions. Parameter actions were introduced in 2019.2 and they allow you to update a parameter based on, for example, selecting a mark in a worksheet. So, you can set a parameter action to update one or more of the parameters that you've linked to your Einstein model and get updated predictions based on selections the user makes.

**A couple of very important notes on this topic**:

* You must set your parameter actions at the _dashboard_ level and not at the worksheet level.
* Parameters in Tableau are "sticky" so if you click on a mark where a parameter receives a new value, then click on a mark where that parameter should be set to `null`, the parameter will retain the old, non-null value. (Thanks to Lovekesh Babbar for figuring this one out as it would have taken me forever to diagnose this!)
27 changes: 27 additions & 0 deletions docs/shared/number-formatting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Number Formatting

In the Preferences Configuration dialog, dashboard authors have access to various controls that allow specification of number formats throughout the extension. Generally, these controls will take this form:

![Number formatting control](../static/img/number-formatting.png)

## Decimal places

The first control in the image above allows specification of decimal places. Currently, the extension allows between 0 and 6 (inclusive) decimal places:

| Number of Decimal Places | Drop Down Value |
|:-:|---|
| 0 | `1` |
| 1 | `1.0` |
| 2 | `1.00` |
| 3 | `1.000` |
| 4 | `1.0000` |
| 5 | `1.00000` |
| 6 | `1.000000` |

## Thousands separator

The second control is a checkbox that allows the user to specify whether a separator is used for numbers greater than or equal to 1,000. Currently, there is no mechanism to specify what character is used as a separator so setting this to true will _always_ use a comma as the separator.

## Percentage

The third and final control in the image above is a checkbox that allows the user to specify whether the number represented should be treated as a percentage. Selecting this will multiply your number by 100 and append a % sign to the end of what is displayed. Currently, this behavior cannot be modified.
Loading

0 comments on commit 4f87071

Please sign in to comment.