Articles in category: python

The orientation of Amsterdam’s streets

13 July 2018 - Eight days from now, Amsterdam will have a new metro line traversing the city from north to south. But what about the orientation of the city’s streets?

How to use Python and Selenium for scraping election results

13 May 2018 - The Kiesraad website where election results are published is partly generated using javascript (I think) and therefore not easy to scrape. For this reason, this seemed like a perfect project to explore Selenium.

How to do fuzzy matching in Python

15 October 2017 - Statistics Netherlands (CBS) has an interesting dataset containing data at the city, district and neighbourhood levels. However, some names of neighbourhoods have changed, specifically between 2010 and 2011 for Amsterdam. For example, Bijlmer-Centrum D, F en H was renamed Bijlmer-Centrum (D, F, H).

Python script to import .sps files

11 April 2017 - In a post about voting locations (in Dutch) I grumbled a bit about inconsistencies in how Statistics Netherlands (CBS) spells the names of municipalities and why don’t they include the municipality codes in their data exports. This afternoon, someone who works at CBS responded on Twitter. She had asked around and found a workaround: download the data as SPSS. Thanks!

How to automate extracting tables from PDFs, using Tabula

11 April 2017 - One of my colleagues needs tables extracted from a few hundred PDFs. There’s an excellent tool called Tabula that I frequently use, but you have to process each PDF manually. However, it turns out you can also automate the process. For those like me who didn’t know, here’s how it works.

Previous | Articles 6-10 | Next