Develop shellscript which accepts cmd arguments

Assignment Help Programming Languages
Reference no: EM131505663

OPEN SOURCE TOOLS AND SCRIPTING ASSIGNMENT

The goal of this assignment is to assess your understanding of the use of the shell and open source tools to effectively report on and visualise data from a large dataset. You will be assessed on the clarity and quality of your shellscript(s) to examine and report on the data. While the efficiency of your shellscript will not be assessed, you should take care to avoid any excessive slow practices.

The tasks

Perth's Public Transport Authority (PTA) provides public access to its scheduled times, stop locations, and route information from its webpage www.transperth.wa.gov.au/About/Spatial-Data-Access. You may download your own copy of the data (about 90MB) by clicking on the first link "By downloading the data you are agreeing to the terms of the License..."

The data is released as a collection of inter-related textfiles following the Google Transit Feed Specification (GTFS), which is also used by many other public transport companies, worldwide.

1.
Develop a shellscript which checks for and accepts five command-line arguments:
- the name of a directory containing a set of GTFS files, and
- a starting and an ending location (as latitude/longitude pairs, typically home and work), and produces a simple HTML webpage describing the "best" public transport route that should be taken to travel between the locations. The starting time of the journey should be as close as possible to (and obviously, after) the time the shellscript is run, so that the traveller can load the HTML page onto their smartphone and then commence their journey (ideally, a version of your program would run on the smartphone).

The definition of the "best" route is up to you, but reasonable ones include minimal walking time, minimal waiting time, and minimal travelling time.

Some simplifying assumptions
o The pathway from starting location to destination will typically involve walking to the starting bus, train, or ferry stop, travelling on the bus....., and walking from the final stop to the destination.
o Assume that each walking segment (if any) is shorter than 1000 metres.
o There is no need to consider the day-of-the-week on which a particular service runs. Assume that all services run every day.
o In order to reduce the number of potential journeys that need searching, the actual travel on a bus, train, or ferry, must commence within one hour of leaving the starting location (home).

The shellscript's output, an HTML page, does not have to be fancy nor contain any embedded links. It should simply list the starting and stopping bus-stops, the route number, times when the traveller should get on and off the bus (or train...). Your chosen and reported route should consist of only one bus, train, or ferry journey. Your webpage should report an error if a single journey (one bus, one train, ...) cannot be found between source and destination.

Suggested steps for this task
o Consider how you would travel between the two locations if you were a dumb robot with unlimited time, patience, and energy.
o Download the GTFS dataset, and skim its documentation webpage. See what is in each textfile, determine which files will be required, and which files not required.
o Discuss the problem with a colleague (your project partner?) as to how you'd each attack the problem. Merge. Iterate.
o Find the bus, train, or ferry stops that are within 1000m (walking distance) of the starting location.
o Determine which bus, train, or ferry routes use each of those stops, today, after the journey's starting time.
o Do any of those bus, train, or ferry routes pass within 1000m (walking distance) of the destination? Which journey has the shortest total time?

2.
Embed a Google Map into your webpage, showing the locations and times of the starting and stopping bus-stops, and the required route numbers.

3. Extra credit

This task is optional, but you may wish to attempt it to recover any lost marks from the first two tasks. The maximum mark for the whole assignment remains capped at 30 marks.

Extend your shellscript so that the reported route may require more than one bus, train, or ferry journey. The route chosen and printed may now require one or more transfers between different, interconnecting bus, train, or ferry routes. Thus, the webpage should identify when a transfer is required. Don't forget to include the multiple journey information on your Google Map, as well.

To calculate the distance, in metres, between a pair of latitude/longitude coordinates, you'll need to employ the haversine formula.

You may wish to perform the calculation by invoking a single program or, if using AWK, by calling an AWK function. Here's the code for each:
- haversine.c (which will require compiling - see comments in file), and
- haversine.awk (which should be embedded in a larger AWK script).

Reference no: EM131505663

Questions Cloud

Find what interest rate was paid on the construction bonds : The Golden Gate Bridge in San Francisco was financed with construction bonds sold for $35 million in 1931.
Discuss how and when the concept could be used by eec : Discuss how and when the concept could be used by EEC. Discuss the advantages and disadvantages of the concept as it relates to EEC.
What interest rate was paid on the construction bonds : Rework Problem assuming the construction bonds had been retired as an annuity (i.e., equal uniform annual payments had been made to repay the $35 million).
What should be contained in a research proposal : What is Malleability of Memory and how can it affect it legal cases.What should be contained in a research proposal?
Develop shellscript which accepts cmd arguments : Develop a shellscript which checks for and accepts five command-line arguments - Embed a Google Map into your webpage
Consider the accompanying cash-flow diagram and find terms : Consider the accompanying cash-flow diagram. If P = $1,000, A = $200, and i% = 12% per year, then N = ?
What amount must be remitted to state for octobers sales tax : Total receipts for October amounted to $29,400. If the sales tax rate is 5%, what amount must be remitted to the state for October's sales taxes?
How many years will it take to completely deplete account : Suppose that your rich uncle has $1,000,000 that he wishes to distribute to his heirs at the rate of $100,000 per year. If the $1,000,000 is deposited in a bank
Prepare an oral presentation on substance misuse : HSH 703 Health Promotion Assessment Task. Prepare an oral presentation on substance misuse. Task - Evaluating Health Promotion Action for the 21st century

Reviews

Write a Review

Programming Languages Questions & Answers

  Create a project displays aisle number of movie category

A Search Button should located the correct location. from the array and display it in a lable. Make sure that the user has selected a category from the list and use the list box SelectedIndex property to find the appropriate aisle number.

  Weka answer in the file i upload and do the best this

answer in the file i upload and do the best. this assignment would need use weka on last question. please follow

  Write a program that reads in investment amount

Write a program that reads in investment amount, annual interest rate, and number of years, and displays the future investment value

  Print the list of array of numbers

Print the list of array of numbers and then print linked list with the equivalent character side by side to. output file Specifications:

  Design an employee class

Design an Employee class that has fields for the following pieces of information: Employee Name and Employee Number

  The use of the break statement in a switch statement

The use of the break statement in a switch statement is[A].optional[B].compulsory

  Define object-oriented programs

We are working on Object-Oriented Programs and I am lost.

  Describe the most challenging aspect of the assignment

Describe the most challenging aspect of the assignment. Describe the most difficult aspect of the assignment to understand. Provide any suggestions for improving the assignment in the future.

  Describe the key elements for effective documentation

Describe at least six types of user and technical documentation that you are likely to come across in an ICT environment - describe the process that you would use to review current versions of technical and user documentation.

  Program to execute on cse unix environment

Your program should be written in C++, execute correctly on CSE unix environment, and compile using g++ compiler using makefile.

  Develop logic to accept number of passengers-zones as input

Develop the logic for a program that accepts the number of passengers and zones crossed as input. the output is the ticket charge.

  Design a program that asks the user to enter a string

Sum of Digits in a String Design a program that asks the user to enter a string containing a series of single digit numbers with nothing seperating them.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd