<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://picodoc.org/feed.xml" rel="self" type="application/atom+xml" /><link href="https://picodoc.org/" rel="alternate" type="text/html" /><updated>2026-10-14T15:39:17+00:00</updated><id>https://picodoc.org/feed.xml</id><title type="html">picodoc</title><subtitle></subtitle><entry><title type="html">Who needs an rdb, the trilogy</title><link href="https://picodoc.org/rdbs-suck/" rel="alternate" type="text/html" title="Who needs an rdb, the trilogy" /><published>2026-09-16T09:00:00+00:00</published><updated>2026-09-16T09:00:00+00:00</updated><id>https://picodoc.org/rdbs-suck</id><content type="html" xml:base="https://picodoc.org/rdbs-suck/"><![CDATA[<p>I’ve followed up original “Who needs an rdb?” post with two others over on the DI blog:</p>
<ul>
  <li><a href="https://dataintellect.com/blog/torq-no-stinking-rdbs/">TorQ: No stinking rdbs</a> - Adding a TorQ pack to let others easily copy my approach</li>
  <li><a href="https://dataintellect.com/blog/the-last-good-reason-for-an-rdb-the-return-of-the-attribute/">The last good reason for an rdb: the return of the attribute</a> - And an approach to have appendable attributes, and close the remaining performance gap with rdbs</li>
</ul>

<p>I wanted to call it my rdbs are shit trilogy, but I was advised against it by people who are less fun.  Hopefully people find the ideas useful!</p>]]></content><author><name></name></author><summary type="html"><![CDATA[I’ve followed up original “Who needs an rdb?” post with two others over on the DI blog: TorQ: No stinking rdbs - Adding a TorQ pack to let others easily copy my approach The last good reason for an rdb: the return of the attribute - And an approach to have appendable attributes, and close the remaining performance gap with rdbs]]></summary></entry><entry><title type="html">qless: read kdb+ data without kdb+?</title><link href="https://picodoc.org/qless/" rel="alternate" type="text/html" title="qless: read kdb+ data without kdb+?" /><published>2026-05-05T09:00:00+00:00</published><updated>2026-05-05T09:00:00+00:00</updated><id>https://picodoc.org/qless</id><content type="html" xml:base="https://picodoc.org/qless/"><![CDATA[<p>I put togther a (very) simple python tool that allows you to directly memory map and read kdb+ data on disk, without the kdb+ binary.  Have a quick look at the <a href="https://github.com/picoDoc/qless">README</a> for more info</p>]]></content><author><name></name></author><summary type="html"><![CDATA[I put togther a (very) simple python tool that allows you to directly memory map and read kdb+ data on disk, without the kdb+ binary. Have a quick look at the README for more info]]></summary></entry><entry><title type="html">Who needs an rdb?</title><link href="https://picodoc.org/who-needs-an-rdb/" rel="alternate" type="text/html" title="Who needs an rdb?" /><published>2026-04-29T09:00:00+00:00</published><updated>2026-04-29T09:00:00+00:00</updated><id>https://picodoc.org/who-needs-an-rdb</id><content type="html" xml:base="https://picodoc.org/who-needs-an-rdb/"><![CDATA[<p>I wrote over on the DI blog about making <a href="https://dataintellect.com/blog/who-needs-an-rdb/">kdb+ architecture simpler</a></p>]]></content><author><name></name></author><summary type="html"><![CDATA[I wrote over on the DI blog about making kdb+ architecture simpler]]></summary></entry><entry><title type="html">NI Census 2021: Updated population maps</title><link href="https://picodoc.org/ni-census-2021-map/" rel="alternate" type="text/html" title="NI Census 2021: Updated population maps" /><published>2026-02-12T09:00:00+00:00</published><updated>2026-02-12T09:00:00+00:00</updated><id>https://picodoc.org/ni-2021-census-maps</id><content type="html" xml:base="https://picodoc.org/ni-census-2021-map/"><![CDATA[<p>Almost 10 years ago I had the pleasure of working on a <a href="/living-apart-together/">mapping project</a> with The Detail that was also published in the Irish Times.  In 2021 NI completed <a href="https://www.nisra.gov.uk/statistics/census/census-2021">another census</a>, and the grid square data that I relied on for the original project was recently released too.</p>

