All Projects → the-markup → investigation-amazon-brands

the-markup / investigation-amazon-brands

Licence: BSD-3-Clause license
Materials to reproduce our findings in our stories, "Amazon Puts Its Own 'Brands' First Above Better-Rated Products" and "When Amazon Takes the Buy Box, it Doesn’t Give it up"

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to investigation-amazon-brands

map-kit-android
An extensive framework for map development in Android.
Stars: ✭ 44 (-21.43%)
Mutual labels:  amazon
top-github-scraper
Scape top GitHub repositories and users based on keywords
Stars: ✭ 40 (-28.57%)
Mutual labels:  web-scraping
GSoC-Data-Analyser
Simple search for organisations participating/participated in the GSoC
Stars: ✭ 29 (-48.21%)
Mutual labels:  web-scraping
sesdashboard
Analytics and activity tracking dashboard for AWS Simple Email Service
Stars: ✭ 36 (-35.71%)
Mutual labels:  amazon
Springboard-Data-Science-Immersive
No description or website provided.
Stars: ✭ 52 (-7.14%)
Mutual labels:  web-scraping
restaurant-finder-featureReviews
Build a Flask web application to help users retrieve key restaurant information and feature-based reviews (generated by applying market-basket model – Apriori algorithm and NLP on user reviews).
Stars: ✭ 21 (-62.5%)
Mutual labels:  web-scraping
chef-handler-sns
Chef report handler to send Amazon SNS notifications on failures or changes.
Stars: ✭ 12 (-78.57%)
Mutual labels:  amazon
tudien
Từ điển tiếng Việt dành cho Kindle
Stars: ✭ 38 (-32.14%)
Mutual labels:  amazon
tableau-scraping
Tableau scraper python library. R and Python scripts to scrape data from Tableau viz
Stars: ✭ 91 (+62.5%)
Mutual labels:  web-scraping
actor-scraper
House of Apify Scrapers. Generic scraping actors with a simple UI to handle complex web crawling and scraping use cases.
Stars: ✭ 83 (+48.21%)
Mutual labels:  web-scraping
scraping-ebay
Scraping Ebay's products using Scrapy Web Crawling Framework
Stars: ✭ 79 (+41.07%)
Mutual labels:  web-scraping
text-mining-corona-articles
Text Mining for Indonesian Online News Articles About Corona
Stars: ✭ 15 (-73.21%)
Mutual labels:  web-scraping
mapbox-assistant-example
Examples of Amazon Echo, Google Home, and other bots interacting with Mapbox services.
Stars: ✭ 15 (-73.21%)
Mutual labels:  amazon
storage-abstraction
Provides an abstraction layer for interacting with a storage; the storage can be local or in the cloud.
Stars: ✭ 36 (-35.71%)
Mutual labels:  amazon
geeks-for-geeks-solutions
✅ My own Amazon, Microsoft and Google SDE Coding challenge Solutions (offered by GeeksForGeeks).
Stars: ✭ 246 (+339.29%)
Mutual labels:  amazon
India-WhatsAppFakeNews-Dataset
WhatsApps related deaths News Articles along with other articles across India during that period
Stars: ✭ 41 (-26.79%)
Mutual labels:  web-scraping
heroshi
Heroshi – open source web crawler.
Stars: ✭ 51 (-8.93%)
Mutual labels:  web-scraping
MoneyWellSpent
A script to summarize your money spent on Amazon
Stars: ✭ 16 (-71.43%)
Mutual labels:  amazon
ioBroker.cloud
Enable access to ioBroker from internet
Stars: ✭ 36 (-35.71%)
Mutual labels:  amazon
wishlist
Read an Amazon wishlist programmatically with Python
Stars: ✭ 44 (-21.43%)
Mutual labels:  amazon

Amazon Brands and Exclusives

This repository contains code to reproduce the findings featured in our story "Amazon Puts Its Own 'Brands' First Above Better-Rated Products" and "When Amazon Takes the Buy Box, it Doesn’t Give it up" from our series Amazon's Advantage.

Our methodology is described in "How We Analyzed Amazon’s Treatment of Its Brands in Search Results".

Data that we collected and analyzed is in the data folder.
To use the full input dataset (which is not hosted here), please refer to Download data.

Jupyter notebooks used for data preprocessing and analysis are available in the notebooks folder.
Descriptions for each notebook are outlined in the Notebooks section below.

Installation

Python

