plot_geom_bar_over_time: Plot Bar Chart over Time

View source: R/plots.R

plot_geom_bar_over_timeR Documentation

Plot Bar Chart over Time

Description

This function creates a bar chart by area type over time, based on the data provided in the input dataframe. The bars represent the number of records in each facility for each time interval.

Usage

plot_geom_bar_over_time(
  df,
  facility_col,
  date_col,
  date_lbl,
  date_break_str,
  date_format,
  start_date,
  end_date,
  max_val = NULL,
  text_size = 7
)

Arguments

df

a dataframe containing the data to plot

facility_col

a string indicating the column name of the facility variable in df

date_col

a string indicating the column name of the date variable in df

date_lbl

a string indicating the x-axis label for the plot

date_break_str

a string indicating the date format for the x-axis ticks

date_format

a string indicating the date format for the x-axis labels

start_date

a string indicating the start date for the x-axis

end_date

a string indicating the end date for the x-axis

max_val

an optional numeric indicating the maximum y-value for the plot

text_size

an optional numeric indicating the size of the text in the plot

Value

a ggplot object displaying the bar chart over time


Thaliehln/timci documentation built on April 8, 2024, 3:38 p.m.