| # Plotly's Figure Friday challenge. See more info here: https://community.plotly.com/t/figure-friday-2024-week-52/89593 | |
| import pandas as pd | |
| from dash import Dash, dcc, Input, Output, State, callback, _dash_renderer, ctx | |
| import dash_mantine_components as dmc | |
| import dash_ag_grid as dag | |
| import plotly.express as px | |
| _dash_renderer._set_react_version("18.2.0") | |
| dmc.add_figure_templates(default="mantine_dark") |
| from fastapi import FastAPI, Request | |
| from pydantic import BaseModel | |
| from typing import List, Dict, Any, Union, Optional | |
| from dash import Dash, html, Input, Output, ctx, set_props | |
| import dash | |
| from flask import Flask, has_request_context | |
| import flask | |
| from flask.testing import EnvironBuilder | |
| from werkzeug.datastructures import Headers |
| # Plotly's Figure Friday challenge. See more info here: https://community.plotly.com/t/figure-friday-2024-week-32/86401 | |
| import dash | |
| import pandas as pd | |
| from dash import Dash, html, dcc, Input, Output, State, callback, Patch | |
| import dash_bootstrap_components as dbc | |
| import dash_ag_grid as dag | |
| import plotly.graph_objects as go | |
| app = Dash(external_stylesheets=[dbc.themes.BOOTSTRAP]) |
| # Plotly's Figure Friday challenge. See more info here: https://community.plotly.com/t/figure-friday-2024-week-28/84980 | |
| import pandas as pd | |
| import plotly.express as px | |
| from dash import Dash, html, dcc, Input, Output | |
| import dash_bootstrap_components as dbc | |
| import dash_ag_grid as dag | |
| import plotly | |
| df = pd.read_excel( |
| import dash | |
| from dash import Dash, dash_table, dcc, html | |
| from dash.dependencies import Input, Output | |
| import pandas as pd | |
| import plotly.express as px | |
| df = px.data.tips() | |
| df["id"] = df.index | |
| """ | |
| See other MWEs for images and text icons here: https://github.com/plotly/dash-table/pull/916 | |
| Css in assets folder: (not tested yet maybe move the body font-size somewhere else since it will affect the entire app like this) | |
| .cell-markdown > p { | |
| display: flex; | |
| height: 100%; | |
| justify-content: center; | |
| align-items: center; |
| from dash import Dash, dcc, html, Input, Output | |
| import dash_bootstrap_components as dbc | |
| import spacy | |
| from spacy import displacy | |
| import base64 | |
| nlp = spacy.load("en_core_web_sm") |
| """ | |
| From dash community question: | |
| https://community.plotly.com/t/how-can-i-allow-users-to-select-which-comparison-variables-to-display-on-a-chart/69124 | |
| """ | |
| from dash import Dash, html, dcc, Input, Output | |
| import plotly.express as px | |
| import pandas as pd | |
| import dash_bootstrap_components as dbc |
| import dash | |
| from dash import Dash, dcc, html, Input, Output | |
| import dash_bootstrap_components as dbc | |
| import requests | |
| app = Dash(__name__, external_stylesheets=[dbc.themes.SUPERHERO, dbc.icons.BOOTSTRAP]) | |
| coins = ["bitcoin", "ethereum", "binancecoin", "ripple"] | |
| interval = 6000 # update frequency - adjust to keep within free tier | |
| api_url = "https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd" |