# 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/plotly/Figure-Friday/refs/heads/main/2025/week-25/Building_Permits_Issued_Past_180_Days.csv')
# Use this sectiont to slice, clean, filter data to prepare it for the figure
df = df.dropna(subset=['fee'])
# Build the figure
fig = px.scatter_map(df, lat="latitude_perm", lon="longitude_perm", size='fee', color='fee',
map_style='carto-voyager',zoom=9, height=550)
app = Dash(__name__)
app.layout = html.Div(
children=[
# assign the fig to the 'figure' property to view
dcc.Graph(figure=fig)
]
)