🎉 Initial commit
This commit is contained in:
commit
76f9ef7ccd
7321
2020-03-28_11-00.csv
Normal file
7321
2020-03-28_11-00.csv
Normal file
File diff suppressed because it is too large
Load Diff
43
Analyser.py
Normal file
43
Analyser.py
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
"""
|
||||||
|
Project: Analyse worldwide COVID-19 Data and provide graphs etc.
|
||||||
|
|
||||||
|
@author Patrick Müller
|
||||||
|
"""
|
||||||
|
import numpy as np
|
||||||
|
import pandas as pd
|
||||||
|
import matplotlib.pyplot as plt
|
||||||
|
import tkinter as tk
|
||||||
|
|
||||||
|
"""
|
||||||
|
Fields in csv:
|
||||||
|
dateRep
|
||||||
|
day
|
||||||
|
month
|
||||||
|
year
|
||||||
|
cases
|
||||||
|
deaths
|
||||||
|
countriesAndTerritories
|
||||||
|
geoId
|
||||||
|
countryterritoryCode
|
||||||
|
popData2018
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
class Analyser:
|
||||||
|
# Pandas Settings
|
||||||
|
pd.set_option('display.max_row', 1000)
|
||||||
|
pd.set_option('display.max_column', 10)
|
||||||
|
|
||||||
|
df = pd.read_csv('2020-03-28_11-00.csv', encoding='windows-1252')
|
||||||
|
df['dateRep'] = pd.to_datetime(df['dateRep'])
|
||||||
|
|
||||||
|
def getAvailableCountries(self):
|
||||||
|
return self.df['countriesAndTerritories'].unique()
|
||||||
|
|
||||||
|
def germany_cases_graph(self):
|
||||||
|
fig = plt.figure()
|
||||||
|
ax = fig.add_subplot(111)
|
||||||
|
|
||||||
|
germanyData = self.df[self.df['countriesAndTerritories'].isin(['Germany'])]
|
||||||
|
print(germanyData)
|
6
DataFetcher.py
Normal file
6
DataFetcher.py
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
"""
|
||||||
|
Project: Analyse worldwide COVID-19 Data and provide graphs etc.
|
||||||
|
|
||||||
|
@author Patrick Müller
|
||||||
|
"""
|
13
Main.py
Normal file
13
Main.py
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
"""
|
||||||
|
Project: Analyse worldwide COVID-19 Data and provide graphs etc.
|
||||||
|
|
||||||
|
@author Patrick Müller
|
||||||
|
"""
|
||||||
|
import DataFetcher as fetcher
|
||||||
|
import Analyser as ana
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
analyser = ana.Analyser()
|
||||||
|
analyser.germany_cases_graph()
|
||||||
|
print(analyser.getAvailableCountries())
|
Loading…
Reference in New Issue
Block a user