Skip to content

stuaninauts/fipe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FIPE

Table of Contents
  1. About The Project
  2. Project Phases
  3. Getting Started
  4. Roadmap

About The Project

The FIPE project is an outcome of the final assignment for the course INF01124 - Sorting and Searching Data at INF, UFRGS. This project was undertaken to implement structures of index and data files, as well as explore and create functional applications involving searching and data analysis techniques.

Project Phases

  1. Web Scrapping: The project commenced with the extraction of data from the official FIPE website. This involved fetching automotive information such as brands, models, manufacturing years, and prices.
  2. Indexing Structures for the Search Application:
    • B-Tree Implementation: A B-tree indexing structure was implemented to efficiently organize and access the extracted data. This implementation was used for generate unique codes for each line of the extracted database.
    • Trie Implementation: Additionally, a Trie-based data structure was developed to support partial string matching. This implementation was used to generate codes for the brands and models.
  3. Search Application: This terminal based application provides users the ability to query the datasets using the indexing structures.
  4. Data Analysis Application: This application serves as a tool for exploring and visualizing automotive data. Users can generate graphical representations using a variety of filters, such as brand, model, manufacturing year, type of fuel, type of gear, etc. Also you can generate a value history graph based on a single model or car plate (brazillian). Note: this app still have planned features (look roadmap).

Getting Started

Requirements

For Node.js

  1. Install Node.js version 18 or higher.

For Python

  1. Make sure you have Python installed. If not, you can download it from here.

  2. Install the required packages using the package manager pip.

    $ pip install -r requirements.txt
    

Running from scratch

The following commands were run in 2023, i. e., the data, the database and the binaries files in the repository corresponds to the period from 2004 to 2023.
If you want to get uploaded data here is short tutorial:

NOTE: you must run all executables from repo root

  1. Using fipe_api.js to extract data from fipe.org.br
    $ node src/fipe_api.js data/ errors 300 299 298
    
  2. Using create_database.py to format extracted data
    $ python src/create_database.py
    
  3. Using create_binaries.c to create binary indexing files
    $ make create_binaries  
    $ ./create_binaries
    

Search App

Compiling main.c for database search app

$ make app
$ ./app

Data Analysis App

This app is hosted on the following website:
https://fipe.stuaninauts.com

Or, if you want to run locally,

$ cd src/data_analysis
$ shiny run --reload

Preview

General price ranking of vehicles/brands using filters: General Ranking

Price history using the name of the model: Ranking Based on Vehicle

Price history using the plate of the model: Ranking Based on Plate

Roadmap

Data Analisys App

  • Add title explanations
  • Add export graphic and show/hide title
  • Add individual search section
  • Implement search with plate
  • Refactor design
  • Implement interactive graphics
  • Add internal documentation
  • Fix search with plate for the website
  • Add inflation section