Skip to content

CodeMonkLL/Feinstaubprojekt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

58 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

#Feinstaubprojekt Feinstaubprojekt zum Downloaden und speichern von Feinstaubdaten fรผr das Jahr 2022.

Get Started 1. You will need python 2. Install

matplotlib: matplotlib-3.10.1 pip install matplotlib

urllib3 2.3.0

รœbersicht verwendeter Bibiotheken:


FeinstaubMyself/ โ”‚ โ”œโ”€โ”€ main.py # Einstiegspunkt der Anwendung โ”œโ”€โ”€ requirements.txt # Abhรคngigkeiten (falls vorhanden) โ”‚ โ”œโ”€โ”€ modules/ # Hauptmodul, das alle logischen Komponenten enthรคlt โ”‚ โ”œโ”€โ”€ init.py # Ermรถglicht es, das modules-Verzeichnis als Modul zu behandeln โ”‚ โ”œโ”€โ”€ data_loader/ # Lade-Logik (z.B. CSV, DB) โ”‚ โ”‚ โ”œโ”€โ”€ init.py โ”‚ โ”‚ โ”œโ”€โ”€ download.py # CSV-Download โ”‚ โ”‚ โ”œโ”€โ”€ unzip.py # Entpacken der CSV-Dateien โ”‚ โ”‚ โ”œโ”€โ”€ write_csv_to_db.py # Schreiben der CSV-Daten in DB โ”‚ โ”‚ โ””โ”€โ”€ create_db.py # Erstellen der Datenbank โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ gui/ # GUI-Komponenten โ”‚ โ”‚ โ”œโ”€โ”€ init.py โ”‚ โ”‚ โ”œโ”€โ”€ feinstaub_gui.py # GUI mit Tkinter โ”‚ โ”‚ โ”œโ”€โ”€ get_data.py # Logik zum Abrufen von Daten fรผr die GUI โ”‚ โ”‚ โ””โ”€โ”€ select_date.py # Datumsauswahl-Logik fรผr die GUI โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ database/ # Datenbank-Interaktionen โ”‚ โ”‚ โ”œโ”€โ”€ init.py โ”‚ โ”‚ โ”œโ”€โ”€ db_connection.py # Verbindung zur DB โ”‚ โ”‚ โ”œโ”€โ”€ queries.py # SQL-Abfragen und DB-Logik โ”‚ โ”‚ โ””โ”€โ”€ models.py # Definition von DB-Modellen (falls nรถtig) โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ utils/ # Hilfsfunktionen und allgemeine Logik โ”‚ โ”œโ”€โ”€ init.py โ”‚ โ”œโ”€โ”€ input_validation.py # Validierung von Benutzereingaben โ”‚ โ””โ”€โ”€ plot.py # Logik fรผr die Plots mit Matplotlib โ”‚ โ””โ”€โ”€ README.md # Dokumentation

๐Ÿ“š Verwendete Bibliotheken und Funktionen

๐Ÿ”น Standardbibliotheken

Bibliothek Genutzte Funktionen / Klassen Beschreibung
os os.path.join, os.listdir, os.remove Datei- und Verzeichnisoperationen
gzip gzip.open Entpacken von .gz-Dateien
shutil shutil.move, shutil.unpack_archive (optional) Dateioperationen wie Verschieben oder Entpacken
sqlite3 sqlite3.connect, cursor(), execute(), fetchall() Zugriff auf SQLite-Datenbank mit SQL
datetime datetime.strptime, datetime.date, timedelta Verarbeitung von Datumsangaben
csv csv.reader, next() Einlesen von CSV-Dateien
pathlib Path, Path.exists() (optional) Objektorientierter Umgang mit Dateipfaden

๐Ÿ”น Externe Bibliotheken (optional, je nach Einsatz)

Bibliothek Genutzte Funktionen / Klassen Beschreibung
requests requests.get, response.content Herunterladen von Dateien รผber HTTP
matplotlib.pyplot plot, show Visualisierung von Messdaten
tkinter Tk, Label, Button, Entry, Canvas, mainloop GUI-Erstellung fรผr eine Desktop-Oberflรคche

๐Ÿ—‚๏ธ Eigene Dateien und Hauptfunktionen

Datei Wichtige Funktionen Aufgabe
download.py download_file() Herunterladen von CSV-Dateien
unzip.py unzip_files() Entpacken von .gz-Dateien
write_csv_to_db.py insert_csv_data() CSV-Inhalte in SQLite-Datenbank einfรผgen
read_all_data.py read_all() Gesamte Daten ausgeben
print_data_db_dht22.py print_metrics_by_day() Ausgabe von Tageswerten nach Sensortyp
display_dht22_metric.py getMAXfrom(), getMINfrom(), getAVGfrom() Berechnung von statistischen Werten
create_db.py create_tables() Erstellt Tabellen via SQL
delete_db.py delete_database() Lรถscht die Datenbankdatei
(optional) utils.py inputDate() Eingabefunktion fรผr Datumsauswahl

About

educational project written in Python simple console + gui in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages