Walmart Location Analysis with Open Interpreter

Amal
ScrapeHero
Published in
5 min readSep 26, 2023
Robot shopping on Walmart

What is Open Interpreter? What does it do?

Following the emergence of the Code Interpreter within the realm of ChatGPT, a novel open-source endeavor dubbed Open Interpreter has garnered considerable acclaim within the AI sphere.

Spearheaded by Killian Lucas, this initiative has enlisted the collaborative efforts of an array of open-source enthusiasts, fostering an atmosphere of innovation and collaboration.

Open Interpreter, an ambitious fusion of the attributes inherent in a ChatGPT plugin and the multifaceted capabilities akin to Windows Copilot, stands poised to democratize AI accessibility across all conceivable platforms.

Within the expansive repertoire of Open Interpreter’s functionalities lies the capacity to engage in a diverse spectrum of tasks.

These encompass seamless interactions with one’s computer, spanning the domains of operating systems, files, directories, software applications, internet resources, and beyond, all channelled through an intuitively user-friendly Terminal interface.

Open Interpreter boasts significant advantages over ChatGPT, making it both more potent and, in some ways, more daunting:

  • Unrestricted Internet Access: Open Interpreter can seamlessly tap into the boundless expanse of the Internet.
  • In-depth Computer Integration: It wields complete access to your computer and its intricate file system.
  • Enhanced Functionality: Open Interpreter’s capabilities are further enriched through the seamless installation of new libraries and models on your computer.
  • No Limits: When it comes to file sizes and execution durations, Open Interpreter knows no bounds.

Installation

Create a Virtual Environment on Python or Anaconda:

python -m venv myenv

Activate the Virtual Environment:

On Windows:

myenv\Scripts\activate

On macOS and Linux:

source myenv/bin/activate

Install open interpreter library:

pip install open-interpreter

Getting Started

Now let’s see the magic of this library by running a single command on your Terminal:

To use GPT-4 Model, use:

interpreter

To use GPT 3.5 Model, use:

interpreter –fast

To use Llama Model, use:

interpreter — local

To use the latest Falcon 180B Model

interpreter — model tiiuae/falcon-180B

Open Interpreter will require approval before running code. Use interpreter -y to bypass this.

In this guide, we will be using the GPT 3.5 Turbo or ChatGPT model for fast execution and cost-cutting.

After running the command interpreter -fast , paste your OPENAI API KEY in your terminal. If you don’t have an API key, sign up for an OpenAI developer account to get API key.

To avoid the open interpreter asking for the API key every time, run export OPENAI_API_KEY=your_api_key on Mac/Linux or setx OPENAI_API_KEY your_api_key on Windows.

Data:

Data is about location reviews and ratings of Walmart stores in the USA region.

The data has been collected from ScrapeHero, one of the leading web-scraping companies in the world. Click here for the Data Source that we used for analysis!

Columns:
ID, Provider_name, Address, Street, Zip_Code, State, City, Author, Review, Rating

Sample Data:

Data Analysis on Walmart Location Reviews:

Now let’s start by asking questions about the data to the LLM.

Question: What is the average rating for Walmart across all locations?

Also specify the location of the data by dragging the file to the terminal
😍

Average rating across all location is 3.64!

It will basically run the code for you and retrieve the answer.

Question: Which state has the highest average rating for Walmart?

Puerto Rico has the highest average ratings among all of the states in the US.

Question: Which state has the highest number of reviews?

Texas has the highest number of reviews in USA.

Question: Display the top 5 positive and negative reviews in New Jersey along with their corresponding ratings to highlight customer opinions.

Question: Plot the top 5 author names with the number of reviews submitted by them to identify frequent reviewers.

It ran the code and then saved the figure in the current working directory. How amazing it is! 😀

Question: Visualize and save the top 5 cities with the highest ratings for Walmart across various locations

Question: Which one of the states has the highest average rating? The states are California, New Jersey, Florida and Washington. Codes are CA, NJ, FL, WA .

Question: Generate a word cloud from the reviews to visualize the most frequently mentioned words.

For Texas state:

Conclusion:

Open Interpreter is a groundbreaking and ambitious project that holds the potential to revolutionize the way we interact with artificial intelligence and computers.

While Open Interpreter presents incredible opportunities for innovation and accessibility in the AI realm, it also comes with challenges and responsibilities.

The unrestricted access to the internet and complete control over a computer’s file system must be managed responsibly to ensure security and privacy.

Additionally, the power and potential of Open Interpreter underscores the need for ethical guidelines and vigilant oversight to prevent misuse.

This tool can surely be used in automating many tasks in our day-to-day activities, but make sure to end the process by closing your terminal and be cautious while interacting with your files and systems.

Hope you learned something new today, Happy Learning!

If you’ve found this article helpful or intriguing, don’t hesitate to give it a clap! As a writer, your feedback helps me understand what resonates with my readers.

Follow ScrapeHero for more insightful content like this. Whether you’re a developer, an entrepreneur, or someone interested in web scraping, machine learning, AI, etc., ScrapeHero has compelling articles that will fascinate you.

--

--