Coder Social home page Coder Social logo

covid's Introduction

This is simple application which show plots of covid disease. App must be connect to network to get data. All menu is intuitive and simple. All data are from https://covid19api.com/ Library used in project:

  • requests
  • matplotlib
  • tkinter

Example

import covid.RestAllData as rd

italy = rd.RestAllData('Italy')
italy.show_one_country_cases()

Module RestAllData:

  • class RestAllData create object to manipulate rest data
country = RestAllData('Germany')
  • function get_data() create lists of all days for (confirmed, active, deaths, recovered).
country.get_data()
  • function show_data() show plots (confirmed, active, deaths, recovered).
country.show_data()
  • function show_one_country_cases() show confirmed cases for specific country.
country.show_one_country_cases()
country.json_one_country_cases()    # return list of json data
  • function show_one_country_deaths() show confirmed deaths cases for specific country.
country.show_one_country_deaths()
country.json_one_country_deaths()    # return list of json data
  • function show_one_country_recovered() show confirmed recovered cases for specific country
country.show_one_country_recovered()
country.json_one_country_recovered()    # return list of json data
  • function show_one_country_active() show confirmed active cases for specific country
country.show_one_country_active()
country.json_one_country_active()    # return list of json data
  • function show_data_country_by_date(type, start_date, end_date) show concret data for confirmed, recovered, deaths for specific period of time
country.show_data_country_by_date('deaths', '2020-03-01', '2020-06-01')
country.json_country_by_date('deaths', '2020-03-01', '2020-06-01')    # return list of json data
  • function show_all_data_country_by_date(start_date, end_date) show all data on one plot for confirmed, recovered, deaths for specific period of time
country.show_all_data_country_by_date('2020-04-09', '2020-05-09')
country.json_all_data_country_by_date('2020-04-09', '2020-05-09')   # return tuple of json data lists
  • function show_one_country_all_data_after_date(date) show all data on one plot for confirmed, recovered, deaths after concret date. Sometimes after some date plots does not show plots.
country.show_one_ountry_all_data_after_date('2020-04-30')
country.json_one_country_all_date_after_date('2020-04-30')   # return tuple of json data lists
  • function compare_two_countries_cases(country, country2) show plots for both countries
compare_two_countries_cases('Spain', 'Italy')
json_compare_two_countries_cases('Spain', 'Italy')  # return tuple of json data lists
  • function compare_two_countries_deaths(country, country2) show plots for both countries
compare_two_countries_deaths('Germany', 'Italy')
json_compare_two_countries_deaths('Germany', 'Italy')  # return tuple of json data lists
  • function compare_two_countries_recovered(country, country2) show plots for both countries
compare_two_countries_recovered('Germany', 'Russia')
json_compare_two_countries_recovered('Germany', 'Russia')   # return tuple of json data lists
  • function compare_two_countries_active(country, country2) show plots for both countries
compare_two_countries_active('Germany', 'Russia')
json_compare_two_countries_active('Germany', 'Russia')    # return tuple of json data lists

Module RestGlobalData:

  • class RestGlobalData create object to get only global data
data = RestGlobalData()
  • function get_data() create attributes: new_confirmed, total_confirmed, new_deaths, total_deaths, new_recovered, total_recovered
data.get_data()
  • function show_all_cases_world() show all cases in the world.
data.show_all_cases_world('2020-03-10', '2020-05-01')
data.json_all_cases_world('2020-03-10', '2020-05-01')   # return tuple of json data lists
  • function get_all_countries() return list of shortcut countries.
get_all_countries()

Module Main is simple gui implementation for this api.

covid's People

Contributors

grzesiekkedzior avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.