%% Week 3 Challenge — Solution
% Missing data handling, YoY growth, and comparison to a full benchmark.

clear; clc; close all;

%% 1) Load datasets
% Missing version from repo:
    %>>> Students complete below <<<

% Full dataset used in class
    %>>> Students complete below <<<


%% 2) Build timetables
    %>>> Students complete below <<<


%% 3) Diagnose missing
    %>>> Students complete below <<<


% Check if the Time columns are exactly equal
%Hint: substitute the two [] [] with the names you gaveto your
%timetables.Time
%are_times_equal = isequal([DATAMISSING.Time], [FULL.Time]);
%fprintf('Are the Time columns exactly equal? %d\n', are_times_equal);


%% 4) Clean missing: choose approach
% fillmissing (keeps full time span)
    %>>> Students complete below <<<


%% 5) Compute YoY for both series
%Hint: YoY from quarterly data so first 4 entries will be NaN. CHECK!
    %>>> Students complete below <<<


%% 6) Plot comparison and save figures
    %>>> Students complete below <<<


%% 7) export cleaned datasets
%HINT: convert timetables back to tables
    %>>> Students complete below <<<

