granularity Module
Contains granularity definitions for time and location.
The granularities are organized as follows:
You work with a granularity by specifying it in an enricher function. For example, when using the HolidayEnricher class methods to enrich data, specify the TimeGranularity as an input parameter to the method.
Classes
| DayGranularity |
Defines a time granularity of day. |
| Granularity |
Defines the base granularity class. |
| HourGranularity |
Defines a time granularity of hour. |
| LocationClosestGranularity |
Defines a closest location granularity.
All possible locations will be ranked by spherical distance of two
locations, the Initialize with various configs. cord_count is the count of customer_data after dropDuplicates(), if it's bigger than _cord_limit, we'll use _lower_fuzzy_boundary to do the rough filtering, otherwise, use _upper_fuzzy_boundary. all possible locations will be ranked by spherical distance of two locations, we'll select _closest_top_n to do further join. |
| LocationGranularity |
Defines the base location granularity. |
| MonthGranularity |
Defines a time granularity of month. |
| TimeGranularity |
Defines the base class for time granularity. |