<p>I’ve now updated my original <a href="/assets/censusni/">maps</a> to include a 6th time option: 2021.</p>

<p>Nothing dramatic has changed in those 10 years in NI, but you can start to see some patterns in certain areas.  Inner Belfast, especially in the east, and the areas around Stormont and Stranmillis have noticably hollowed out and become less dense</p>

<p><img src="/assets/2023/01/belfast.gif" alt="belfast" /></p>

<p>North Lisburn has grown alot (where I’m from), and the growth has been very integrated in terms of religion.  I can confirm there are alot less fields near my parents house now!</p>

<p><img src="/assets/2023/01/lisburn.gif" alt="lisburn" /></p>

<p>And East Derry shows a similar story.</p>

<p><img src="/assets/2023/01/derry.gif" alt="derry" /></p>

<p>Feel free to explore, and see what other patterns you can find!</p>]]></content><author><name></name></author><summary type="html"><![CDATA[Almost 10 years ago I had the pleasure of working on a mapping project with The Detail that was also published in the Irish Times. In 2021 NI completed another census, and the grid square data that I relied on for the original project was recently released too.]]></summary></entry><entry><title type="html">KDBench: Which LLM is Best At kdb?</title><link href="https://picodoc.org/kdbench.html" rel="alternate" type="text/html" title="KDBench: Which LLM is Best At kdb?" /><published>2025-08-05T00:00:00+00:00</published><updated>2025-08-05T00:00:00+00:00</updated><id>https://picodoc.org/kdbench</id><content type="html" xml:base="https://picodoc.org/kdbench.html"><![CDATA[<p>Recent <a href="https://dataintellect.com/blog/from-q-rious-to-q-ompetent-which-llm-is-best-at-kdb/">blog over at DI</a> looking at benchmarking LLMs on kdb+ coding performance.</p>]]></content><author><name></name></author><summary type="html"><![CDATA[Recent blog over at DI looking at benchmarking LLMs on kdb+ coding performance.]]></summary></entry><entry><title type="html">SQL-iloquies: A kdb+ SQL agent</title><link href="https://picodoc.org/sqliloquies.html" rel="alternate" type="text/html" title="SQL-iloquies: A kdb+ SQL agent" /><published>2023-09-21T00:00:00+00:00</published><updated>2023-09-21T00:00:00+00:00</updated><id>https://picodoc.org/sqliloquies</id><content type="html" xml:base="https://picodoc.org/sqliloquies.html"><![CDATA[<p>New <a href="https://dataintellect.com/blog/sql-iloquies-a-kdb-sql-agent/">blog over at DI</a> looking at taking directly to kdb data with natural language via an AI agent.</p>]]></content><author><name></name></author><summary type="html"><![CDATA[New blog over at DI looking at taking directly to kdb data with natural language via an AI agent.]]></summary></entry><entry><title type="html">Full colour 3D models of Strava routes</title><link href="https://picodoc.org/model-making.html" rel="alternate" type="text/html" title="Full colour 3D models of Strava routes" /><published>2023-01-19T00:00:00+00:00</published><updated>2023-01-19T00:00:00+00:00</updated><id>https://picodoc.org/model-making</id><content type="html" xml:base="https://picodoc.org/model-making.html"><![CDATA[<p>Usually when I’m messing around on side projects I end up with a chart or spreadsheet as the end result. This time I have something real!</p>

<p>There’s a niche market in turning GPS data from Strava runs and rides into tangible products like <a href="https://www.strava.com/apps/prints">posters or 3D prints</a>. A few small companies like PrintMyRoute (no longer operating), <a href="http://www.loopieroute.com/">Loopie</a> and <a href="https://www.keepshape.co/">Keepshape</a> make some pretty nice stuff.</p>

<p><img src="/assets/2023/01/Loopie.jpg" alt="Loopie" style="display:block; margin-left:auto; margin-right:auto; border: 3px solid black" /></p>

<p><img src="/assets/2023/01/keepshape.jpg" alt="Keepshape" style="display:block; margin-left:auto; margin-right:auto; border: 3px solid black" /></p>

