Qlik Community

QlikView Documents

Documents for QlikView related information.

Tennis data - ATP and WTA

cheenu_janakira
Contributor

Tennis data - ATP and WTA

Hi everyone,

For tennis fans out there, I built 2 apps on for Women's tennis data (WTA) and one for men's (ATP).

Jeff Sackman ! !was kind enough to share some tennis data and the apps are built on these. Please have a look at the script (the script itself is not elegant, but the point was to make the front-end. It is 2 phased:

generate QVDs from the data files;

build the final data model.

You can use it to upload more data from Jeff Sackman's tennis data as soon as it becomes available.

BELOW: NEW! "TennisData_v1.2.qvw" (further slight fixes: dated 23 April 2018). Combines Men and Women data under one app.

New version 1.2:

- Slight data model fixes.

- Menu layout changed.

- Player > Tournaments > Tournament Draw: colour-highlight of winner, runner-up and 2 semi-finalist; [ii] Grand Slam Qualifier Draw.

On Home page (via button option):

- Imported tournament calendar from Wikipedia to show tournaments being played in current weeks (using week number).

- Created a link to ATP and WTA RSS feeds to get latest articles from there.

- New Davis Cup and Fed Cup pages under "Tournaments" menu.

Instructions:

  1. All files including empty sub-folders and one country Excel spreadsheet given in ZIP file;
  2. On Home Page: run "Refresh RAW Data" ("Loading Type" Input box) to fetch data from online tennis database, then select "Final DataModel" to populate the app with data;
  3. Once step "Final DataModel" is loaded, make sure the "Men" or "Women" is an 'always one selected value' in order not to get error messages for the menu navigation when 'clearing selections';
  4. Navigate to "Player > Tournaments > Tournament Draw" page and make sure "Round of 16 Onward" or "Full Tournament" is 'always one selected value'.


Please note: I don't believe in the "Best Player Ever" discussion. However, seeing it is a question often asked, I tried using analytics to help answer the question.

Have fun,

Cheenu

P.S. Uses a "dropdownMenu" extension, I think by @Petra Bloem (dropdown menu extension: Veel bedankt, Petra). Attached are zip files of extension for v2.1 for ATP and WTA, respectively, which are colour-themed.

001ATP.png

Tags (2)
Attachments
Comments
falgunip
New Contributor III

useful information

rospigliosi
Contributor

Very nice, but (I don't know why) the extension does not work on my desktop .

cheenu_janakira
Contributor

Hi Camillo,

I'm on v12 SR2, which version are you on?

Kr,

Cheenu

cheenu_janakira
Contributor

Can you test with the original extension and see if you don't have issues with the attached QVW? It would then be easier to establish where the issue comes from.

dropdown menu extension

hector_munoz_in
Valued Contributor

Thanks for sharing! I love Qlik sport apps!!!

delmak2000
Contributor

well done cheenu.janakiram

great job

cheenu_janakira
Contributor

Hi,

Glad you like it. I will keep changing the app when the data becomes available. If you have manners in splicing or analysing the data in different ways, I would be glad if you shared these.

Kr,

Cheenu

cheenu_janakira
Contributor

v2.1.2 changes:

  • Script is cleaned up and more legible. A variable (vRootFolder) has been placed in the script to point to the Root folder, if you want to refresh new data when it's made available by Jeff Sackmann. If this variable is left blank, the script should run
  • If you are within 4 weeks of a grand slam, a logo shows on Home page which also makes that tournament as a selection if the logo is clicked on.
  • When one player is chosen in Player Overview, a table shows up with all that player's tournament victories.
  • When 2 players selected in Head-To-Head page, Player Overview page shows comparison charts.
  • Head-To-Head know has a time/year comparative chart of matches against the 2 players selected.
  • Head-To-Head have additional metrics showing the number of Tournaments Won, times Runner-up, Semi-Finalist and Quarter-Finalist for each player selected.
  • Grand Slams page has a new table showing number of times a player has reached last 3 rounds (1/4s onward) in a Grand Slam and the years that they won a grand slam.

(Only works well in Ajax/Web mode, otherwise table entries don't align) New menu item and page: Player > Tournaments > Tournament Draw. Gives the whole draw of the tournament with all the matches separated between rounds and highlights the progress of the Winner and Runner-up through the rounds in the draw. Gives names of Winner, Runner-Up and Semi-Finalists at the top.

Short instructions on running script when new data is made available and you update underlying CSVs with Jeff Sackmann's new data:

The Root folder must have one sub-folder "\CSV" with 3 further sub-folders

"ATP Tour", "Futures" and "Challenger", these must contain the CSV files that come from Jeff Sackmann's website and must have naming conventions, respectively, "atp_matches_[Year of Data].csv", "atp_matches_futures_[Year of Data]" and "atp_matches_qual_chall_[Year of Data].csv".

A zip file is attached with existing source data. Please update these files with Jeff's data when new data is made available.

The Root folder must contain a sub-folder "\QVD" where core data/QVD get written to (only 2 files, the FACT table "ATPData.qvd" and "MaxMatchNumber_Map.qvd".

The Root folder must contain a sub-folder "\SupportData" which contains 2 CSVs: "atp_players.csv" which comes from Jeff Sackmann's data and is a CSV of the same name and "IOC_Country_Codes.csv".

When new source data is available, select "CSV to QVD" from the Input Box drop-down on the front-end Home page.

Once these have been generated/renewed, select "Final QVD Build" from the same drop-down box.

Enjoy and please feel free to share new thoughts/metrics with the Community.

santiago_respane
Valued Contributor

Great contribution cheenu.janakiram‌!!

Thanks for sharing.

cheenu_janakira
Contributor

No worries. Please feel free to share any thoughts or analytics objects (even changes on the data model).

Cheerio,

C  ;o)

Version history
Revision #:
1 of 1
Last update:
‎06-13-2017 06:52 AM
Updated by: