Calendar Dimension Data from the Contoso Dataset
Source: R/data.R
This dataset contains calendar-related information used for time-based analysis in the Contoso dataset. It includes various representations of date-related attributes, such as year, quarter, month, and day, along with indicators for working days. It is useful for time-series analysis and aggregating data by different time periods.
Usage
calendarDetails
Spans whole calendar years, so it extends past the trading period at both ends. Join from calendar when you need a dense series with explicit zeros.
Format
A data frame with 1,461 rows and 17 columns:
- date
-
DateThe actual date for the record. - date_key
-
doubleThe date asYYYYMMDD. - year
-
doubleThe year part of the date. - year_quarter
-
characterQuarter and year, formatted“Q1-2021”. - year_quarter_number
-
doubleA continuous quarter counter,year * 4 + quarter, running from 8085. Not 1-4 — usequarterfor the within-year number. - quarter
-
characterThe quarter within the year (e.g., “Q1”, “Q2”). - year_month
-
characterMonth and year, formatted“January 2021”. - year_month_short
-
characterMonth and year, formatted“Jan 2021”. - year_month_number
-
doubleA continuous month counter,year * 12 + month, running from 24253. NotYYYYMM. - month
-
characterThe month name (e.g., “March”). - month_short
-
characterThe abbreviated month name (e.g., “Mar”). - month_number
-
doubleThe month within the year, 1-12. - day_of_week
-
characterThe full name of the day of the week (e.g., “Monday”). - day_of_week_short
-
characterThe abbreviated day of the week (e.g., “Mon”). - day_of_week_number
-
doubleThe day within the week, starting Sunday = 1, not Monday. - working_day
-
doubleIndicator of whether the date is a working day (1 for working day, 0 for non-working day). This is the flag. - working_day_number
-
doubleA cumulative count of working days elapsed, running 0-1003. Not a flag: it increments on working days and repeats on non-working days.
Source
https://github.com/sql-bi/Contoso-Data-Generator-V2-Data/releases/tag/ready-to-use-data