<p>I’ve always thought this kind of thing was pretty cool.  However, to my knowledge all of these are either for making really nice framed 2D prints, or simple single colour tracks and 3D prints.  3D printing is pretty far from my specialism, but it seems to be rapidly progressing in terms of both capability and cost.  Full colour printing is now available at reasonable cost with <a href="https://www.shapeways.com/materials/sandstone">full colour sandstone</a>: this should allow us to make full colour 3D models any ride we choose by combining:</p>
<ul>
  <li>The ride GPX file</li>
  <li>Satellite imagery from Google maps</li>
  <li>Elevation data from the <a href="https://en.wikipedia.org/wiki/Shuttle_Radar_Topography_Mission">Shuttle Radar Topography Mission</a>.  This is an amazing public resource with a resolution of around 30m</li>
</ul>

<p>I know some 3D printing hardware is now reasonably priced to buy, but that’s a much bigger project, so for this I outsourced the actual printing to <a href="https://www.shapeways.com/">shapeways</a>.  Basically my objective here is to go from a Strava GPX file -&gt; full colour model to send to shapeways. I won’t include full detail here (maybe for a future post), but just include broad steps.  Let’s take the famous <a href="https://www.strava.com/segments/5170240">Col Du Tourmalet</a> Tour de France climb as a good example:</p>
<ul>
  <li>After downloading the GPX file from Strava I opened in QGIS.  Here I import satellite and layer under the track (coloured in as a thick white line).  Export this as a <a href="https://en.wikipedia.org/wiki/GeoTIFF">GeoTIFF</a> image</li>
  <li>Using the absolutely phenomenal <a href="https://github.com/domlysz/BlenderGIS">BlenderGIS extension</a>, I import this GeoTIFF into <a href="https://www.blender.org/">Blender</a>. Add elevation from the SRTM dataset, tweak z axis and flatten the back of the model for mounting, trim down to model size (100mm), and export as a DAE file</li>
  <li>Zip up the model file and upload to shapeways for 3D printing</li>
  <li>Wait for a few weeks…</li>
  <li>When the prints arrive finish model with a protective varnish, and mount on wooden plinth!</li>
</ul>

<p>After all that I think I ended up with a pretty nice end product (even if my photography skills don’t quite do it justice).  For reference these are around 10cm across.</p>

<h4 id="col-du-tourmalet">Col Du Tourmalet</h4>

<p><img src="/assets/2023/01/tourmalet1.jpg" alt="Tourmalet1" style="display:block; margin-left:auto; margin-right:auto; border: 3px solid black" /></p>

<p><img src="/assets/2023/01/tourmalet2.jpg" alt="Tourmalet2" style="display:block; margin-left:auto; margin-right:auto; border: 3px solid black" /></p>

<p>Here’s a few other well known climbs I tried: Alpe D’Huez and the Snowbird in Utah:</p>

<h4 id="alpe-dhuez">Alpe D’Huez</h4>

<p><img src="/assets/2023/01/dhuez1.jpg" alt="dhuez" style="display:block; margin-left:auto; margin-right:auto; border: 3px solid black" /></p>

<h4 id="snowbird">Snowbird</h4>

<p><img src="/assets/2023/01/snowbird1.jpg" alt="snowbird" style="display:block; margin-left:auto; margin-right:auto; border: 3px solid black" /></p>

<p>But the nice thing about this is I can make whatever I want, so long as I have a GPX track, so here’s one of my favourite local rides around Belfast:</p>

<h4 id="my-local-ride">My local ride!</h4>

