Skip to content

rosseji/timemerge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

timemerge

binning function for time series

CAUTION! REQURIES DPLYR 0.7.0

Install using:

devtools::install_github("rosseji/timemerge")

Example call:

df_binned <- binner(df = df_coff,
                    date_var = Item.Time.Created.date,
                    cat_var = Item.Name,
                    val_var = Prices,
                    interval = "hour")
                    
ggplot(df_binned, aes(x = bin_id, y = Total, colour = Item.Name)) + 
  geom_line()
  

Has a new argument method to specify the math:

df_binned <- binner(df = df_coff,
                    date_var = Item.Time.Created.date,
                    cat_var = Item.Name,
                    val_var = Prices,
                    interval = "hour",
                    method = "avg")

Weekly binning Weekly binning

Daily binning Daily binning

About

binning function for time series

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages