ICT112 Assignment

Generated Web Site for Sports Club

Your task in this assignment is to write a Python program that generates a small web site for a local sports club. It will read some input data from a text file (e.g., a spreadsheet in comma-separatedvalues, or CSV, format) and automatically generate several web pages with links going between the pages. The idea is that as the season progresses, and more games are played, your program will be run on the updated input data each week or each month to automatically generate an updated web site that shows the latest results.

Each web page should show a different aspect of the club activities. For example, you might have one web page for each team in the club, with that page displaying all the games that that team has played, with the scores shown for each game (and possibly the schedule of future games to be played). Or you might have a different page for each grade or age level, showing all the teams and results for that grade. Some of your pages must have photos and graphs.

There must be one top-level page, called index.html, that is the entry point for the web site. This must describe the whole club, and should have links to all the other pages.

Input Data

You first task is to choose a sport or club, and get some suitable input data.. If you play a sport yourself, see if you can get some data files for your sport. Or talk to friends and relatives and see if they are involved in any clubs or sports that would like to have a prototype web site generated for them.

If you cannot find, beg, or borrow any real data for a sports club, there are web sites that list teams and results for many different local sports:

  • Fox Sports Pulse: http://sportstg.com/our-sports-network
  • Super Netball: https://supernetball.com.au (but cleaner data from https://en.wikipedia.org/wiki/2017_Suncorp_Super_Netball_season );
  • Sunshine Coast Football Club: http://au.soccerway.com/teams/australia/sunshine-coast-fc/12831/matches/
  • Sunshine Coast School Sport: https://sunshinesport.eq.edu.au

Some of them have results for previous years, as well as partial results for this year. So choose a sport you are passionate about, and copy some grades, team names, and even scores from those pages and put them into a CSV file. You need enough data to be able to generate several interesting web pages - ideally your CSV file should have at least 6 useful columns and a hundred or more rows. If you cannot find a local sports club, you can use your favourite national club.

Learning Objectives

In this assignment you will learn how to:

  1. use top-down design to divide a larger data processing task into parts;
  2. use Python to read and write text files (CSV data files);
  3. use functions to raise the abstraction level of your program; 4. analyse data to produce graphs and summary statistics; 5. use string and list methods to generate HTML.

Marking Criteria

This assignment is due at the end of Week 13 (Friday 11:55pm). You must submit your files in a single .zip file, via Blackboard. Your .zip file should include your Jupyter Notebook (containing your Python program), all your input data files, all your generated output web pages; any image files, graphs and CSS files that are used in your web pages.

It will be marked out of 30. The marking criteria is as follows:

  • Jupyter Notebook Structure [6 marks]. This should use markup cells and headings to divide your program into parts:
    • Title, plus your name and student number;
    • Introduction, which explains your club/sport, and describes where you obtained the data and the format of the input data (e.g. the meaning of each column);
    • Web-site overview, to explain the structure of your web site;
    • Python code, preferably broken into subsections for each part of your program;
  • Web Design and Functionality [6 marks]. To achieve maximum marks, the generated web site should contain several (5-10) web pages, with an entry page (index.html) that links to all the other pages, and the other pages linking back to the entry page; good use of images; the layout and organisation of the pages should be elegant and readable, with appropriate choices of colours; good use of HTML tables for layout; the generated pages should conform to HTML standards; a simple CSS file should be used to specify the look of the web pages (this CSS file does not have to be generated by your program).
  • Data Analysis and Visualisation [6 marks]. Your program should analyse the data and generate (and include in the web pages):
    • one or more informative graphs that visualise various aspects of the data (e.g. the weekly scores or times of each team/athlete);
    • and summary statistics for each team/athlete (e.g. the number of games that each team won and lost, or the average score, or average and best times);
  • Python Functions [6 marks]. Most your Python code should be inside functions; function parameters should be used to make your program concise and flexible; each function should include appropriate function docs; correct and meaningful naming conventions should be followed for function names and variable names.
  • Program Design and Algorithms [6 marks]. To achieve maximum marks, your program should be elegantly designed: be concise; use constants for important values/strings that are likely to change; use appropriate data structures (e.g. strings, lists, tuples, dictionaries, or objects) to store the data; make good use of Python libraries and methods (e.g. for strings and lists); and be reasonably efficient during execution (e.g. reading the input files just once, rather than many times). A key criterion is that your program should not contain blocks of code that are duplicated or similar (such blocks of code should be simplified into a single block of code by good use of loops or functions).

Note: the generated web pages should NOT contain any Javascript, as the goal of this assignment is to generate simple static web pages using Python.