{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Dashboard Themes" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Import and Declare Charts" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from cuxfilter import charts\n", "import cuxfilter\n", "from bokeh import palettes\n", "cux_df = cuxfilter.DataFrame.from_arrow('./data/146M_predictions_v2.arrow')\n", "\n", "geoJSONSource='https://raw.githubusercontent.com/rapidsai/cuxfilter/GTC-2018-mortgage-visualization/javascript/demos/GTC%20demo/src/data/zip3-ms-rhs-lessprops.json'\n", "\n", "charts_list = [\n", " cuxfilter.charts.choropleth( x='zip', color_column='delinquency_12_prediction', color_aggregate_fn='mean',\n", " elevation_column='current_actual_upb', elevation_factor=0.00001, elevation_aggregate_fn='sum',\n", " geoJSONSource=geoJSONSource, data_points=1000, tooltip_include_cols=['zip', 'current_actual_upb']),\n", " cuxfilter.charts.bar('delinquency_12_prediction',data_points=50)\n", "]\n", "sidebar_list = [cuxfilter.charts.range_slider('borrower_credit_score',data_points=50), cuxfilter.charts.drop_down('dti')]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Themes Types" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Default" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "d = cux_df.dashboard(charts_list, sidebar=sidebar_list, layout=cuxfilter.layouts.feature_and_base, theme=cuxfilter.themes.default, title=\"Theme - Default\")" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "# d.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "![theme-showcase-default](../../../_images/theme-showcase-default.png)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Dark" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "d = cux_df.dashboard(charts_list, sidebar=sidebar_list, layout=cuxfilter.layouts.feature_and_base, theme=cuxfilter.themes.dark, title=\"Theme - Dark\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "![theme-showcase-dark](../../../_images/theme-showcase-dark.png)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Rapids" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "d = cux_df.dashboard(charts_list, sidebar=sidebar_list, layout=cuxfilter.layouts.feature_and_base, theme=cuxfilter.themes.rapids, title=\"Theme - Rapids\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "![theme-showcase-rapids](../../../_images/theme-showcase-rapids.png)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Rapids Dark" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "d = cux_df.dashboard(charts_list, sidebar=sidebar_list, layout=cuxfilter.layouts.feature_and_base, theme=cuxfilter.themes.rapids_dark, title=\"Theme - Rapids\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "![theme-showcase-rapids-dark](../../../_images/theme-showcase-rapids-dark.png)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.12" } }, "nbformat": 4, "nbformat_minor": 4 }