Skip to content

Instantly share code, notes, and snippets.

Avatar

Paul Ronga palrogg

View GitHub Profile
@palrogg
palrogg / swiss-regions.py
Last active Dec 21, 2020
Example: read BAG zipfile – warning: their data has a closed license
View swiss-regions.py
import urllib.request
from urllib.error import HTTPError
from io import BytesIO
from zipfile import ZipFile
import pandas as pd
from datetime import datetime
# BAG documentation: https://www.covid19.admin.ch/api/data/documentation
# Closed license: https://www.admin.ch/gov/en/start/terms-and-conditions.html
# This script is untested. Use at your own risk.
@palrogg
palrogg / off-facebook-activity.py
Created Jan 29, 2020
A few lines to make your_off-facebook_activity.json easier to read
View off-facebook-activity.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# requirements: pandas, xlrd
import pandas as pd
import json
with open('your_off-facebook_activity.json', encoding='utf-8') as f:
data = json.load(f)
@palrogg
palrogg / .block
Created Dec 18, 2019 — forked from HarryStevens/.block
Population Pyramid
View .block
license: gpl-3.0
@palrogg
palrogg / .block
Created Dec 15, 2017 — forked from nbremer/.block
D3.js - Radar Chart or Spider Chart - Adjusted from radar-chart-d3
View .block
height: 650
license: mit