PyCon 2024: Making Beautiful, Publication Quality Tables is Possible in 2024
The Great Tables crew is excited to share that we’ll be presenting on tables at PyCon 2024! If you’re around and want to meet, be sure to stop by the Posit Booth, or reach out on linkedin to Rich or Michael!
The talk, Making Beautiful, Publication Quality Tables is Possible in 2024 happened on May 17, 2024. You can watch the recording on YouTube.
In addition to the talk, there are two other events worth mentioning:
- The 2024 Table Contest
- Our upcoming table workshop at posit::conf 2024
What’s the presentation about?
Publication quality tables are a critical form of data visualization, that is easy to miss in favor of charts and graphs. We’re excited to focus on how…
- tables are used in areas like sports and medicine.
- Great Tables provides a systematic approach to structuring, styling, and formatting tables.
- nanoplots combine the trend-emphasizing of graphs with the compactness of a table.
Throughout the presentation, we’ll focus on making this example from a fictitious coffee device shop (notebook):
Sales of Coffee Equipment | ||||||
---|---|---|---|---|---|---|
Product | Revenue | Profit | Monthly Sales | |||
Amount | Percent | Amount | Percent | |||
Grinder | $904K | 3% | $568K | 4% |
|
|
Moka pot | $2.05M | 7% | $181K | 1% |
|
|
Cold brew | $289K | 1% | $242K | 2% |
|
|
Filter | $404K | 1% | $70.0K | 0% |
|
|
Drip machine | $2.63M | 9% | $1.37M | 9% |
|
|
AeroPress | $2.60M | 9% | $1.29M | 9% |
|
|
Pour over | $846K | 3% | $365K | 2% |
|
|
French press | $1.11M | 4% | $748K | 5% |
|
|
Cezve | $2.51M | 9% | $1.97M | 13% |
|
|
Chemex | $3.14M | 11% | $818K | 6% |
|
|
Scale | $3.80M | 13% | $2.91M | 20% |
|
|
Kettle | $756K | 3% | $618K | 4% |
|
|
Espresso Machine | $8.41M | 29% | $3.64M | 25% |
|
|
Total | $29.4M | 100% | $14.8M | 100% |
Each row of this table is a product sold over the past year (with a total at the bottom).
Note three important pieces:
- Icons help people quickly identify products of interest.
- Background color distinguishes between revenue and profit measures.
- The nanoplot on the right shows a tiny bargraph for monthly sales over the past year. This makes it easy to spot trends, and can be hovered over to get exact values.
Critically, the code for this table used the DataFrame library Polars, which makes it really easy to select rows and columns for styling.
What’s next?
The 2024 Table Contest
The world’s premier display table contest—the 4th annual Table Contest draws competitors from near and far, to showcase the latest and greatest examples in table presentation.
The contest was a great success! On July 1, 2024 we announced the 2024 winners and honorable mentions. Check ’em out!
posit::conf() workshop
We held a posit::conf() 2024 workshop, and you can find the materials at the Making Tables with gt and Great Tables repo.
If you’re curious about making beautiful, publication quality tables in Python or R, do have a look at the resources at that GitHub repository.
We covered the following table topics:
- Create table components and put them together (e.g., header, footer, stub, etc.)
- Format cell values (numeric/scientific, date/datetime, etc.)
- Rearranging columns and handling column value alignments
- Styling the table, either through data values or on a more granular level
- Adding icons, plots, images, and incorporating your own HTML
- and more!
Extra resources
Check out these resources to learn more about the wild and beautiful life of display tables:
Hope all your tables are great!
A huge thanks to all the people who have contributed to Great Tables over the past year. It’s been a really incredible journey!