PyCon UK 2019

How to use Python to expose politicians?
2019-09-16 , Assembly Room

This talk presents a project that uses an API of the Brazilian government to retrieve data from congresspeople and expose how they are spending people's money. I use Pandas to manipulate the data and, Lektor and Chart.JS to create a website that makes this data accessible and comprehensible.


This talk presents the basic concepts of data treatment and manipulation. It presents a quick introduction to Lektor, a framework to build static websites in pure Python (and, a little bit of markdown and HTML). I also make a brief presentation of the project Serenata de Amor, which I use to retrieve the data of Brazilian congresspeople. I talk about Pandas_profiling, Pandas, and chart.js, giving very simple examples of how they can be used to produce nice data visualization.

This talk is especially interesting for those that want to build a simple static website and don’t want to deal with javascript frameworks like Hugo. It is also interesting for people that are interested in data science and anybody that is thinking about how to use their skills to impact politics.


Is your proposal suitable for beginners?: yes

Rafael is a Brazilian physicist currently working in neuroscience. Last year he finished his PhD in astrophysics, in Spain, where he applied K-means to find patterns in a sample of more than 250 thousand stars in our Galaxy. He moved to London to work in a neuroscience project that aims to use machine learning in 3D images of patient brains to diagnose conditions like Parkinson’s, Alzheimer’s disease and psychosis. Recently he has written a Chapter for the book Machine learning methods and applications to brain disorders.