<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Data on Robin's blog</title><link>https://kaveland.no/tags/data/</link><description>Recent content in Data on Robin's blog</description><generator>Hugo -- 0.145.0</generator><language>en-us</language><lastBuildDate>Wed, 28 May 2025 19:30:00 +0200</lastBuildDate><atom:link href="https://kaveland.no/tags/data/index.xml" rel="self" type="application/rss+xml"/><item><title>Using SQL to turn all the buses around</title><link>https://kaveland.no/posts/2025-05-28-turning-the-bus-sql/</link><pubDate>Wed, 28 May 2025 19:30:00 +0200</pubDate><guid>https://kaveland.no/posts/2025-05-28-turning-the-bus-sql/</guid><description>&lt;p>I have a small hobby project over at &lt;a href="https://kollektivkart.arktekk.no/">kollektivkart.arktekk.no&lt;/a> that is for visualizing changes in public transit in Norway. For some time I&amp;rsquo;ve been wanting to do some visualizations on public transit lines. For example, plot the mean delay at each stop used by a line over time.&lt;/p>
&lt;p>When trying to do some concept work on this, I discovered a puzzle in the data! Many lines go in two opposite directions. Here in Trondheim, Line 3 goes from Loholt to Hallset, but also from Hallset to Loholt. The way I can tell these apart is to look up the &lt;em>direction&lt;/em> in the data. Within a line, there can be variations in each direction. Some services might skip some stops, or depending on how you look at it, others visit extra stops. But these are variations on a theme, and it probably makes sense to group them together to preserve our sanity and not get 12 different plots for each line—2 should be plenty!&lt;/p></description></item><item><title>Why would I use DuckDB for that?</title><link>https://kaveland.no/posts/2025-03-02-can-i-just-use-postgres/</link><pubDate>Sun, 02 Mar 2025 00:00:00 +0000</pubDate><guid>https://kaveland.no/posts/2025-03-02-can-i-just-use-postgres/</guid><description>&lt;p>The past few weeks I&amp;rsquo;ve been experimenting with &lt;a href="https://duckdb.org/">DuckDB&lt;/a>, and as a consequence I&amp;rsquo;ve ended up talking about it a lot as well. I&amp;rsquo;m not going to lie, I really like it! However, experienced programmers will rightly be skeptical to add new technology that overlaps with something that already works great. So why not just use postgres?&lt;/p>
&lt;p>Well, I really like postgres too, and I think you should consider just using it! But despite both of these technologies being all about tabular data, they&amp;rsquo;re not really for the same kinds of problems. I think DuckDB is primarily an analysis or ELT tool, and it really excels in this space. postgres &lt;em>can&lt;/em> do a lot of the things that DuckDB can do, but not nearly as fast or easily. I wouldn&amp;rsquo;t want to use DuckDB for a transactional workload, so it&amp;rsquo;s not going to replace postgres for anything that I use it for.&lt;/p></description></item><item><title>Norwegian Wild Salmon Fishing Ban of 2024</title><link>https://kaveland.no/posts/2024-06-27-salmon-ban/</link><pubDate>Thu, 27 Jun 2024 00:00:00 +0000</pubDate><guid>https://kaveland.no/posts/2024-06-27-salmon-ban/</guid><description>&lt;p>For this blog post, I&amp;rsquo;m trying something different. This is a jupyter notebook that I&amp;rsquo;m using to study some data, and just dumping my brain out in text. If I can easily export this to a format that works with &lt;a href="https://gohugo.io/">hugo&lt;/a>, this might become a common occurrence.&lt;/p>
&lt;p>For this one, I&amp;rsquo;m leaving the code in. There isn&amp;rsquo;t that much of it, but I think it&amp;rsquo;s fun to show how much visualization per
line of code you can get with &lt;a href="https://seaborn.pydata.org/">seaborn&lt;/a> and &lt;a href="https://pandas.pydata.org/">pandas&lt;/a>.&lt;/p></description></item><item><title>Friends don't let friends export to CSV</title><link>https://kaveland.no/posts/2024-03-10-friends-dont-let-friends-export-csv/</link><pubDate>Sun, 24 Mar 2024 00:00:00 +0000</pubDate><guid>https://kaveland.no/posts/2024-03-10-friends-dont-let-friends-export-csv/</guid><description>&lt;p>I worked for a few years in the intersection between data science and software
engineering. On the whole, it was a really enjoyable time and I&amp;rsquo;d like to have
the chance to do so again at some point. One of the least enjoyable experiences
from that time was to deal with big CSV exports. Unfortunately, this file format
is still very common in the data science space. It is easy to understand why &amp;ndash;
it seems to be ubiquitous, present everywhere, it&amp;rsquo;s human-readable, it&amp;rsquo;s less
verbose than options like JSON and XML, it&amp;rsquo;s super easy to produce from almost
any tool. What&amp;rsquo;s not to like?&lt;/p></description></item></channel></rss>