Code Monkey home page Code Monkey logo

aips's Introduction

AIPS

Introduction

This program reads a file, where each line contains a timestamp (in yyyy-mm- ddThh:mm:ss format, i.e. ISO 8601) for the beginning of a half-hour and the number of cars seen that half hour.

An example file can be found here. Clean input is presumed as these files are machine-generated.

The program outputs four files:

  • The number of cars seen in total
  • A sequence of lines where each line contains a date (in yyyy-mm-dd format) and the number of cars seen on that day (eg. 2016-11-23 289) for all days listed in the input file.
  • The top 3 half hours with most cars, in the same format as the input file
  • The 1.5 hour period with least cars (i.e. 3 contiguous half hour records)

Example output files for the input example file can be found here.

Getting Started

Dependencies

  • Apache Maven 3.8.6
  • JDK 19

Build and Develop

The tool chain is standard Maven. To build this project run:

mvn install

and install the JAR to the local Maven repository.

Load the pom.xml file into the IDE of choice.

Testing

Testing locally can be done with Maven as well:

mvn clean test

Running locally

The project can be run locally as below:

mvn spring-boot:run

By default, this will run the application over the example input file. The output will be appended to the files in the output directory.

These input and output directory/files are externalised properties and can be changed as required in the application.yml file.

The relevant properties are:

traffic:
  aips:
    file:
      input: io/input/input.txt
      output:
        totalCars: io/output/totalCars.txt
        dailyTrafficCount: io/output/dailyTrafficCount.txt
        topThreeHalfHoursWithMostCars: io/output/topThreeHalfHoursWithMostCars.txt
        oneAndAHalfHourWindowWithLeastCars: io/output/oneAndAHalfHourWindowWithLeastCars.txt

Deployment

There is no automated deployment pipleline configured for this project at the moment.

aips's People

Watchers

Abhi Bajaj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.