👋 Hi!
My career started as a plant geneticist. I dove into code progressively, and I've always been surrounded by people who were better programmers than I was.
There’s a concept they often talked about: low-level vs high-level programming. 🤔
You’ve probably heard about this too!
Today I suggest we see what it means and how it applies to dataviz.
🧩 High-level vs Low-level
A computer is just hardware that executes instructions. It performs calculations when told to. At its core, it speaks binary, using only 0s and 1s.
That’s the lowest level: the one closest to the machine.
But for us humans, speaking in 0s and 1s isn’t very convenient. So we built programming languages, which let us write human-readable commands that are later translated into machine instructions.
Some languages, like C or C++, are quite close to the machine. You often need to manage memory manually and compile your code before running it. They’re usually very fast and efficient, but require a lot of work from the programmer.
Others, like R, Python, or JavaScript, are higher-level. They handle memory and compilation for you. Easier to write, but slightly less direct in how they talk to the machine.
📊 How it matters in Dataviz
Once you pick a programming language, you typically use packages: collections of functions written in that language that make specific tasks easier.
For instance, when you use the boxplot()
function from the python Seaborn pkg, it actually calls Matplotlib code under the hood. Even if you don’t see it!
That means Seaborn is higher-level than Matplotlib.
Not “better” or “worse,” just more abstracted: it sits one layer further from the machine.
The same logic applies in the JavaScript world.
D3.js is a low-level library: it doesn’t have a barChart()
function. Instead, it gives you the tools to build one yourself.
Libraries like Vega, Vega-Lite, or Chart.js are built on top of D3, making them higher-level. They give you faster results but less flexibility.
⚖️ So, what should you use?
Lower-level tools like D3.js or Matplotlib give you full control and limitless customization, but they require more effort. You’ll need to write more code and understand how everything fits together.
This is compared to higher-level tools like Seaborn, Plotly, or Chart.js that give beautiful results quickly — often in a single line of code. But when you need something very custom… it can get painful (or even impossible).
So here’s my rule of thumb:
- For exploration or quick prototypes, start high-level.
- For production-grade visuals, custom designs, or interactive dashboards, go low-level.
I see this all the time: someone builds a quick MVP with Shiny or a chart in Plotly — and it looks great!
But when a new feature or design request comes in… they realize they need to rebuild everything from scratch. 😳
Knowing where your tool sits on this “level scale” helps you make smarter choices.
You’ll know exactly when to go fast, and when to go deep. As usual in programming, think hard before you start coding!
See you next week!
Yan
PS: If you’re lost in the jungle of tools to create charts, hit reply! I’m a passionate consultant!
PPS: There are still a couple of seats left for our 2-days workshop about dataviz with Python in december!
👋 By the way, here is how I can help!
- Master R: Join my productive R workflow online course, already helping hundreds to excel in R, Quarto, and GitHub.
- Team Training: Hire me to train your team on Data Visualization and Programming.
- Engaging Talks: Book me for short, impactful talks on Data Visualization and Programming.
Check yan-holtz.com or hit reply any time! I love hearing from you.
|
|