Week 6 - Data analysis
AIM: To perform the data analysis of a given data by programming in Python
Theoretical Background:
Data analysis plays a role in making decisions more scientific and helping businesses operate more effectively. Data analysis is a process of inspecting, cleansing, transforming and modeling data with the goal of discovering useful information, informing conclusions and supporting decision-making. Data analysis has multiple facets and approaches, encompassing diverse techniques under a variety of names, and is used in different business, science, and social science domains.
Analysis refers to breaking a whole into its separate components for individual examination. Data analysis is a process for obtaining raw data and converting it into information useful for decision-making by users. Data is collected and analyzed to answer questions, test hypotheses.
The four types of data analysis are:
- Descriptive Analysis.
- Diagnostic Analysis.
- Predictive Analysis.
- Prescriptive Analysis.
The data file given consist of various parameters of an engine. We have to calculate the below parameters
1] Work done by the engine is obtained by calculating the area under the P-V diagram
2] Power output of the engine is given as below
PROCEDURE:
1] Import the modules such as Math, matplotlib, NumPy, SciPy for performing their respective functions
2] For the purpose of plotting the curves between 2 quantities as per the user input, a line counter is initiated from 1. Now an "if" loop is iterated with the condition if '#' not in line all the numerical values present in the data file is now to be stored in the data array as string. Now another "if" loop is executed with the condition that line counter greater than or equal to 6 all the data will be stored in the pressure and volume array respectively.
3] For Engine performance calculations, the area under the PV diagram has to be calculated and we are using Simpson method for calculating it.
4] Two arrays of name of parameters and their units are made as per the data file given and then the user has to choose from them to plot respective graphs. For this 2 inputs of the user are taken using the input command and data type is set as 'int'. The user is entering column number as input and results are generated.
Program coding:
PLOTS and RESULTS:
Conculsion:
The Python program ran successfully and the results have been obtained.