Logo

The Data Daily

Analyzing Projected Calculations Using R | R-bloggers

Analyzing Projected Calculations Using R | R-bloggers

Analyzing Projected Calculations Using R
Posted on November 20, 2022 by R Views in R bloggers | 0 Comments
[This article was first published on R Views , and kindly contributed to R-bloggers ]. (You can report issue about the content on this page here )
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Share Tweet
Nicolas Nguyen works in the Supply Chain industry, in the area of Demand and Supply Planning, S&OP and Analytics, where he enjoys developing solutions using R and Shiny. Outside his job, he teaches data visualization in R at the Engineering School EIGSI and Business School Excelia in the city of La Rochelle, France.
Introduction
Demand & Supply Planning requires forecasting techniques to determine the inventory needed to fulfill future orders. We can build end-to-end supply chain monitoring processes with R to identify potential issues and run scenario testing.
In a 3-part series, I will walk through a Demand & Supply Planning workflow.
In October, we published the first post, Using R for Projected Inventory Calculations in Demand & Supply Planning . It is an introduction to projected inventory and coverage methodology. Check it out if you haven’t read it yet!
This post, Analyzing Projected Calculations Using R, presents an analysis of a demo dataset using the planr package.
The final post, Visualizing Projected Calculations with reactable and Shiny, will answer the question: how would you present your results to your boss once the analysis is done?
By the end of the series, you will understand how and why to use R for Demand & Supply Planning calculations. Let’s continue!
The “problem” we aim to solve
In Demand & Supply Planning, we often need to calculate projected inventories (inventory needed to fulfill future orders) and projected coverages (demand needed to cover periods of time). In my previous post, we discussed the methodology behind these calculations. If you haven’t read it, click here !
This post will focus on analyzing a demo dataset using the proj_inv() function from the planr package . This function calculates projected inventories and coverages with also some analysis features. Then, we can apply the projected inventories & coverages methodology to analyze our data using R!
Demand & Supply Planning datasets
A typical Demand & Supply Planning dataset has the following basic elements, which are essential to calculate projected inventories & coverages:
An Item (a SKU or a DFU) or a reference (a group/family of SKUs for example)
A Period
An Opening Inventories
Then a Demand and a Supply Plan
We can also add more features, such as stocks parameters expressed in units, coverages, or a combination of both (for example, ensuring a minimum of one month coverage, and also at least two units of stocks).
Overview of the demo dataset
To illustrate a typical Demand & Supply Planning dataset, we can use the demo dataset, [Blueprint_DB]. This dataset contains dummy data that displays common situations in Demand and Supply Planning (alerts, shortages, overstocks, etc.). [Blueprint_DB] also contains data for the most common type of coverage, minimum and maximum targets.
We can upload the dataset directly from the planr package :
library(tidyr) library(dplyr) library(stringr) library(lubridate) ## ## Attaching package: 'lubridate' ## The following objects are masked from 'package:base': ## ## date, intersect, setdiff, union library(planr) library(ggplot2) Blueprint_DB

Images Powered by Shutterstock