<p><img src="/assets/2023/01/belfast1.jpg" alt="belfast" style="display:block; margin-left:auto; margin-right:auto; border: 3px solid black" /></p>]]></content><author><name></name></author><summary type="html"><![CDATA[Usually when I’m messing around on side projects I end up with a chart or spreadsheet as the end result. This time I have something real!]]></summary></entry><entry><title type="html">Vaex, Arrow, Parquet</title><link href="https://picodoc.org/vaex-arrow-parquet.html" rel="alternate" type="text/html" title="Vaex, Arrow, Parquet" /><published>2021-04-11T00:00:00+00:00</published><updated>2021-04-11T00:00:00+00:00</updated><id>https://picodoc.org/vaex-arrow-parquet</id><content type="html" xml:base="https://picodoc.org/vaex-arrow-parquet.html"><![CDATA[<p>As part of AquaQ’s <em>“AquaQuarantine”</em> series of online talks I did a talk entitled <em>“Vaex, Arrow and Parquet”</em>.  The talk is recorded and available over on <a href="https://vimeo.com/535765530">vimeo</a> (you may have to login to view) and the slides are available <a href="/assets/2021/04/vaex-arrow-parquet.pdf">here</a></p>]]></content><author><name></name></author><summary type="html"><![CDATA[As part of AquaQ’s “AquaQuarantine” series of online talks I did a talk entitled “Vaex, Arrow and Parquet”. The talk is recorded and available over on vimeo (you may have to login to view) and the slides are available here]]></summary></entry><entry><title type="html">COVID vaccination might help faster than we expect</title><link href="https://picodoc.org/covid-vaccination-might-help-faster-than-we-expect/" rel="alternate" type="text/html" title="COVID vaccination might help faster than we expect" /><published>2020-12-18T18:24:53+00:00</published><updated>2020-12-18T18:24:53+00:00</updated><id>https://picodoc.org/covid-vaccination-might-help-faster-than-we-expect</id><content type="html" xml:base="https://picodoc.org/covid-vaccination-might-help-faster-than-we-expect/"><![CDATA[<p>So great news, we have a vaccine! and it’s seems to be <a href="https://www.bmj.com/content/371/bmj.m4826">really good</a>!  Although broad vaccination of everyone who wants one is going to take quite a while, vaccination is going to help much faster than you might expect, because we can target the most vulnerable groups first.</p>

<p>Let’s make a really simple model, where we assume:</p>

<ul>
  <li>COVID fatality rates by age will stay roughly the same as they have been (I’m using the Wales and England data)</li>
  <li>The vaccine is <a href="https://www.bmj.com/content/371/bmj.m4826">95% effective</a> at preventing COVID fatalities</li>
  <li>It takes 3 weeks from initial vaccination to provide this protection</li>
  <li>We prioritize vaccination based on age alone (oldest first)</li>
  <li>The current rate of vaccination is that <a href="https://www.bbc.co.uk/news/uk-northern-ireland-55360646">reported for Northern Ireland</a> yesterday (around 10,000 people in 9 days)</li>
  <li>We ramp up the vaccination rate over the next 2 months to about 5 times that (if we want to have half of people vaccinated by summer this is the kind of rate we have to aim for)
&lt;</li>
</ul>

<p>With these assumptions we get something that looks like:</p>

<p><img src="/assets/2020/12/vaccinations-1024x373.png" alt="image" /></p>

<p>So based on these numbers we could expect to see:</p>

<ul>
  <li>A 50% reduction in deaths - relative to without a vaccine - by the end of January</li>
  <li>An almost 80% reduction by the start of March</li>
</ul>

<p>I’ve attached my model <a href="/assets/2020/12/vaccination-model.xlsx">here</a> for anyone interested in playing with the numbers. The big caveat here is I’m talking about a reduction in deaths relative to no vaccinations. If for example we reduce deaths by 50%, but twice as many people get infected, we’ll be in the same place. It’s also obviously still key to vaccinate a much larger number of people to try to achieve herd immunity and truly get our lives back to normal, but as you can see even 15-20% vaccination rates should make a huge difference, as the risks from COVID increase so dramatically with age.  Roll on the vaccine!</p>]]></content><author><name></name></author><summary type="html"><![CDATA[So great news, we have a vaccine! and it’s seems to be really good! Although broad vaccination of everyone who wants one is going to take quite a while, vaccination is going to help much faster than you might expect, because we can target the most vulnerable groups first.]]></summary></entry><entry><title type="html">Coronavirus and data</title><link href="https://picodoc.org/coronavirus-uk-data/" rel="alternate" type="text/html" title="Coronavirus and data" /><published>2020-06-23T00:00:00+00:00</published><updated>2020-06-23T00:00:00+00:00</updated><id>https://picodoc.org/coronavirus-uk-data</id><content type="html" xml:base="https://picodoc.org/coronavirus-uk-data/"><![CDATA[<p>Epidemiological modelling has had more attention in the last 3 months than ever before. We’ve all seen various “nightmare scenario” predictions on the news, and thankfully the worst of these have not come to pass. Using modelling to predict the future spread of a virus is a very complex and difficult problem: you need to predict the behaviour of entire societies, and small changes in model inputs can result in massive differences in outcomes. However predicting the future is not the only thing these models are useful for, we can also use them to examine and understand the past.</p>

