Gavin Uhran (gavinuhran), Tom Henry (tomkhenry), Mike Prieto (michaelpri10)
This project is not for the company SpaceX, but for an external industrial representative from SpaceX and University of Notre Dame alum whom we are partnering with.
For the SpaceX Preternship Project, we worked with Ryan Green, an external industrial representative at SpaceX, to create the Vendor Analysis Dashboard. The dashboard collects vendor data from uploaded Excel files to provide data visualizations in Python for decreasing overhead and increasing leverage with suppliers. It runs on a Heroku server at http://vendor-analysis-app.herokuapp.com/ and utilizes the Dash by Plotly data visualization framework. The GitHub repository can be accessed at https://github.com/gavinuhran/SpaceX-Preternship-Project.
-
Web Address Access the Vendor Analysis Dashboard at http://vendor-analysis-app.herokuapp.com/
-
Importing Files All import files MUST be an XLSX file. Additionally, all files must store data in the following columns:
Vendor | Days Past PO | Lot Size | Nonconforming Units | Units Downstream Failure | Cost (% Away from Target) |
---|---|---|---|---|---|
vendor |
integer |
integer |
integer |
integer |
percentage |
- Adjusting Sliders
Adjust the sliders to manipulate the weighted variables:
- Days past PO, nonconforming units, units downstream failure, and cost away from target
- Vendor Comparisons Select 'Vendor Comparisons' from the tabs at the top of the page. From this tab, use the checklist to display the vendors you want to observe, and the dropdown to display compare the vendors performance in a specific category.
include/
dictionary_functions.py
: Provides sorting and color hashing for the Vendor Dictionaryinit_data.py
: Imports data and reads intoVendor.py
andOrder.py
Order.py
: Class for storing individual orders and calculating order scoresVendor.py
: Class for storing individual vendors and calculating vendor scoresxlsx_to_csv.py
: Class for converting XLSX files to CSV files, and storing them indata/
src/
assets/
main.css
: CSS styling for website
tests/
fake_data_upload_test.py
: Test to ensure initial data import was functioning correctly
app.py
: The application template, callback features, and deployment
requirements.txt
: Python environment requirementsruntime.txt
: Python version to run server on
To run the application, you simply need to use the virtual environment that we have provided in this GitHub repository. In the main directory of the app, you should run in the command line:
$ source venv/bin/activate
$ python src/app.py
and then access the application at http://127.0.0.1:8050/ in your browser.
To run this program without the virtual environment, you must install the following libraries using pip
:
$ pip install Flask dash==1.17.0 pandas plotly
And then you can run the app from the main directory of the app with:
$ python src/app.py
In order to push to Heroku, you must do first login to Heroku on the command line if you have not already:
$ heroku login
Then you must add the Heroku URL as a remote repository:
$ git remote add heroku https://git.heroku.com/vendor-analysis-app.git
You can then push to the application using:
$ git push heroku master
Feature | # Orders | Elapsed Time | Speed |
---|---|---|---|
Upload | 100,000 | ~10 sec | 10,000 orders/s |
Slider Change | 100,000 | ~1 sec | 100,000 orders/s |
Note: we deleted this sample input file because of its size.
We wanted to highlight some known issues to prevent confusion about certain aspects of the program.
- Invalid File Format - There is currently no indicator if a user has uploaded an invalid Excel file format (incorrect columns). The program should continue to be irresponsive until an Excel file with correct formatting is uploaded