Plotly Interactive Graphing Demo

I was reading the “Ipsos 2023 Pride Survey Report” some while back, and while the report was interesting when it was first published all graphs were only available in a PDF. They later recreated a few of the graphs from the PDF report and published them on the introductory page with limited interactivity.

My thoughts turned to using something like PowerBI or Tableau for visualizations at first, but then I felt I’d take the opportunity to teach myself another graphing library. Enter “Plotly Dash”

First I needed to extract the data, and that was in a PDF. I was thinking about doing something fancy and programmatic for extraction, but upon examination of the PDF it really wasn’t structured internally in a consistent enough way to parse. So, I manually copied the data out, dropped it into some spreadsheets, cleaned it up, and built out a MariaDB schema. Their were already relations that were clearly in the data, but not highlighted in the report, that became obvious to me in a casual analysis during the extraction. I also determined that I might want to pull this data into a bigger project that compares other related data sets. I was getting a little ahead of myself, but it didn’t seem like much more work so into a database it went.

Then I flailed some hideous python together to see what I could do with it, and came up with this interactive graph of the data as a proof of concept. I particularly liked the feature which allows you to connect a data table with controls to the graph. “Code here.”

By the time I was done with figuring this much out, and learning just how much I still needed to learn about plotly and dash found myself busy with life and this little project went on the back burner. I can say that plotly is pretty powerful, but that power certainly comes with complexity. I’m not sure I’d dig back in to plotly again, even after this experience, and instead look at something simpler, perhaps Bokeh.

Tags: , , , , , ,