<p>Many of us have spent the last 3 months looking at charts like this on the news, showing daily new infections in the UK.</p>

<p><img src="/assets/2020/06/daily-new-cases-1.png" alt="daily new cases" /></p>

<p>This paints a certain picture: that the UK had a long peak of new infections through all of April, and even now in mid June the number is still at around 30% of the peak value.  That doesn’t seem like a great achievement for 3 months of lockdown.  How should we interpret this? What does it tell us about what has happened with the spread of the epidemic, and what is happening now? First I would argue that on it’s own this chart can be very misleading, as it does not consider a critical factor: how many tests were being carried out. I’m going to combine this key piece of data with a simple model (so simple I’ll provide the excel file!), and hopefully shed some light on what’s really happened over the past 3 months.</p>

<p>FiveThirtyEight’s Nate Silver published an <a href="https://fivethirtyeight.com/features/coronavirus-case-counts-are-meaningless/">excellent article</a> back in April trying to demonstrate the same thesis: that on their own new infection numbers are not very useful. At that time he was trying to show how these charts might look based on how countries ramp up their testing.  Now in hindsight we <em>know</em> how the UK ramped up it’s testing, so we can adapt his model to explain and understand better the data we’ve seen in the UK over the past months.</p>

<p>So how does this model work? I’ve attached the <a href="/assets/2020/06/covid_model.xlsx">excel file</a> so if you want you can see for yourself, but in essence it’s pretty simple, with a number of key features:</p>

<ul>
  <li>It uses <a href="https://en.wikipedia.org/wiki/Compartmental_models_in_epidemiology#The_SIR_model">standard epidemiological model</a> to predict the spread using the now famous “R number”.  So in each generation (5 days) each infected person will spread the disease to <em>R</em> more people.  I’ve taken values of R that are roughly inline with the general concensus (although there is alot of debate on this): R is set to <a href="https://www.imperial.ac.uk/media/imperial-college/medicine/mrc-gida/2020-03-26-COVID19-Report-12.pdf">3 before lockdown</a>, 1.8 as some measures were brought in initially in early March, and then <a href="https://www.gov.uk/guidance/the-r-number-in-the-uk">0.85 in late March</a> when the UK implemented a full lockdown.</li>
  <li>I borrowed Nate’s assumptions about what percentage of cases are serious, mild and asymptomatic, and what percentage of the population have similar symptoms but <em>do not</em> have COVID-19.  This is very important when modelling testing, as tests are administered based on symptoms, with the most severe being given priority over mild cases, and asymptomatic cases not being tested at all.</li>
  <li>I added a simple model to predict fatalities from the disease by assuming that they will be spread out evenly over a period <a href="https://www.telegraph.co.uk/news/2020/03/12/coronavirus-kills-average-185-days/">1-5 weeks</a> after infection, and that the fatality rate is <a href="https://www.medrxiv.org/content/10.1101/2020.03.05.20031773v2">1.2%</a></li>
</ul>

<p>Using a simple model with these assumptions and fitting the reported data for testing and infections, the UK’s “patient zero” should have been in late January.  These parameters are based on real world sources where possible, but you can easily tweak any of them and try fitting your own scenario to see how well it matches the observed data.</p>

<p>So let’s look at the chart of new infections shown above again, comparing the data to what this model predicts.</p>

<p><img src="/assets/2020/06/daily-new-cases-model.png" alt="daily new cases model" /></p>

<p>So the model seems to match reality pretty well, always a good start.  And here’s the same chart for daily deaths compared to the model predictions:</p>

<p><img src="/assets/2020/06/daily-new-deaths-model.png" alt="daily new deaths model" /></p>

