Dash-Forecast allows you to easily build forecasting dashboards.
Why Dash-Forecast
Judgment and decision making research shows that visual tools are an easy and effective way to boost forecasting accuracy. Dash-Forecast is a high-level API for creating beautiful forecasting visualizations and statistical summaries.
Installation
$ pip install dash-fcast
Quickstart
In just a few lines of code, we'll create an app that gives you:
- An intuitive 'bounds and moments' forecast elicitation
- An editable data table representation of the forecast
- Probability density function and cumulative distribution function line plots of the forecast
- A bar plot of the data table
Create a file app.py:
import dash_fcast as fcast
import dash_fcast.distributions as dist
import dash
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
import plotly.graph_objects as go
from dash.dependencies import Input, Output
app = dash.Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP])
app.layout = html.Div([
html.Br(),
dist.Moments(id='Forecast'),
html.Br(),
fcast.Table(
id='Table',
datatable={'editable': True, 'row_deletable': True},
row_addable=True
),
html.Div(id='graphs')
], className='container')
dist.Moments.register_callbacks(app)
fcast.Table.register_callbacks(app)
@app.callback(
Output('graphs', 'children'),
[
Input(dist.Moments.get_id('Forecast'), 'children'),
Input(fcast.Table.get_id('Table'), 'children')
]
)
def update_graphs(dist_state, table_state):
distribution = dist.Moments.load(dist_state)
table = fcast.Table.load(table_state)
pdf = go.Figure([distribution.pdf_plot(), table.bar_plot('Forecast')])
pdf.update_layout(transition_duration=500, title='PDF')
cdf = go.Figure([distribution.cdf_plot()])
cdf.update_layout(transition_duration=500, title='CDF')
return [dcc.Graph(figure=pdf), dcc.Graph(figure=cdf)]
if __name__ == '__main__':
app.run_server(debug=True)
Run your application with:
$ python app.py
Open your browser and navigate to http://localhost:8050/.
Citation
@software{bowen2020dash-fcast,
author = {Dillon Bowen},
title = {Dash-Forecast},
url = {https://dsbowen.github.io/dash-fcast/},
date = {2020-09-11},
}
License
Users must cite this package in any publications which use it.
It is licensed with the MIT License.
Acknowledgements
The following collaborators deserve special acknowledgement:
- David Melgin, for the bounds and moments elicitation
- Ezra Karger, whose non-parametric elicitation methods helped inspire my 'tabular elicitation'
- Sarah Reed, for feedback on the front-end design
I would also like to thank the Tetlock Lab, whose weekly presentations inspired various aspects of this package, including Zachary Jacobs' and Ian Lustick's 'first approximation algorithm', Scott Page's multi-model thinking, and Annie Duke's presentation on intuitively eliciting predictions.
Metadata
Release files for dash-fcast 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dash-fcast-0.0.5.tar.gz | 13.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dash_fcast-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.2 kB
Release files / dash-fcast-0.0.5.tar.gz
| Download URL | dash-fcast-0.0.5.tar.gz |
|---|---|
| Size | 13.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
99e767a9715e0d32b133fa13e0517354c22ad201183859a799f8d52dde6ea058
|
|
BLAKE2b-256 checksum How to use checksums |
c26cb6a2413e2bbfaf18369c47b1fa1c989b9dd2bdc509919a65df663c95f3e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.8
|
Release files / dash_fcast-0.0.5-py3-none-any.whl
| Download URL | dash_fcast-0.0.5-py3-none-any.whl |
|---|---|
| Size | 19.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7407b1990d523cc81511a6ee2c78f9cf207b2a2d4374b855d604bf4d124ddbe3
|
|
BLAKE2b-256 checksum How to use checksums |
b5ad1b726fecdc3abfecb092e7e1b8c775197dca4619cad4eacb1bb2cc40e1ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.8
|