This code does not represent the finished product and is currently completely built upon the loose requirements provided by @GHAFHA. This README is however up to date with all current changes.
Once you have downloaded the repo, either via clicking the green button in the top left of the repo and selecting Download ZIP or via cloning the repo locally, and Python 3.11 or higher, you can follow the below instructions.
- If you have not already, use
pip
to install the packagepipenv
, you can do this by opening a command line and entering the following commandpip install pipenv
- Once you have pipenv, select the directory in which you unpacked/cloned the repo and run the command
pipenv install
- After the install process completes, you can then run the test script by using the following command
pipenv run python test.py
- Upon running this command, you should automatically be presented with a screen that looks like this, this is how all data will be displayed, based upon the supplied parameters when using the class.
As shown in the test.py
file, it is currently necessary to double define the dataset that you wish to use when displaying data.
- Create a class object of the
handler.py
by adding the following code to your program. The plot_functions constructor takes one argumentfile_path1
, which is the respective file path to the data that you wish to use upon initialization, (although this has little use with respect to thedisplay_plot
function, as we wanted to be able to supply a different data set each time if need be)
from handler import plot_functions
plotFuncs = plot_functions(file_path1="data/aerodata.csv")
- After you have created an object of the handler class, you can then call the
display_plot
function using the following code. (display_plot
uses 4 arguments,data_path
the file path to the CSV storing the data,x
aList
object that holds the indices of the required x values to be plotted,y
a string object that contains the index of the y value to be plotted, andto_file
which will write the processed data to a file.
plotFunc.display_plot(data_path="data/aerodata.csv", x=["Rear Rideheight", "Front Rideheight"], y="ClA", to_file=False)
The above example uses the file data/aerodata.csv
as its source of data, and then plots the Rear Rideheight
and Front Rideheight
as a function of ClA
. Finally, it does not write this data to a file, hence to_file
being False