Skip to main content

Command Palette

Search for a command to run...

02#Machine Learning: Brazilian E-commerce Predictions

Published
3 min read
02#Machine Learning: Brazilian E-commerce Predictions

Kaggle Dataset Brazilian E-Commerce

Photo by rupixen.com on Unsplash

1. Dataset from Kaggle

Brazilian E-Commerce Public Dataset by

[Brazilian E-Commerce Public Dataset by Olist
100,000 Orders with product, customer and reviews infowww.kaggle.com](https://www.kaggle.com/olistbr/brazilian-ecommerce "https://www.kaggle.com/olistbr/brazilian-ecommerce")

Welcome! This is a Brazilian ecommerce public dataset of orders made at Olist Store. The dataset has information of 100k orders from 2016 to 2018 made at multiple marketplaces in Brazil. Its features allows viewing an order from multiple dimensions: from order status, price, payment and freight performance to customer location, product attributes and finally reviews written by customers. We also released a geolocation dataset that relates Brazilian zip codes to lat/lng coordinates.

This is real commercial data, it has been anonymised, and references to the companies and partners in the review text have been replaced with the names of Game of Thrones great houses.

2. Brazilian E-Commerce Study by Statisca.com

[Topic: E-commerce in Brazil
In July 2020, Mercado Livre - the name in Portuguese for Argentine e-commerce giant Mercado Libre - was the most…www.statista.com](https://www.statista.com/topics/4697/e-commerce-in-brazil/#dossierKeyfigures "https://www.statista.com/topics/4697/e-commerce-in-brazil/#dossierKeyfigures")

After a year marked by unparalleled mobility restrictions, online shopping in Brazil is even bigger and more mobile-oriented. The largest e-commerce market in Latin America rose to the occasion and turned the sour lemons of the COVID-19 outbreak into a profitable, home-delivered lemonade. In 2020, its online shopping revenue amounted to 126.3 billion Brazilian reals, more than twice as much as two years earlier. Sales through mobile devices — known as m-commerce — generated most of the South American country’s e-commerce revenue in 2020, a trend set to increase in the near future. As the protagonists of these changing times, the major players in this industry benefited from the coronavirus pandemic, and now the competition is tighter than ever.

3. Python Code

[Ecommerce-Brazilian-Predictions
Explore and run machine learning code with Kaggle Notebooks | Using data from Brazilian E-Commerce Public Dataset by…www.kaggle.com](https://www.kaggle.com/viannaandresouza/ecommerce-brazilian-predictions "https://www.kaggle.com/viannaandresouza/ecommerce-brazilian-predictions")

1. Python Enviroment

2. Data Science Libraries

3. Import E-Commerce Dataset

4. Store Dataset on Python Space

5. Exploration Data Analysis

Pandas Statistics Description

What are the cities with the most sales ?

Photo by Adrian Schwarz on Unsplash

How many cities to buy through e-commerce in Brazil ?

Consumers by state

Photo by abillion on Unsplash

Total States with Consumers

Analyis of products and items

Payments Analysis

Photo by David Dvořáček on Unsplash

Out of 5 types of methods, credit card is used on the top, then boleto and then voucher

Since this is a series object we can draw a histplot using its index and values

From the above bar graph we can see that,uses of Credit Card is the highest aroud 75000, then boleto that is slightly less than 20000,

Products Reviews

Photo by Petrebels on Unsplash

We can join it based on order_id column which is common to both, for this we will make another dataframe named “reviews_df”

Most of the products have been rated 5,then 4. also 1 rating is higher than 2 and 3

Top Ten rated products

Photo by Marcin Jozwiak on Unsplash

Music, dvd, and cds category have the highest average ratings. after tha infant’s fashion clothes come.

Insurance Services have the worst ratings, followed by fraldas higiene products

Brazilian Delivery Ecommerce

Photo by Bannon Morrissy on Unsplash

Cities with a history of ecommerce deliveries in Brazil

There are 8011 unique city from geolocation data.

02#Machine Learning: Brazilian E-commerce Predictions