CovidTracker.plot_time_series

Module Contents

Functions

plot_ts(df, metric, start=None, end=None)

Creates a plot displaying the number of

CovidTracker.plot_time_series.plot_ts(df, metric, start=None, end=None)
Creates a plot displaying the number of

covid cases over time.

Parameters
  • df (pd.DataFrame) – Pandas dataframe containing covid data to plot.

  • metric (str) – A column chosen from the dataframe to plot in time order

  • start (datetime, optional) – The beginning date of the time series plot. Format needs to be: YYYY-MM-DD

  • end (datetime, optional) – The ending date of the time series plot Format needs to be: YYYY-MM-DD

Return type

Plot object

Examples

>>> plot_ts(covid_df, "active_cases")