<p>So at first glance this looks pretty good, the overall trend predicted matches well in both cases. But is it really right? Well, the honest answer, as with any model, is we’ll never really know. Models do their best to replicate reality, but the real world is complicated. There is another key prediction of our model that suggests it might be reflecting reality fairly accurately: the overall number of infections, not just those detected by tests. This model predicts just under 5% of the UK - or 3.2 million people - has been infected by COVID-19, which matches well with the results of antibody testing which estimates <a href="https://www.ons.gov.uk/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/bulletins/coronaviruscovid19infectionsurveypilot/12june2020#antibody-tests-for-covid-19">6.7% of people have had the illness</a>.  Broad swab test surveys estimated that during the two weeks from 25 May to 7 June 2020 an <a href="https://www.ons.gov.uk/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/bulletins/coronaviruscovid19infectionsurveypilot/12june2020#number-of-people-in-england-who-had-covid-19">&gt;average of 33,000 people had coronovirus</a>, where the model predicts around 25,000 new infections in that time period.  Again this is a reasonably close match.</p>

<p>So if you’re satisfied that this model reflects reality reasonably well we can start using it to get a better picture of what really happened over the last 3 or 4 months. You might have noticed that the number for total infections seems very high compared to the chart of new infections detected per day: that’s because it is. Here’s what the models prediction of total infections looks like compared to those that were actually detected throughout the course of the epidemic:</p>

<p><img src="/assets/2020/06/daily-total-cases-model.png" alt="daily total cases model" /></p>

<p>So this shows a dramatic gap between detected and actual cases of COVID-19, particularly at the peak in early April. According to this model at the peak around 100,000 people were being infected every day, and only about 3% were being detected by tests. This number has now dropped to less than 5,000 per day, a factor of 20 reduction, which is much higher than the decrease by a factor of 3 you see if you simply look at the detected numbers. The model predicts that we are now detecting around 30% of the actual cases, mainly because a large number of people only have mild, or no symptoms at all. These cases will likely be very difficult to detect, which is one of the main reasons for a track and trace system: it might be able to better target tests at those who have mild or asymptomatic infections.</p>

<p>The number of deaths has also not dropped as far as you might expect: according to this model that’s because deaths are significantly lagged from infections, so we should expect them to continue falling, even if the number of new cases plateaus (this is as close as I’ll come to making a prediction about the future)</p>

<p>If we look at the data for testing, and the positive test percentage we can also see a much clearer picture of the data</p>

<p><img src="/assets/2020/06/daily-tests-1.png" alt="daily tests" /></p>

<p><img src="/assets/2020/06/positive-test-percentage.png" alt="positive test percentage" /></p>

<p><img src="/assets/2020/06/daily-new-cases-model.png" alt="daily new cases model" /></p>

<p>So most of the UK’s ramp in testing happened in late April/early May, which bumped up the number of cases detected, skewing our statistics.  Another thing to keep in mind is that if we see another rise in cases, or a 2nd peak, we should be very careful comparing it to the first: because of increased testing the data will likely look very different this time.  In a possible future where we stopped all of our social distancing today (June 21st) and returned the R number to where it was in early March, we would be back to 100,000 cases per day by the end of July, however the new infections chart would look very different.  Assuming our test capacity stays steady it would look like this:</p>

<p><img src="/assets/2020/06/bad-future-1.png" alt="bad future" /></p>

<p>The shaded areas compare the equivalent weeks in March and April to the imaginary second wave.  And if our test capacity continues to increase - as is likely - it will look different again.  So it’s definitely worth being very cautious interpreting these charts in isolation!</p>

<p>As a last note, it’s good to have some humility when building any models, especially of something as complex as a pandemic: all of this could be totally wrong! I think one of the lessons of the last 3 months is that most models are wrong!  I don’t think this means they’re not worth making though, even if not correct they still help us think more clearly about what’s really happening.</p>]]></content><author><name></name></author><summary type="html"><![CDATA[Epidemiological modelling has had more attention in the last 3 months than ever before. We’ve all seen various “nightmare scenario” predictions on the news, and thankfully the worst of these have not come to pass. Using modelling to predict the future spread of a virus is a very complex and difficult problem: you need to predict the behaviour of entire societies, and small changes in model inputs can result in massive differences in outcomes. However predicting the future is not the only thing these models are useful for, we can also use them to examine and understand the past.]]></summary></entry></feed>