Figure Friday 2025 - week 25

join the Figure Friday session on June 27, at noon Eastern Time, to showcase your creation and receive feedback from the community.

Honoring our first Plotly Meetup in Raleigh NC, led by @ThomasD21M on June 25, we’ve decided to highlight a dataset from the city of Raleigh. The dataset includes all pending and approved permits related to buildings, as well as non-construction inspections permits (issued in the past 180 days).

Let’s support our Raleigh Plotly community by giving them a few Plotly and Dash examples that they can learn from.

Things to consider:

  • what can you improve in the app or sample figure below (scatter map with list of attributes)?
  • would you like to tell a different data story using a different graph?
  • can you create a different Dash app?

Sample figure:

Code for sample figure:
from dash import Dash, dcc
import dash_ag_grid as dag
import plotly.express as px
import pandas as pd

df = pd.read_csv("Building_Permits_Issued_Past_180_Days.csv")
df = df.dropna(subset=['fee'])

fig = px.scatter_map(df, lat="latitude_perm", lon="longitude_perm", size='fee', color='fee',
                        map_style='carto-voyager',zoom=9, height=550)

grid = dag.AgGrid(
    rowData=df.to_dict("records"),
    columnDefs=[{"field": i, 'filter': True, 'sortable': True} for i in df.columns],
    dashGridOptions={"pagination": True},
    # columnSize="sizeToFit"
)

app = Dash()
app.layout = [
    grid,
    dcc.Graph(figure=fig)
]


if __name__ == "__main__":
    app.run(debug=False)

Participation Instructions:

  • Create - use the weekly data set to build your own Plotly visualization or Dash app. Or, enhance the sample figure provided in this post, using Plotly or Dash.
  • Submit - post your creation to LinkedIn or Twitter with the hashtags #FigureFriday and #plotly by midnight Thursday, your time zone. Please also submit your visualization as a new post in this thread.
  • Celebrate - join the Figure Friday sessions to showcase your creation and receive feedback from the community.

:point_right: If you prefer to collaborate with others on Discord, join the Plotly Discord channel.

Data Source:

Thank you to the Raleigh Open Data for the data.

3 Likes

Super excited for the upcoming Plotly Meetup in Raleigh, NC this week!

I’ll be walking the group through a simple Dash app I built using local building permit data. You can check it out here on Py.cafe:
:link: PyCafe - Dash - Simple Permit Visualizer

As we wrap up the session, I’ll be pointing everyone toward Figure Friday – Week 25, where the Plotly community is already doing amazing things with this same dataset. Hoping a few new folks jump in, share their builds, or join the live call next Friday.

Huge thanks to the Plotly team for supporting this!!

from dash import Dash, html, dcc
import pandas as pd
import plotly.express as px

app = Dash(__name__)

# Load dataset
url = "https://raw.githubusercontent.com/plotly/Figure-Friday/refs/heads/main/2025/week-25/Building_Permits_Issued_Past_180_Days.csv"
df = pd.read_csv(url)

# Group and count by workclass
workclass_counts = df.groupby("workclass").size().reset_index(name="Count")

# Create bar chart
fig = px.bar(
    workclass_counts,
    x="workclass",
    y="Count",
    title="Permits Issued by Work Class",
    labels={"workclass": "Work Class", "Count": "Number of Permits"}
)

app.layout = html.Div([
    html.H2("Permits by Work Class", style={"textAlign": "center"}),
    dcc.Graph(figure=fig)
])

5 Likes

Good luck, @ThomasD21M . I believe the py.cafe link you shared needs to be updated. It doesn’t lead to the building permit app.

Updated, I have no idea how that happened! Should be good now.

Hello everyone! I’m still playing with the dataset, but here’s a sample of my contribution. I hope you like it.

Github




6 Likes

@Xavi.LL , This is really cool! Wonder what skewed the Wednesday Costs so much? This isn’t necessarily the day the work will be done but the application date? What field did you use for that, curious?

1 Like

HI @ThomasD21M. Thanks for your comment. To compute the days I have used the field CreationDate.

1 Like

I really like the map in dark mode.:star_struck:

3 Likes

I liked the map above so much that I made one myself, but I’ll still make some changes🙂

2 Likes

What a cool way to explore the data, @Xavi.LL . Nice job!

But signaling out the permits issued for building outside the city, I noticed that February is a big month for them. I wonder if it’s the same year over year (assuming we had more data for that).

I personally prefer the dark map as well. For theme consistency purposes, I might be better to have the whole app in dark mode. Right now, it’s just the map.

1 Like

Thanks @adamschroeder ! For the whole app in black you can use the dash-customizable-app-style plugin using Dash Hooks ;).

Try it on PyCafe

1 Like

Very beautiful @Ester ! I imagine that, if you change the filters will change the map too right? Amazing idea!