The Best Graph

Conveying information is a bit of an art and science. Many of us have written reports, graphs, charts, etc. at some point in our career. We’ve likely created some good ones and some bad ones that our clients love or hate. Perhaps if you’re like me, you make a small attempt and then ask someone else to clean it up for you.

However, visualizations are important. In the modern world, many people want a visualization instead of a table of data, or at least alongside a table. That means we want to ensure we are conveying information well and not just picking the prettiest picture.

One interesting thing to consider is how different types of graphs affect how we process information. There was a post from Madiera Data that looked at how different graphs helped someone analyze the data. It starts with bar graphs, which have been very popular in the last few years. They are appearing in lots of business dashboards, news articles, and more. They can be useful in some situations, but not all. Especially when trying to compare the different segments.

Instead, other visualizations can be better. The article shows table graphs are working well. I conducted my own experiment with visuals, and I found a line graph was easier to use. However, that was for my data. Your data might need different visuals if you use it differently.

I don’t think there is a best graph, but there can be a best graph for a particular data set and a particular client(s). The way someone makes decisions based on a visual could dictate what works best. That’s my advice: work with your clients.

For good general advice, I think you should lean on https://www.storytellingwithdata.com/, Meagan, and resources such as Edward Tufte, who have spent a lot of time thinking, experimenting, and understanding how to convey information visually. You could learn a lot from them.

Steve Jones

Listen to the podcast at Libsyn, Stitcher, Spotify, or iTunes.

Posted in Editorial | Tagged | 1 Comment

Stacked Bar Charts vs. Line Graphs–Which is Better?

I ran across an interesting post from Rita Fainshtein that looked at the different types of graphs for a set of data. I thought that was interesting, so I ran my own experiment. I found for my data, a line graph was better, but let me know what you think.

My data set was simple, a few players across a few events and their number of kills. I coach volleyball and I’m always trying to present stats in a useful way. Here was the small set I picked.

2023-05-04 15_26_09-Kills.xlsx - Excel

Nothing fancy, but this is similar to what was in the article. From here, I asked EXcel to insert a chart from the Recommended Charts and picked the first one. This is what I saw:

2023-05-04 15_17_10-Kills.xlsx - Excel

This isn’t bad, though it’s hard to compare across events. I see how A did for all these events, but if I want to see if she was better or worse than K, I’m guessing on some of the lines.

Next, I opened Power BI. I added my data set and then dragged a value to the visualizations. The default chart I got was similar to Excel. Not a great visual. It’s Ok, but suffers from similar problems.

2023-05-04 14_05_01-Untitled - Power BI Desktop

I moved the player and the event from the axis to the legend, because that’s more appropriate for this dataset.

I changed the type to the first stacked chart I saw, and got this, which I think isn’t useful at all. There isn’t a way to measure 100% in this case, so normalizing all data in this way is very unhelpful.

2023-05-04 14_06_13-Untitled - Power BI Desktop

I switched to a normal stacked chart, which is OK, but for Crossroads, is A or K better? Does E outperform A in Aurora? Very hard to tell.

2023-05-04 14_06_18-Untitled - Power BI Desktop

Next I tried a line chart. This I think is the best for my analysis. I can see the events across the bottom and the colors for the players make it easy for me to compare them with each other. I am not color blind, so this works for me.

I can also compare the players individually across events by following the lines. I can see them all trending in similar ways, which is expected. If the team does well, everyone does better. If not, then not. I also see the outlier where E outperformed A.

2023-05-04 14_05_45-Untitled - Power BI Desktop

Summary

The line graph worked best for me. However, the data I am looking at lends itself to a comparison that looks good here. The stacked bar chart isn’t as clean when drawing conclusions, but that’s because I’m looking at the different segments across items, not necessarily with segments for the same item. Of course, I think that would be hard as well.

Ultimately the data you are analyzing and how the analysis is used will affect what you think is better. Work with the people who use your visual to make a decision and let them help guide you for the best visual.

In this case, A loves seeing she’s ahead almost all the time.

Posted in Blog | Tagged , | 5 Comments

Database APIs

Creating an API and using an API server of some sort has become a very common way of working with modern software, especially distributed systems. Whether developers move to microservices or something else, they often make more use of APIs than ever before. At Redgate, I’ve watched us work on new products, often beginning with a basic API at the command line and evolving from there.

However, does the database need an API? This article thinks so, though I don’t love the piece. It seems to wander a bit amongst a few topics and doesn’t always fit together. It’s also trying to promote the Stargate API gateway for Cassandra. I don’t know if this is a good idea, or if it really helps make developers more productive, but the idea of having an API for developers makes sense.

In fact, when I work with clients I often try to get them to think of their tables as an API of sorts. With APIs, we want to rev them, but carefully. After all, we know there are dependencies from various other pieces of software, including other items inside the database. We want to be sure we don’t break anything. At least not for long, which is why DevOps and being able to release work quickly matters.

Communicating changes and coordinating work is a challenge. I was surprised by a client who used SQL Doc for this reason, to ensure everyone had up-to-date knowledge of what their schema meant. It’s also a reason I’ve taken some of the work I do with clients and built my Architecting Zero Downtime talk. Many developers think narrowly about the requirement in front of them and not about all the other dependencies and impacts. I think a bit more unit testing in databases would help here. In fact, I demonstrate sometimes how to write a test that treats your table like an API to prevent breakage.

I do agree that databases, especially relational ones can be complex. If we can simplify things for developers, especially developers new to our system, we can get more work done and hopefully, raise code quality. I don’t know that Stargate or GraphQL or anything else is better, though I have started to think LINQ is a better implementation than SQL for working with relational databases. That’s not going to change anytime soon, and plus, I need SQL to remain popular until I retire 😉

Whether you formally build an API or not, it is helpful to treat your schema like an API and make changes in the same way that you would if there were other teams depending on your interface. That’s because there likely are others who depend on what you build.

Steve Jones

Listen to the podcast at Libsyn, Stitcher, Spotify, or iTunes.

Posted in Editorial | Tagged | 2 Comments

A New Word: Trumspringa

trumspringa – n. the longing to wander off your career path in pursuit of a simple life, which is just the kind of hypnotic diversion that allows your thoughts to make a break for it and wander back to their cubicles in the city.

Such an interesting word. I know I had this when I was working at JD Edwards (and later Peoplesoft) in Denver. My wife certainly had it. In some sense, she’s made this come true and it’s no longer a longing. It’s semi true for me, though I still work at a desk.

Coping with stress and struggles have had me often thinking what else could I do. I still do this a little, though not more than just as a diversion since I have a great job. More now I look to find ways to actually wander away and try something new.

From the Dictionary of Obscure Sorrows

Posted in Blog | Tagged , | Comments Off on A New Word: Trumspringa