Make sure you have Python 3.6+ installed. We used Miniconda to create a Python 3.8 virtual environment.

Then install the Python packages:
pip install -r requirements.txt

Notebooks

These notebooks are intended to be run sequentially, but they are not dependent on one another. If you want a quick overview of the methodology, you only need to concern yourself with the notebooks with an asterisk(*).

0-data-preprocessing.ipynb

This notebook parses Amazon search results and Amazon product pages, and produces the intermediary datasets (data/output/datasets/) used in ranking analysis and random forest classifiers.

1-data-analysis-search-results.ipynb *

Bulk of the ranking analysis and stats in the data analysis.

2-random-forest-analysis.ipynb *

Feature engineering training set, finding optimal hyperparameters, and performing the ablation study on a random forest model. The most predictive feature is verified using three separate methods.

3-survey-results.ipynb

Visualizing the survey results from our national panel of 1,000 adults.

4-limiations-product-page-changes.ipynb

Analysis of how often the Buy Box's default shipper and seller change between Amazon and a third party.

utils.py

Contains convenient functions used in the notebooks.

parsers.py

Contains parsers for search results and product pages.

Data

This directory is where inputs, intermediaries, and outputs are saved.

data
├── output
│   ├── figures
│   ├── tables
│   └── datasets
│       ├── amazon_private_label.csv.xz
│       ├── products.csv.xz
│       ├── searches.csv.xz
│       ├── training_set.csv.gz
│       ├── pairwise_training_set.csv.gz
│       └── trademarks
└── input
    ├── combined_queries_with_source.csv
    ├── best_sellers
    ├── generic_search_terms
    ├── search-private-label
    ├── search-selenium
    ├── search-selenium-our-brands-filter_
    ├── selenium-products
    ├── seller_central
    └── spotcheck

data/output/ contains tables, figures, and datasets used in our methodology.

data/output/datasets/amazon_private_label.csv.xz is our dataset of Amazon brands, exclusives, and proprietary electronics (N=137,428 products). We use each product's unique ID (called an ASIN) to identify Amazon's own products in our methodology.

data/output/datasets/trademarks contains a dataset of trademarked brands registered by Amazon. The data was collected from USPTO.gov and Amazon. We included an additional README with the exact steps we took to build this dataset in the directory.

data/output/datasets/searches.csv.xz parsed search result pages from top and generic searches (N=187,534 product positions). You can filter this by search_term for each of these subsets from data/input/combined_queries_with_source.csv.

data/output/datasets/products.csv.xz parsed product pages from the searches above (N=157,405 product pages).

data/output/training_set.csv.gz metadata used to train and evaluate the random forest. Additionally, feature engineering is conducted in notebooks/2-random-forest-analysis.ipynb, which produces pairwise_training_set.csv.gz.

Every file in data/input except combined_queries_with_source.csv is stored in AWS s3. Those are not hosted in this repository.

Download Data

You can find the raw inputs in data/input in s3://markup-public-data/amazon-brands/.

If you trust us, you can download the HTML and JSON files in data/input using this script: sh data/download_input_data.sh

Note this is not necessary to run notebooks and see full results.

data/input/search-selenium/ (12 GB uncompressed)

First page of search results collected in January 2021. Download the HTML files search-selenium.tar.xz (238 MB compressed) here.

data/input/selenium-products/ (220 GB uncompressed)

Product pages collected in February 2021. Download the HTML files selenium-products.tar.xz (9 GB compressed) here.

data/input/search-selenium-our-brands-filter_/ (35 GB uncompressed)

Search results filtered by "our brands". Contains every page of search results. Download search-selenium-our-brands-filter_.tar.xz (403 MB compressed) here.

data/input/search-private-label/ (25 GB uncompressed)

API responses for search results filtered down to products Amazon identifies as "our brands". Contains paginated API results. Download the JSON files search-private-label.tar.xz (402 MB uncompressed) here.

data/input/seller_central/ (105 MB)

Seller central data for Q4 2020. Download the CSV file All_Q4_2020.csv.xz (105 MB compressioned) here.

data/input/best_sellers/ (4 GB)

Amazon's best sellers under the category "Amazon Devices & Accessories". Download the HTML files best_sellers.tar.xz (60MB compressed) here.

data/input/spotcheck/ (4 GB)

A sub-sample of product pages for spot-checking Buy Box changes. Download the HTML files spotcheck.tar.xz (159 MB compressed) here.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].