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

calendar

Details

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

Date The actual date for the record.

date_key

double The date as YYYYMMDD.

year

double The year part of the date.

year_quarter

character Quarter and year, formatted “Q1-2021”.

year_quarter_number

double A continuous quarter counter, year * 4 + quarter, running from 8085. Not 1-4 — use quarter for the within-year number.

quarter

character The quarter within the year (e.g., “Q1”, “Q2”).

year_month

character Month and year, formatted “January 2021”.

year_month_short

character Month and year, formatted “Jan 2021”.

year_month_number

double A continuous month counter, year * 12 + month, running from 24253. Not YYYYMM.

month

character The month name (e.g., “March”).

month_short

character The abbreviated month name (e.g., “Mar”).

month_number

double The month within the year, 1-12.

day_of_week

character The full name of the day of the week (e.g., “Monday”).

day_of_week_short

character The abbreviated day of the week (e.g., “Mon”).

day_of_week_number

double The day within the week, starting Sunday = 1, not Monday.

working_day

double Indicator of whether the date is a working day (1 for working day, 0 for non-working day). This is the flag.

working_day_number

double A 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