Finalized documentation

Technical Documentation: (Based of documentation Plan)

Project Initial Plans (taken from project concept):

There are two parts to this project. The first is a sensitivity analysis; this is the backbone of the modeling used in this software package. The second half is the recommendation engine – a GenAI implementation on top of the sensitivity analysis that can provide recommended changes to the data uncovered in the sensitivity analysis that can lead a company to a specific target revenue.

The motivation behind this project stems from the large influx of historical context, but with that comes user’s tendency to struggle to understand the ramifications of different marketing-mix scenarios, while others grapple with the challenge of optimizing their strategies to meet revenue targets.

This software is designed to serve CMOs, by offering a user-friendly platform to conduct sensitivity analysis on historical and projected data. It addresses the critical problems of understanding revenue impacts and optimizing marketing tactics. The sensitivity analysis, forming the backbone of the system, illuminates the consequences of various marketing strategies.

How Our Code Addresses Initial Plans:

The provided code achieves the project’s goals through a combination of key components that we as Team N created. To begin, the claude.ts module employs Anthropic AI’s Claude model for natural language processing, facilitating sensitivity analysis by generating summaries and classifications based on input data. Although the initial intention was to train our own model, we were stumped by our model not getting above 50% accuracy with the training data. The Page component orchestrates data analysis using Papaparse for CSV parsing, ZenRows for URL scraping, and analyzeWithClaude for comprehensive data analysis, aligning with the project’s aim of empowering CMOs with actionable insights. Additionally, the DownloadCSV component enables the generation of a new CSV file with added descriptions and classifications, offering a user-friendly platform for understanding revenue impacts and optimizing marketing tactics. This is evident in our user demo video. Together, these components should provide a proof of concept for a streamlined solution for strategic decision-making in marketing.


System Architecture

Overview:

The system architecture comprises of components designed to address the user stories and more directly allow Chief Marketing Officers (CMOs) with data-driven insights to optimize marketing strategies and achieve revenue targets. Leveraging sensitivity analysis and AI-driven recommendations, the architecture facilitates informed decision-making in a user-friendly platform.

Components:

  1. Claude Module (claude.ts):
  1. Utilizes Anthropic AI’s Claude model for natural language processing.
  2. Conducts sensitivity analysis by generating summaries and classifications based on input data.
  3. Forms the backbone of the system’s analytical capabilities, providing critical insights into marketing strategy impacts on revenue(As mentioned earlier).
  4. Page Component (Page.tsx):
  1. Data analysis through Papaparse for CSV parsing, ZenRows for URL scraping, and analyzeWithClaude for comprehensive data analysis.
  2. Integrates multiple functionalities to analyze provided data, generate descriptions, and classifications.
  3. CMOs are given actionable insights to optimize marketing strategies.
  4. DownloadCSV Component (DownloadCSV.tsx):
  1. Enables the generation of a new CSV file with added descriptions and classifications.
  2. Facilitates user interaction by providing a means to visualize and further analyze analyzed data.
  3. Enhances the user experience by offering a streamlined platform for understanding revenue impacts and optimizing marketing tactics.

Interaction (How it works essentially):

  • Users input CSV data through the Page component, initiating the analysis process.
  • Papaparse parses the CSV data, while ZenRows scrapes URLs for additional data.
  • The Claude module conducts sensitivity analysis, generating summaries and classifications.
  • The analyzed data is then presented to users through the DownloadCSV component, enabling further analysis and strategic decision-making.

Components:

Non-Technical Summary:

To begin, a brief summary without including snippets of code, the Page component orchestrates the integration of multiple functionalities to achieve the project’s objectives. It utilizes Papaparse for CSV parsing, ZenRows for URL scraping, and the analyzeWithClaude function from claude.ts for data analysis. By combining these tools, the Page component conducts an analysis of the provided data, generating descriptions and classifications that inform marketing decision-making.

Additionally, the DownloadCSV component, referenced within the Page component, plays a crucial role in delivering the analyzed data to users. It enables the generation of a new CSV file containing added descriptions and classifications, allowing CMOs to visualize and further analyze the insights derived from the sensitivity analysis

Technical Information:

1. Classify Component (classify.tsx):

Description:

The Classify component is a React functional component responsible for rendering a simple interface with a title and data.

Key Features:

  • Renders a title “Classify” followed by data passed through props.
  • Utilizes getServerSideProps to fetch data from an API or database (simulated in this case).

Usage:

  • Include the Classify component in your application to display data with a title.

2. DownloadCSV Component (downloadCsv.tsx):

Description:

The DownloadCSV component is a React functional component used for downloading CSV data as a file.

Key Features:

  • Downloads CSV data as a file when rendered.
  • Utilizes useEffect to trigger the download process on component mount.

Usage:

  • Include the DownloadCSV component in your application to provide users with the ability to download CSV data.

3. CSVConverter Component (home.tsx):

Description:

The CSVConverter component is a React functional component responsible for converting CSV data, uploading files, and providing conversion functionalities.

Key Features:

  • Handles file uploads and CSV parsing using Papaparse.
  • Allows users to convert CSV data, perform modifications, and download the modified CSV file.

Usage:

  • Include the CSVConverter component in your application to provide users with CSV conversion functionalities.

Claude Usage:  

Non-Technical Summary:

The scrapper bot code repo implements the functionality described in the project’s goals by leveraging several key components. However, of them the most important being the claude.ts module, integrated within the project’s architecture, facilitates the analysis of data through natural language processing (NLP) capabilities. It utilizes Anthropic AI’s Claude model to generate summaries and classifications based on input data, contributing to the sensitivity analysis aspect of the software.

Technical Information:

1. Claude Module (claude.ts)

Description:

The Claude module provides functionalities to interact with the Anthropic AI platform for natural language processing tasks such as summarization, classification, and analysis.

Key Features:

  • Scraping Functionality: Utilizes ZenRows to scrape data from a given URL.
  • Summarization: Generates a 3-sentence description of provided data using the Anthropic Claude model.
  • Classification: Classifies data into predefined categories using the Anthropic Claude model.
  • Analysis: Combines scraping, summarization, and classification functionalities for comprehensive data analysis.

Usage:

  • Import the claude.ts module into your project to leverage Anthropic AI’s natural language processing capabilities for data analysis tasks.

2. Classifying Data Module (Page Component)

Description:

The Page component serves as the classifying module responsible for processing CSV data, scraping URLs, analyzing data using Anthropic AI’s Claude model, and generating a new CSV file with added classifications and descriptions.

Key Features:

  • CSV Parsing: Utilizes Papaparse to parse CSV data into a structured format.
  • URL Scraping: Scrapes data from URLs extracted from the CSV data.
  • Data Analysis: Analyzes scraped data using Anthropic AI’s Claude model to generate descriptions and classifications.
  • CSV Generation: Generates a new CSV file with added descriptions and classifications.

Usage:

  • Import the Page component into your project and pass CSV data as a parameter to initiate the classifying process.

Getting Started with React:

This is a Next.js project bootstrapped with create-next-app.


Getting Started

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

This project uses next/font to automatically optimize and load Inter, a custom Google Font.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository – your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details