Giter Club home page Giter Club logo

retail-traffic-competitor-analysis's Introduction

R-DCM Retail Stores Traffic Analysis

This R script analyzes traffic data for Michaels stores and compares it with competitor stores (AC Moore, Hobby Lobby, JoAnn Fabrics) to derive insights into market share and proximity.

Table of Contents

Introduction

This script is designed to perform traffic analysis for Michaels stores and their competitors. It leverages traffic data, sales data, and store information to calculate market share and analyze the proximity of Michaels stores to competitor stores.

Prerequisites

Make sure you have R and RStudio installed on your system. Additionally, ensure that the required R packages are installed. You can install them by running the following command in R:

install.packages(c("dplyr", "geosphere"))

Installation

  1. Clone the repository or download the provided R script.
git clone https://github.com/your-username/your-repository.git
  1. Open the R script (main_script.R) in RStudio or any R-compatible environment.

  2. Update the file paths in the script to point to your specific input files.

Usage

Run the main function in the script to execute the entire workflow. The script will load necessary data, perform analysis, and print the results.

source("main_script.R")
main()

Code Structure

The code is organized into several functions for modularity and readability. Here is an overview of the functions:

  • load_store_lists: Load Michaels and competitor store lists.
  • load_traffic_data: Load traffic data, sales data, and competitor sales data.
  • merge_traffic_store_info: Merge traffic data with Michaels store information.
  • merge_comp_store_traffic: Merge competitor store data with traffic data.
  • calculate_distances: Calculate distances between Michaels stores and competitor stores.
  • calculate_traffic_market_share: Calculate traffic market share.
  • main: Main function to run the entire analysis.

Feel free to explore each function for more details on its functionality.

retail-traffic-competitor-analysis's People

Contributors

lisali525 avatar

Stargazers

 avatar

Watchers

 avatar

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.