Giter Site home page Giter Site logo

autoapi's Introduction

autoapi

A REST api written in Django for Microsoft Engage 2022 Data Analysis Project.

auto-api Playground & Service

API Docs

Technologies used

  • 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.

Installation

  • 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
  • Dependencies

    1. Cd into your the cloned repo as such:

          cd autoapi
    2. Create and fire up your virtual environment:

      LINUX/UNIX:

          virtualenv  venv -p python3
          source venv/bin/activate
    3. Install the dependencies needed to run the app:

          pip install -r requirements.txt
  • Run It

    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/
    
  • Save your own Django SECRET KEY to .env file

    Inside /autoapi/.env
    SECRET_KEY = "YOUR SECRET KEY"
    

You can use Djecrety to generate Strong Django Secret Key or use any string.

API documentation

1. CARS

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.

2. OVERVIEW

Responsible for Dashboard Overview section.

URL :

/overview

Method : GET

Auth required : NO

Permissions required : None

3. FORECAST

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"
}

4. Price and Mileage Data

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)

5. Top 5 Expensive Brands Data

Responsible for Top 5 expensive brands table. URL :

GET /q2

Method : GET

Auth required : NO

Permissions required : None

6. 2019 And 2020 Sales Data Of Top 10 Brands

Responsible for Price vs Relation analysis.

URL :

GET /q3

Method : GET

Auth required : NO

Permissions required : None

7. Sales Percentage Data

Responsible for Brand Performance Analysis

URL :

GET /q4

Method : GET

Auth required : NO

Permissions required : None

8. Top Countries Data

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)

9. Customer Segments Data

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)

10. Right Time To Launch Analysis Data

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)

11. Passengers Car's Production Data

Responsible for Growth of passengers cars produced in India.

URL :

GET /q8

Method : GET

Auth required : NO

Permissions required : None

12. Consumer Sentiment And Sales Data

Responsible for Consumer Sentiment vs Sales Analysis Chart.

URL :

GET /q9

Method : GET

Auth required : NO

Permissions required : None

13. Top Automakers Data

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)

autoapi's People

Contributors

ajaysharmadev avatar aj-2000 avatar

Watchers

 avatar

Forkers

ajaysharmadev

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.