Hassan Kibirige
Data Scientist and Software Engineer at Posit PBC
Hassan is Data Scientist and Software Engineer at Posit, PBC where he works on open-source packages for data science.
He is passionate about data visualisation and other things scientific computing. Among others, he is the author and maintainer of Plotnine, a python visualisation library that is based on the principal of The Grammar of Graphics. He also knows Queen is the greatest band, deny it and you give him a sheer heart attack.
Abstract
## Description Every plot and every table you have ever seen is doing the same thing: mapping data to visual properties. A scatter plot maps two columns to x and y positions. A colour-coded table maps values to a colour scale. A bar chart and a pie chart are the same mapping in different coordinate systems. Once you see this, you stop memorising chart types and start *reasoning* about visualisation. You can look at any graphic — a plot, a table, a dashboard — and ask one question: **"what maps to what?"** This workshop teaches that single idea and gives you two modern Python tools to put it into practice: [plotnine](https://plotnine.org/) for plots (the grammar of graphics in Python) and [great-tables](https://posit-dev.github.io/great-tables/articles/intro.html) for publication-quality tables. Along the way, we will use a case study of a table error in the Uganda 2024 Census that triggered a national crisis — to show why visualisation is not decoration: it is how you think clearly about data. ## Learner Personas While this session is suitable for a general and there is something in it for everyone, these are the personas we kept front-of-mind while designing it. **Amara** — A data analyst at an NGO in Nairobi. She uses pandas daily and makes plots with matplotlib by copying Stack Overflow snippets. She can get a chart to *work* but never to *look right*, and suspects there's a more principled way to think about it. She wants a mental model, not more recipes. **Kwame** — A computer science master's student in Accra. He is comfortable with Python but has never thought about data visualisation as a discipline. He has presented tables by screenshotting pandas DataFrames. He wants to produce publication-quality outputs for his thesis. **Fatima** — A journalist who recently started using Python for data analysis. She can write basic pandas code but finds plotting libraries intimidating. She wants to understand *why* certain charts work so she can make better editorial decisions about graphics in her stories. ## Objectives By the end of this workshop, participants will be able to: 1. Explain what it means to "map data to visual properties" and apply this idea to reason about any visualisation 2. Have a tool to build layered, publication-quality plots using plotnine's grammar of graphics 3. Have a tool to build structured, publication-quality tables using great-tables 4. Decide when a table is more effective than a plot (and vice versa) 5. Spot data errors through deliberate visualisation choices