Skip to content

01 ‐ RAD

Jeff Caldwell edited this page Dec 15, 2023 · 3 revisions

Barrios Technology - Forecasting and Prediction Modeling

Team Noname

Jeff Caldwell

Carlos Cardenas

Josue Lozano

Jeremy Miles

Jonathan Morgan

Introduction

i. Purpose of the system

The ISS analysis tool is a web application that provides analysts at Barrios, an aerospace company, with logistics optimization, usage forecasting, and prediction accuracy analysis surrounding consumable delivery to the International Space Station (ISS).

ii. Scope of the system

The system encompasses secure data input and transport via HTTP, data storage in a relational database, prediction accuracy analysis, logistics optimization analysis, and predictive modeling. All system functionality will be presented to users through a simplified and intuitive web-based interface.

iii. Objectives and success criteria of the project

iv. Definitions, acronyms, and abbreviations

  • ISS: International Space Station
  • IMS: Inventory Management System - Barrios' ISS inventory management datastore
  • ORM: Object Relational Mapper - A framework-specific set of classes and methods for interacting with a database

v. References

  • Django: A "full-stack" web framework written in Python
  • HTMX: A client-side JavaScript library that enhances HTML for easy communication with the server
  • PostgreSQL: A relational SQL database
  • Pandas: A Python library for exploring and manipulating tabular data
  • Prophet: A forecasting algorithm

vi. Overview

The ISS analysis tool will give Barrios analysts the ability to quickly transform user-provided data into three types of analysis: prior prediction accuracy assessment, logistics optimization, and predictive modeling.

Current System

The current system is a simplified approach based on the requirements defined in iteration 2. With this iteration, the code's focus is basic file upload and user data persistence. Additional work is underway to prototype predictive modeling, optimization, and accuracy analysis functionality that will be integrated into the application during a future iteration.

Proposed System

The proposed system will use an HTTP server framework named Django to facilitate a basic Model-View-Controller application structure. With this structure, controllers will respond to HTTP requests sent from a browser-based HTML interface augmented with the HTMX library and coordinate the creation of optimization analysis and predictive modeling using the Pandas data library and the Prophet algorithm. The system will also facilitate uploading and storing client-generated data using PostgreSQL.

i. Overview

ii. Functional Requirements

  • Data upload, validation, and persistence functionality
  • Accuracy analysis, logistics optimization, and predictive modeling algorithms
  • Intuitive and aesthetically pleasing user interface

iii. Non-functional requirements

a. Usability

Interface:

  • The web application should have an intuitive and appealing user interface that works on various screen sizes.

User management:

  • Administrators should be able to create additional users with different levels of access.

Account management:

  • Users should be able to log in, log out, and reset their passwords.

Ease of use:

  • Users should be able to upload and verify data in a straightforward and intuitive way. Additionally, users should be able to view analyses in a high-level overview and have access to more detailed views of each analysis.

b. Reliability

Data:

  • User data should be persisted to the appropriate database table and stored as a redundant flat file on the filesystem.

c. Performance

Client performance:

  • Consideration for browser performance and interface response times should be paramount. Undue amounts of JavaScript should be avoided.
  • The display of large amounts of tabular data should be approached iteratively — using pagination or "infinite scrolling" to load smaller subsets of the data at a time.
  • Visualizations should be lightweight.

Server performance:

  • Persistence of user data should be fast, especially in the face of multi-gigabyte source uploads.
  • Analysis functions should take every measure to perform as quickly as possible.

d. Supportability

  • The application will be easy to use on any modern web browser.
  • Documentation of the underlying application code and application deployment guidance will be provided.

e. Implementation

  • Must work well in all modern browsers.

f. Interface

  • The interface should be responsive.
  • The interface should look good and communicate intention.

g. Packaging

  • The system will be deployed to cloud-based infrastructure using a containerized environment for the server.
  • Could infrastructure must include a PostgreSQL database.

h. Legal

  • The system should use open source libraries with permissive licensing.
  • Client data should remain confidential
  • Student should remain the intellectual property of the students

iv. System Models

a. Scenarios

File Upload Scenario

Initial Assumption: A Barrios analyst is logged into the analysis application and has the required permissions to upload files. The files to be uploaded are in CSV format.

Normal: The analyst presses the "Upload Data" button located in the left sidebar, then chooses a CSV file or a set of CSV files to upload to the application. Uploaded files are immediately validated against a set of "dictionaries" that match known Barrios datasets and inserted into the appropriate user data table. An error is returned to the user if the file does not match a known dictionary. An entry is then created in an upload table and each entry in the user data table is associated with that upload record.

After the upload and persistence process is completed, a list of links to file previews is presented to the user. Each link leads to a page with an HTML table representation of the data they uploaded.

Request Analysis Scenario

Initial Assumption: A Barrios analyst is logged into the analysis application and has the required permissions to view and generate analyses.

Normal: The analyst chooses the type of analysis they want, either a forecast or an optimization, and the date range they wish to use for analysis. Their date-range selection will be limited to a range of historical data in the application's database for that type of analysis.

When they are done making their selections, the application will either return a stored analysis result based on their selection or generate the appropriate analysis and persist the results to the database.

b. Use case model

Upload Data Use Case

Upload Data Use Case

Analysis Use Case Analysis Use case diagram

User Login Use Case User Login Use Case

User Administration Use Case User Admin Use Case

c. Object model

Object Model

Class Model

d. Dynamic Models

Activity Diagrams

User Sign-in User sign-in activity diagram

User Administration User Administration Activity Diagram

File Upload File Upload Activity Diagram

Request Analysis Request Analysis Activity Diagram

Sequence Diagrams

User Registration User Registration

User Administration User Administration

Data Upload Data Upload

Request Analysis Request Analysis

e. User interface - navigational paths

Navigational Paths

Glossary

Prophet: A timeseries forecasting algorithm developed by Facebook/Meta Emmett: A Python web framework that provides routing (controllers), templating (views), and models. The framework also includes an "object relational mapper" for working with relational databases. Object Relational Mapper: Library with methods or functions for interacting with a database without the need for writing queries directly. Inventory Management System (IMS): The database/datastore used by Barrios for tracking logistics and consumables for the International Space Station.

First Iteration

Much of this iteration has been centered around exploring the client data, prototyping analysis functions, and implementing basic functionality.

  1. Implemented the beginnings of a file upload mechanism, which currently takes multipart form data, saves a file to the filesystem, and reads the field names of the provided tabular data. In the future, these field names will be used to determine which UserData table to save the user data to.

Data Controller - Upload Route

Upload Route Code

Prophet Algorithm - [Prototype Notebook]

Prophet Prototype