% Script for Assignment 2

% Invoke readTennisData
tennisData = readTennisData('tennis_matches.txt');

% Extract Player Data and Country Statistics
[playerData,countryStats] = extractPlayerData_countryStats(tennisData);

% Summarize Player Match Statistics
playerMatchStats = summarize_playerMatchStats(playerData,tennisData);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%  Do not modify the code above.                 %%%%%
%%%%  Add code below to complete the questions and  %%%%%
%%%%  tasks posed in the Assignment 2 document.     %%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% 1. How many players are there on tour?
n_players = size(playerData,1);
fprintf('\n1. %d players were on tour.\n\n', n_players)

%% 2. How many countries are represented on tour? Draw a bar graph to show 
%  the number of players from each country.



%% 3. How many tournaments did Rafael Nadal win during this calendar year?



%% 4. What is the head to head record between Novak Djokovic and Rafael 
%  Nadal?



%% 5. How many matches are played on each type of surface? Draw a pie chart 
%  to visualize this.



%% 6. How many times did a top seed at the tournament win the tournament?



%% 7. What fraction of players are left-handed?



%% 8. How many tournaments had champions who are left-handed?

