covid_daily.covid

covid_daily.covid.data(country, chart, as_json=False)

This function will retrieve the coronavirus data overview from all the available countries from worldometers.info/coronavirus/, which contains real time data and statistics from multiple features realted to the virus. For more information, please visit: https://www.worldometers.info/coronavirus/

Parameters:
  • chart (str) – name of the country to retrieve the COVID data from (available values at: covid_daily.constants.AVAILABLE_COUNTRIES)
  • chart – name of the chart to retrieve the COVID data from (available values at: covid_daily.constants.AVAILABLE_CHARTS)
  • as_json (bool) – set to True if overview wants to be retrieved as json, if not, leave default value (False).
Returns:

pandas.DataFrame - data

This function returns a pandas.DataFrame by default (if as_json parameter is set to False, if True a json is returned), containing the COVID data of the introduced chart from the introduced country.

Raises:
  • ValueError – raised if any of the introduced parameters is not valid
  • ConnectionError – raised if connection with Worldometers failed
covid_daily.covid.overview(as_json=False)

This function retrieves the coronavirus data overview from all the available countries from worldometers.info/coronavirus/, which contains real time data and statistics from multiple features realted to the virus. For more information, please visit: https://www.worldometers.info/coronavirus/

Parameters:

as_json (bool) – set to True if overview wants to be retrieved as json, if not, leave default value (False).

Returns:

pandas.DataFrame - overview

This function returns a pandas.DataFrame by default (if as_json parameter is set to False, if True a json is returned), containing the world overview coronavirus data.

Raises:
  • ValueError – raised if any of the introduced parameters is not valid
  • ConnectionError – raised if connection with Worldometers failed