Working with custom business days
Companies have different working days worldwide, influenced by the region or territory they belong to. For example, when working with time-series data and depending on the analysis you need to make, knowing whether certain transactions fall on a workday or weekend can make a difference. For example, suppose you are doing anomaly detection, and you know that certain types of activities can only be done during working hours. In that case, any activities beyond these boundaries may trigger some further analysis.
In this recipe, you will see how you can customize an offset to fit your requirements when doing an analysis that depends on defined business days and non-business days.
How to do it…
In this recipe, you will create custom business days and holidays for a company headquartered in Amman, Jordan. In Jordan, the working week is from Sunday to Thursday, whereas Friday and Saturday are the 2-day weekend. Additionally, their National Day (a holiday...