Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Microsoft Word - 2018_ICT112_assignment_passenger_movements ICT112 TASK XXXXXXXXXX 2018 Semester 1, ATMC Generated Web Site for Aussie Airport Passenger Movements Your task in this assignment is to...

1 answer below »
Microsoft Word - 2018_ICT112_assignment_passenger_movements

2018 Semester 1, ATMC
Generated Web Site for Aussie
Airport Passenger Movements
Your task in this assignment is to write a Python program that generates an
informative web site about Airport Passenger Movements Month by Month
From 1985-Present, showing summary statistics about the number of
domestic and international airport passengers travelling in Australia month by
month. This will allow viewers to get insights into the data, and to identify
trends that are changing over time.
Your program will read some input data from a text file (e.g., a spreadsheet in
comma-separated-values, or CSV, format) and automatically generate several
web pages with links going between the pages. The input data is updated
each month, so the idea is that 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 trends and statistics.
Each web page should show a different aspect of airport passenger
movements, and how that aspect has changed over time. Some of your
pages must have photos and graphs. Here are some suggestions for different
pages you might generate:
 Passenger movements per year, and how this rate is changing over
 Passenger movements per Australian airport;
 Passenger movements rates per year for each state (identify airport
 Passenger movements with the highest seasonal impact, eg Summer
(12,1,2) vs Winter (6,7,8)
 Seasonal passenger movements compared to each state
 The airports with the largest growth (total amount of passengers
served) over a period of time

Important goals:
A. For most of these pages, it would be even more interesting and useful
if you could display the change in these statistics over time, such as
comparing 1985 against 2017, or the first 5 years against the most
ecent 5 years.
ICT112 Assignment
2 ICT112 TASK 2 2018

B. Also, for many of these pages, it would be more meaningful to airline
companies if you could display the overall (all airports) seasonal
statistics relative to the total number of passengers that were tourists
(short stays) or permanent residents. That is tourists = (total number of
international a
ivals (Int_Pax_In) subtracted from the total short term
ivals). Seasons can be identified with the month code, eg Summer
(12,1,2), Winter (6,7,8) and you may select any time period (year) you
wish. To generate some of these relative statistics , you will need to
obtain additional data from other sources, such as the file XXXXXXXXXXcsv
included. You can see other sources at the ABS government website -
(http:[email protected]/DetailsPage/3401.0Fe
%202018?OpenDocument). You may need to convert those to CSV
first. You may identify other relative statistics using these sources if you
wish, but make sure you clearly document all your data sources.
C. There must be one top-level page, index.html, that is the entry point
for the web site. This must give an overview of the whole website, and
should have links to all the other pages.
D. All the HTML files and graphs/tables in your whole web site must be
generated by your Python program, so that your whole web site can be
automatically updated when the input data values are updated, just by
erunning your Python program.
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), your input
data files, all your generated output web pages;
and 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
o Title, plus your name and student number;
o Introduction, which explains the structure of your web site, and
To create a .zip file on a
Windows PC, right-click on
the folder containing all your
Task 2 files, then select
'Send to / Compressed
(zipped) folder'. On a Mac,
ight-click on your folder and
select the 'Compress
foldername' option.

the features / statistics / graphics that you have implemented;
o Web-site overview, to explain the structure of your web site;
o Python code, preferably
oken 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 XXXXXXXXXXweb
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
 Data Analysis and Visualisation [6 marks]. Your program should
analyse the data and generate (and include in the web pages):
o one or more informative graphs/tables that show various
aspects of the data;
o summary statistics for various group of data (e.g. an average,
or maximum, or minimum, or sum) over a period of time
o some relative statistics, as mentioned in goal B above.
 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; co
ect 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 li
aries 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.
Answered Same Day May 18, 2020 ICT112 University of the Sunshine Coast


Abr Writing answered on Jun 01 2020
143 Votes
ICT112 Assignment.ipyn
"cells": [
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"from flask import Flask, render_template, request, url_for, redirect, Markup\n",
"import os\n",
"import json\n",
"import pandas as pd\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"import warnings\n",
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"IMAGES_FOLDER = 'Images'\n",
"INDEX_PAGE = '/'\n",
"def create_folder(folder): \n",
" if not os.path.exists(folder):\n",
" os.makedirs(folder)\n",
" \n",
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"df = pd.read_csv('./1.csv', encoding = 'utf8')\n",
"df2 = pd.read_csv('./2.csv', encoding = 'utf8')\n",
"df2 = df2.drop(df2.index[[0,1,2,3,4,5,6,7,8]])\n",
"df2 = df2.iloc[[0,1,2,3,4,5,6,7,8,9,10,11]].reset_index().drop('index',axis=1)\n",
"df2 = df2[['Number of movements ; Total (Country of stay
esidence) ; Short-term Visitors a
iving ;']]\n",
"df2.columns = ['Tourists']\n",
"df2 = df2.apply(pd.to_numeric)\n",
"#creating dataframe with information per year per airport\n",
"dfg_airport = df.groupby(['AIRPORT','Year'])\n",
"df_airports = dfg_airport.aggregate(np.sum).reset_index()\n",
"df_airports = df_airports.drop('Month',axis=1)\n",
"#creating a list of uniquire airport names\n",
"airports = df['AIRPORT'].unique()\n",
"#creating a dictionary of states with their respective airports\n",
"states_dict = {\n",
" \"New South Wales\": [\"BALLINA\",\"SYDNEY\",\"CANBERRA\",\"NEWCASTLE\"],\n",
" \"Northern Te
itory\": [\"ALICE SPRINGS\",\"DARWIN\"],\n",
" \"South Australia\":[\"ADELAIDE\"],\n",
" \"Tasmania\":[\"HOBART\",\"LAUNCESTON\"],\n",
" \"Vicoria\":[\"MELBOURNE\"],\n",
" \"Western Australia\":[\"KARRATHA\",\"PERTH\"],\n",
"#creating a dictionary of states with their respective information dataframes\n",
"df_states_dict = {}\n",
"for state in states_dict:\n",
" df_states_dict[state] = df_airports[df_airports['AIRPORT'].isin(states_dict[state])].drop('AIRPORT',axis=1)\n",
" df_states_dict[state] = df_states_dict[state].groupby(['Year']).aggregate(np.sum).reset_index()\n",
" \n",
"#creating seasonal dataframes per airport \n",
"df_summer = df[df['Month'].isin([12,1,2])].drop('Month',axis=1).groupby(['AIRPORT','Year']).aggregate(np.sum).reset_index()\n",
"df_winter = df[df['Month'].isin([6,7,8])].drop('Month',axis=1).groupby(['AIRPORT','Year']).aggregate(np.sum).reset_index()\n",
"#creating dictionaries of states with their respective seasonal information dataframes\n",
"df_states_summer_dict = {}\n",
"for state in states_dict:\n",
" df_states_summer_dict[state] = df_summer[df_summer['AIRPORT'].isin(states_dict[state])].drop('AIRPORT',axis=1)\n",
" df_states_summer_dict[state] = df_states_summer_dict[state].groupby(['Year']).aggregate(np.sum).reset_index() \n",
"df_states_winter_dict = {}\n",
"for state in states_dict:\n",
" df_states_winter_dict[state] = df_winter[df_winter['AIRPORT'].isin(states_dict[state])].drop('AIRPORT',axis=1)\n",
" df_states_winter_dict[state] =...

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here