Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

niftycode niftycode

🏠
Working from home
View GitHub Profile
@niftycode
niftycode / csv_to_excel.py
Created Jun 4, 2020
Read a CSV file and save the data as Excel file
View csv_to_excel.py
#!/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
@niftycode
niftycode / kiel_bankruptcies.py
Created Jan 5, 2020
The bankruptcies in Kiel, Germany
View kiel_bankruptcies.py
#!/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 / uk_general_election_2019.py
Last active Dec 29, 2019
UK General Election 2019 Bar Chart
View uk_general_election_2019.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
UK General Election 2019
Version: 1.1
Python 3.8
Date created: 28.12.2019
"""
@niftycode
niftycode / json_to_excel.py
Last active Dec 29, 2019
Read JSON data from a given URL and save the data as Excel file.
View json_to_excel.py
#!/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 / read_access_db.py
Created Feb 26, 2019
Read an Access Database using Python with the pyodbc module.
View read_access_db.py
#!/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 / koalition.py
Last active Dec 5, 2019
This is an example how to search for strings in a text file using Python 3
View koalition.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
Program: koalition.py
Author: Bodo Schönfeld
Email: python@bodo-schoenfeld.de
Version: 1.2
Python 3.8
@niftycode
niftycode / traffic_accidents_kiel.py
Last active Oct 19, 2017
Use Kiel's OpenData to visualize traffic accidents with Python and Pandas
View traffic_accidents_kiel.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Traffic Accidents in Kiel, Germany
Python 3.6
last edited: 19/10/2017
The data is provided by the City of Kiel, Germany
https://www.kiel.de/
@niftycode
niftycode / btw_2017.py
Created Sep 25, 2017
German Federal Election 2017 (Bundestagswahl)
View btw_2017.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Election, German Bundestag 2017
Version: 1.0
Python 3.6
Date created: 25/09/2017
"""
@niftycode
niftycode / election_presidentielle.py
Last active Apr 24, 2017
Election presidentielle 2017 - a bar chart created with Python and matplotlib
View election_presidentielle.py
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 / kiel_unfaelle.py
Last active Apr 10, 2017
Traffic Accidents in Kiel
View kiel_unfaelle.py
#!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
kiel_unfaelle.py
version: 1.2
last edited: 10/04/2017
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
"""
You can’t perform that action at this time.