A REST api written in Django for Microsoft Engage 2022 Data Analysis Project.
- Django: The web framework for perfectionists with deadlines (Django builds better web apps with less code).
- DRF: A powerful and flexible toolkit for building Web APIs
- pandas: pandas is a fast, powerful, flexible and easy to use open source data analysis and manipulation tool, built on top of the Python programming language.
- NumPy: NumPy is a library for the Python programming language, adding support for large, multi-dimensional arrays and matrices, along with a large collection of high-level mathematical functions to operate on these arrays.
- Stats Model: statsmodels is a Python module that provides classes and functions for the estimation of many different statistical models, as well as for conducting statistical tests, and statistical data exploration. An extensive list of result statistics are available for each estimator.
-
If you wish to run your own build, first ensure you have python globally installed in your computer. If not, you can get python here.
-
After doing this, confirm that you have installed virtualenv globally as well. If not, run this:
pip install virtualenv
-
Then, Git clone this repo to your PC
git clone https://github.com/aj-2000/autoapi.git
-
-
Cd into your the cloned repo as such:
cd autoapi
-
Create and fire up your virtual environment:
LINUX/UNIX:
virtualenv venv -p python3 source venv/bin/activate
-
Install the dependencies needed to run the app:
pip install -r requirements.txt
-
-
Fire up the server using this one simple command:
Development Server:
python manage.py runserver
Production Server:
gunicorn autoapi.wsgi
You can now access the autoapi service on your browser by using
http://localhost:8000/
-
Inside /autoapi/.env SECRET_KEY = "YOUR SECRET KEY"
You can use Djecrety to generate Strong Django Secret Key or use any string.
Responsible for functioning of data analyzer.
URL :
GET /cars/{manufacturer}/{fuelType}/{transmission}/{orderBy}/{year}/{mileageKML}/{engineCC}/{power}/{seats}/{price}/{numberOfRecords}/
Method : GET
Auth required : NO
Parameter | Description |
---|---|
manufacturer | Car's Manufacturer Name |
fuelType | Car's Fuel Type |
transmission | Car's Transmission Type |
orderBy | Sort in Descending Order by {orderBy} column |
year | Launch year |
mileageKML | Cars with Mileage greater than {mileageKML} |
engineCC | Cars with Engine Volume greater than {engineCC} |
power | Cars with Power greater than {power} |
seats | Cars with Seats greater than {seats} |
price | Cars with Price greater than {mileageKML} |
numberOfRecords | Max Number of Cars to be fetched. |
Responsible for Dashboard Overview section.
URL :
/overview
Method : GET
Auth required : NO
Permissions required : None
Responsible for Sales forecast feature.
URL : POST /forecast/{p}/{q}/{steps}/{option}
Parameter | Description |
---|---|
p | P Value |
q | Q Value |
steps | Number of forecasts |
option | (1:Model Accuracy Chart Data), (2 : Model-Error Details), (3 : Forecast Data) |
Method : POST
Auth required : YES
Permissions required : None
Data constraints
Provide CSV dateset static file URL.
{
"file_url": "CSV FILE STATIC URL"
}
Data example All fields must be sent.
{
"file_url": "https://raw.githubusercontent.com/aj-2000/autoapi/main/App/datasets/demo_sales_dataset.csv"
}
Responsible for Price vs Relation analysis Chart.
URL :
GET /q1/{option}
Method : GET
Auth required : NO
Permissions required : None
Parameter | Description |
---|---|
option | (1: Automatic), (2: Manual) |
Responsible for Top 5 expensive brands table. URL :
GET /q2
Method : GET
Auth required : NO
Permissions required : None
Responsible for Price vs Relation analysis.
URL :
GET /q3
Method : GET
Auth required : NO
Permissions required : None
Responsible for Brand Performance Analysis
URL :
GET /q4
Method : GET
Auth required : NO
Permissions required : None
Responible for Top Countries Data Pie Chart.
URL :
GET /q5/{option}
Method : GET
Auth required : NO
Permissions required : None
Parameter | Description |
---|---|
option | (0: by production), (1: by sales), (2: by exports) |
Responsible for Customer Segments Pie Chart.
URL :
GET /q6/{option}
Method : GET
Auth required : NO
Permissions required : None
Parameter | Description |
---|---|
option | (0: Drive Train), (1: Transmission), (2: Class), (3: Brands), (4: Fuel Type), (5: By BodyTpe) |
Responsible for Right Time to Launch Analysis Data
URL :
GET /q7/{option}
Method : GET
Auth required : NO
Permissions required : None
Parameter | Description |
---|---|
option | (1: Analysis Data), (2: Prediction Data) |
Responsible for Growth of passengers cars produced in India.
URL :
GET /q8
Method : GET
Auth required : NO
Permissions required : None
Responsible for Consumer Sentiment vs Sales Analysis Chart.
URL :
GET /q9
Method : GET
Auth required : NO
Permissions required : None
Responsible for Top Automakers Pie chart Data
URL :
GET /q10/{option}
Method : GET
Auth required : NO
Permissions required : None
Parameter | Description |
---|---|
option | (0: by earnings), (1: by revenue), (2: by market cap.), (3: by employees count) |