Skip to content

Instantly share code, notes, and snippets.

View niftycode's full-sized avatar
🏠
Working from home

Bodo Schönfeld niftycode

🏠
Working from home
View GitHub Profile
@niftycode
niftycode / kiel_unfaelle.py
Last active June 19, 2021 15:49
Traffic Accidents in Kiel
#!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
kiel_unfaelle.py
version: 1.3
last edited: June 19th, 2021
The data is provided by the City of Kiel, Germany:
http://kiel.de/rathaus/statistik/open_data/index.php?id=de-sh-kiel_gesetze_justiz_strassenverkehsunfaelle_verkehrstote_verletzte_fahrerflucht
"""
@niftycode
niftycode / election_presidentielle.py
Last active April 24, 2017 16:54
Election presidentielle 2017 - a bar chart created with Python and matplotlib
import matplotlib.pyplot as plt
import numpy as np
plt.style.use('seaborn-bright')
fig, ax = plt.subplots()
candidats = ('Marine Le Pen', 'Emmanuel Macron', 'François Fillon', 'Benoît Hamon', 'Jean-Luc Mélenchon')
voter = [21.7,23.9,20,6.3,19.2]
y_pos = np.arange(len(candidats))
@niftycode
niftycode / btw_2017.py
Created September 25, 2017 09:31
German Federal Election 2017 (Bundestagswahl)
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Election, German Bundestag 2017
Version: 1.0
Python 3.6
Date created: 25/09/2017
"""
@niftycode
niftycode / traffic_accidents_kiel.py
Last active June 19, 2021 16:35
Use Kiel's OpenData to visualize traffic accidents with Python and Pandas
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Traffic Accidents in Kiel, Germany
Python 3.6
last edited: May 19th, 2021
The data is provided by the City of Kiel, Germany
https://www.kiel.de/
@niftycode
niftycode / koalition.py
Last active December 1, 2021 18:01
This is an example how to count words in a text file using Python 3
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
Author: @niftycode
Version: 1.3
Python 3.10
Date created: February 14th, 2018
Date modified: December 1st, 2021
@niftycode
niftycode / read_access_db.py
Created February 26, 2019 16:11
Read an Access Database using Python with the pyodbc module.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Read an Access Database using pyodbc
Version: 1.0
Python 3.7
Date created: 24.02.2019
"""
@niftycode
niftycode / json_to_excel.py
Last active December 29, 2019 10:36
Read JSON data from a given URL and save the data as Excel file.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Fetch JSON data and create an Excel file
Version: 1.1
Python 3.8
Date created: 14.12.2019
"""
@niftycode
niftycode / uk_general_election_2019.py
Last active December 29, 2019 10:47
UK General Election 2019 Bar Chart
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
UK General Election 2019
Version: 1.1
Python 3.8
Date created: 28.12.2019
"""
@niftycode
niftycode / kiel_bankruptcies.py
Created January 5, 2020 13:52
The bankruptcies in Kiel, Germany
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
Unternehmensinsolvenzen in Kiel
The data is provided by the Open Data Portal Schleswig-Holstein, Germany
https://opendata.schleswig-holstein.de/dataset/unternehmensinsolvenzen-in-kiel
Version: 1.0
Python 3.8
@niftycode
niftycode / csv_to_excel.py
Created June 4, 2020 08:16
Read a CSV file and save the data as Excel file
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Cargo Handling (Port of Kiel, Germany)
For more information see: https://opendata.schleswig-holstein.de/dataset/guterumschlag-im-kieler-hafen
Version: 1.0
Python 3.7+
Date created: 03.06.2020