Skip to content

Instantly share code, notes, and snippets.

@eetuko
eetuko / create_movie_venn_upset_charts.py
Created January 18, 2021 11:29
Script to generate movie genres Venn diagrams and upset plots from IMDB.
View create_movie_venn_upset_charts.py
#!/usr/bin/env python
import gzip
import io
import pprint
import upsetplot
import pandas as pd
from collections import defaultdict
from matplotlib import pyplot as plt
from matplotlib_venn import venn2, venn3
from urllib.request import Request, urlopen
@eetuko
eetuko / docker-zshrc
Created January 13, 2021 11:44
Cleanup docker images and containers
View docker-zshrc
# Credit https://forums.docker.com/t/how-to-delete-cache/5753
alias docker_clean_images='docker rmi $(docker images -a --filter=dangling=true -q)'
alias docker_clean_ps='docker rm $(docker ps --filter=status=exited --filter=status=created -q)'
alias docker_delete_all_images='docker rmi $(docker images -a -q)'
alias docker_delete_all_containers='docker container rm $(docker container ls -aq)'
@eetuko
eetuko / Systems_exploratory_data_analysis_method.md
Created November 23, 2020 09:00
Method summary for a systems perspective on exploratory data analysis.
View Systems_exploratory_data_analysis_method.md

In data science, exploratory data analysis is an endless game. Here is a quick summary of the process that I follow to get it done. It is easy to get sidetracked, lost in the details. The commitment to follow bullets points helps to stick to your main goal: get a global overview. The important shift is to iterate at least three times with a different focus at every iteration:

  • Function: What is the purpose of the system? Is it to satisfy customers? How? Something else?
  • Structure: How are the building blocks arranged in space?
  • Processes: How are the building blocks arranged in time?

Depending on the type of question it might make more sense to adapt the ratio between time and space, but the two are important.


@eetuko
eetuko / .block
Last active October 6, 2020 19:16
Covid-19 world-wide totals per million population - D3js maps
View .block
license: gpl-3.0
height: 540
scrolling: no
border: yes
@eetuko
eetuko / matplotlib_designed.py
Last active July 31, 2020 10:34
Create good looking matplotlib barplot
View matplotlib_designed.py
import matplotlib as mpl
import matplotlib.pyplot as plt
from cycler import cycler
DARK_BLUE = "#2b2d42"
MEDIUM_GREY = "#8d99ae"
LIGHT_GREY = "#edf2f4"
LIGHT_RED = "#ef233c"
DARK_RED = "#d90429"