I’m excited to share with you a cheatsheet I made for Plotnine , a Python package for data visualization. It covers nearly everything you need to know to turn your data into ad-hoc plots and publication-ready figures using the powerful grammar of graphics. Plotnine cheatsheet, front Plotnine cheatsheet, back I’ve probably never spent so much time on just two pages, even with the ggplot2 cheatsheet…
I’m excited to share that I’m stepping into a new role at Posit PBC as Head of Developer Relations! 🎉 First order of business: establishing a DevRel Guild. Here’s why: At Posit, we’re fortunate to have many developers who are drawn to DevRel activities: giving great talks, writing insightful blog posts, creating excellent documentation, and engaging with our open source community. Rather than…
Today is my last day at Xomnia . As I take a moment to reflect on the past two incredible years, a few personal highlights stand out: Falling in love with Polars and writing a book about it with my colleague Thijs Nieuwdorp : Python Polars: The Definitive Guide Helping our client Alliander completely overhaul their pipeline with Polars: Advocating for more Polars at Alliander Attending PyData…
The final animation was a runner up in the 2024 Plotnine Plotting Contest . Understanding your data is key in any data science project. Visualization is useful for this, but can be challenging when the data has a high dimensionality. This includes complex data such as text, images, and sensor measurements. You could create a scatter plot matrix, but this can only show how any two features interact…
Hey there, you’re reading an updated version of a post I published way back in 2019. Because of the 2024 Plotnine contest and the recent release of Polars 1.0 , I decided to freshen things up. Changes include: Upgrade to Plotnine version 0.13.6 (from version 0.6.0) Use Polars 1.0 instead of Pandas (I’m coindicentally writing the chapter “From Pandas to Polars” at the moment.) Wrap long…
I’m excited to announce, on my 40 th birthday no less, that I’ll be writing another book. But this time I won’t be alone. Thijs Nieuwdorp is joining me in this adventure that we’ve dubbed Python Polars: The Definitive Guide . We expect our upcoming O’Reilly title to be about 400 pages and to hit the shelves in Q3 2024. Fun fact: Thijs and I are colleagues at Xomnia , the very birthplace of Polars.…
Inspired by Julia Evans’ post A list of programming playgrounds , I decided to revive a playground I made about 10 years ago. Back in the old days, when many data sets were still small, stem-and-leaf plots were a common method of representing quantitative data. John Tukey’s Exploratory Data Analysis , which popularized stem-and-leaf plots, has a nice example on the cover. EDA’s cover contains a…
Embrace the Command Line was a three-week cohort-based course, created to help developers and researchers getting started with the command line. It was roughly based on my book Data Science at the Command Line . I had the pleasure of running the course twice in 2022, with students from all over the world. During the course, I really got to know the students and their situation, allowing me to…
To improve my iTerm+tmux experience, I’ve set up a whole bunch of key mappings. Rather than defining these manually, I wrote a Python script to generate the corresponding JSON programmatically. An expressive oil painting of a desk with a couple of keyboards and a monitor showing the unix terminal. Fixing prefixing I’ve recently refound my love for tmux . Having multiple terminal panes, windows,…
Because I’ve closed my company Data Science Workshops , I don’t need its 16 domains names any more. They’ve served me well over the years and I hope to find a new owner who can put them to good use. They are as follows: https://datascienceworkshops.com https://datascienceworkshops.nl https://datascienceworkshops.be https://datascienceworkshops.uk https://datascienceworkshops.de…
I have decided to close my company Data Science Workshops B.V. For nearly seven years I’ve had the pleasure of teaching a variety of data science topics to hundreds of students. If you’re curious which workshops I gave and to which clients, you can browse an archived copy of the Data Science Workshops website . Should you have any other questions, please don’t hesitate to reach out . Inspiration…
I’m building a Lego table for my kids (and, I’ll admit, a little bit for myself). It’s still a work in progress, but here are already some highlights of this hobby project. First things first: plywood I don't have a fancy ventilation system, so it's important to mask up I made a router jig to cut some clean arcs For these two sides. I have used pocket hole joints (and glue). The holes will be…
There’s something exciting about scraping a website to build your own dataset! For R, there’s the rvest package to harvest (i.e., scrape) static HTML. When the HTML elements you’re interested in are spread across multiple pages and you know the URLs of the pages up front (or you know how many pages you need to visit and the URLs are predictable), you can most likely use a for loop or one of the…
Because ggplot2 is the de-facto package for creating high-quality data visualizations in R, and has been for a long time, there exists many excellent resources for learning ggplot2, including: the ggplot2 website , a two-page cheat sheet (PDF), Stack Overflow , and books such as ggplot2: Elegant Graphics for Data Analysis and R Graphics Cookbook: Practical Recipes for Visualizing Data . A ggplot2…
Plotnine is a data visualisation package for Python based on the grammar of graphics, created by Hassan Kibirige. Its API is similar to ggplot2 , a widely successful R package by Hadley Wickham and others . [1] I’m a staunch proponent of ggplot2. The underlying grammar of graphics is accompanied by a consistent API that allows you to quickly and iteratively create different types of beautiful data…
I’ve created a Python script called csv2vw which, as the name implies, converts CSV data to Vowpall Wabbit’s input format . csv2vw is available on GitHub in my dsutils repository . A screenshot of csv2vw applied to the Iris dataset Here are some examples to give you an idea of what it can do: Leave label values as is: $ csv2vw spam.csv --label target Relabel values ‘ham’ to 0 and ‘spam’ to 1: $…
This interview first appeared on Data Science Weekly in October 2014. We recently caught up with Jeroen Janssens, author of Data Science at the Command Line . We were keen to learn more about his background, his recent work at YPlan and his work creating both the book and the (related) Data Science Toolbox project… Hi Jeroen, firstly thank you for the interview. Let's start with your background…
Did you know that there’s a Bash kernel for Jupyter Notebook? It even displays inline images. To give you a glimpse, the code cell below makes an API call to memegenerator.net , which generates images on demand. From the response, the URL of the generated image is extracted using jq and subsequently downloaded using curl . The output is then displayed as an inline image by piping it to a function…
Data scientists love to create interesting models and exciting data visualisations. However, before they get to that point, usually much effort goes into obtaining, scrubbing, and exploring the required data. I argue that the Unix command-line, although invented decades ago, remains a powerful environment for processing data. It provides a read-eval-print loop (REPL) that is often much more…
My Ph.D., which I completed earlier this year, was about outlier selection and one-class classification . During this time I learned about quite a few machine learning algorithms; especially about outlier-selection algorithms and one-class classifiers. With some help of Ferenc Huszár and Laurens van der Maaten , I also came up with a new outlier-selection algorithm called Stochastic Outlier…
Data science is OSEMN (pronounced as awesome). That is, it involves Obtaining, Scrubbing, Exploring, Modelling, and iNterpreting data. As a data scientist, I spend quite a bit of time on the command-line, especially when there’s data to be obtained, scrubbed, or explored. And I’m not alone in this. Recently, Greg Reda discussed how the classics (e.g., head, cut, grep, sed, and awk) can be used for…
The Visual Revenue platform provides a number of great tools that support editors to optimize their front page. Instant Headline Testing is one of those tools. The quality of a story headline greatly influences its click-through-rate (CTR). Front page editors therefore spend a lot of thought coming up with the right wording to engage their readers. But on digital media, headlines do not have to be…
Update (6-9-2013) This code is now also available as the “jump” plugin in oh-my-zsh . Update (18-8-2013): Thanks to the many useful suggestions in the discussion on Hacker News , I have added (1) quotes to the code, (2) a section about tab completion, and (3) a note for macOS users. Like many others, I spend most of my day behind a computer. In order make the most of it (and to keep my body from…