# check out https://dash.plotly.com/ for Dash documentation
# check out https://plotly.com/python for Plotly documentation
# check out Plotly High Level refernece docs: https://plotly.com/python-api-reference/plotly.express.html
from dash import Dash, Input, Output, callback, dcc, html
import pandas as pd
import plotly.express as px
# Best to grab the raw csv data link from GitHub
df = pd.read_csv('https://raw.githubusercontent.com/jragh/plotlymeetup/refs/heads/main/June_2025/Fire%20Incidents%20Data%20Raw.csv')
"""
Use this sectiont to slice, clean, filter data to prepare it for the figure
"""
# Build the figure
fig = px.scatter(df, x="Number_of_responding_personnel",
y="Estimated_Dollar_Loss", log_x=True, log_y=True, )
app = Dash(__name__)
app.layout = html.Div(
children=[
# assign the fig to the 'figure' property to view
dcc.Graph(figure=fig)
]
)