Regional Analysis of Ingredients Consumption in the Agriculture Industry

GOAL

RESULT

PROJECT DURATION

Improve marketing strategies by segmenting plant protection products and pesticides based on regional needs.

A detailed market analysis, visualized through Tableau, illuminating agricultural trends, regional preferences, and product demands.

The estimated duration of the project is 5 to 6 months, depending on the availability, completeness, and cleanliness of the data.

CASE – Market segmentation analysis of the contents of plant protection products and pesticides

The data that I’ve collected were the result of my experience as a Marketing Research Analyst at an Agricultural Industry where I worked for two years in Turkey. I’ve gathered these imaginary data by leveraging my regional and industrial knowledge and by consistently placing product orders from fictitious customers.

Project Objectives:

Step 1: Data Extraction

Address Table:

address_id: This field serves as a unique identifier for each address. delivery_city: Records the city where the delivery address is located. delivery_zip_code: Contains the ZIP or postal code associated with the delivery address.

Purpose: The Address table stores location-related information, allowing you to associate delivery addresses with customers and orders. It helps in mapping orders to specific geographic regions.

Customers Table:

customer_id: A unique identifier for each customer.
customer_first_name: Stores the first name of each customer. customer_last_name: Records the last name of each customer.

Purpose: The Customers table contains customer-specific information, enabling you to identify and profile individual customers. It serves as a key reference point for customer-related data.

Item Table:

item_id: A unique identifier for each item.
sku: Represents the Stock Keeping Unit, a unique code assigned to each item for inventory management.
item_name: Contains the name or description of the item.
item_category: Categorizes items into specific groups (e.g., fertilizer, pesticides).

Purpose: The Item table stores detailed information about the products you offer, including their names, categories, and ingredients. It is essential for managing your product catalog and inventory.

Orders Table:

row_id: A unique identifier for each row in the Orders table.
order_id: A unique identifier for each order.
created_at: Captures the timestamp or date when the order was created. quantity: Specifies the quantity of each item included in the order. customer_id: Links each order to a specific customer using the customer’s unique identifier from the others.

Purpose: The Orders table is essential for tracking orders, managing inventory, analyzing customer behavior.

Step 2: Data Cleaning and Preparation

After extracting the data from the Excel sheets and converting them to CSV files, the next crucial step is to ensure that our data is in the best shape for analysis.

We’ve attentively checked our data to ensure it maintains integrity. We looked for missing values, inconsistencies, or duplicate entries in each table. For instance, in the “address” table, we ensured that there are no missing or duplicate address IDs, city names, or ZIP codes. In the “customers” table, we verified that each customer has a unique ID.

We’ve also cleaned up any inconsistencies in our data. For example, in the “item” table, we ensured that item categories are consistent and that product names and descriptions are standardized.

There were some data transformations required. For example, calculating ratios of ingredients per 100 liters of product was essential for understanding product demand, so we’ve added that to our dataset.

We checked the relationships between our tables to ensure they are accurately established. In our project, we verified that the customer IDs in the “orders” table match the IDs in the “customers” table.

We have documented all data cleaning and preparation steps for future reference and sharing with team members.

-- Select the "agridb" database
USE agridb;

-- Create the "address" table
CREATE TABLE `address` (
    `add_id` int NOT NULL,
    `delivery_address1` varchar(200) NOT NULL,
    `delivery_city` varchar(50) NOT NULL,
    `delivery_zipcode` varchar(20) NOT NULL,
    PRIMARY KEY (`add_id`)
);

-- Create the "customers" table
CREATE TABLE `customers` (
    `cust_id` int NOT NULL,
    `cust_firstname` varchar(50) NOT NULL,
    `cust_lastname` varchar(50) NOT NULL,
    PRIMARY KEY (`cust_id`)
);

-- Create the "item" table
CREATE TABLE `item` (
    `item_id` varchar(10) NOT NULL,
    `sku` varchar(20) NOT NULL,
    `item_name` varchar(100) NOT NULL,
    `item_cat` varchar(100) NOT NULL,
    `item_size` varchar(10) NOT NULL,
    `item_price` decimal(10,2) NOT NULL,
    PRIMARY KEY (`item_id`)
);

-- Create the "orders" table
CREATE TABLE `orders` (
    `row_id` int NOT NULL,
    `order_id` varchar(10) NOT NULL,
    `created_at` datetime NOT NULL,
    `item_id` varchar(10) NOT NULL,
    `quantity` int NOT NULL,
    `cust_id` int NOT NULL,
    `delivery` boolean NOT NULL,
    `add_id` int NOT NULL,
    PRIMARY KEY (`row_id`)
);
SELECT
  o.order_id,
  o.quantity,
  i.item_cat,
  i.item_name,
  a.delivery_address1,
  a.delivery_city,
  a.delivery_zipcode
FROM
  orders o
LEFT JOIN
  item i ON o.item_id = i.item_id
LEFT JOIN
  address a ON o.add_id = a.add_id

Step 3: Data Analysis with Tableau

GitHub
hberksafak's Blue Github Chart
Tableau
Kaggle
Copyright © | 2023 by Hasan Berk Şafak