This repository contains the source dataset and collection utilities for a COS 351 research project on personalized algorithmic pricing, dynamic pricing, AI pricing, and related company communications.
The dataset supports the paper's analysis of how companies characterize pricing practices and how those communications change around legal, media, and public-pressure events.
.
├── dataset/ # Collected source material, organized by industry and company
├── utilities/ # Term counting script, term list, and data templates
├── scrape.py # Helper script for saving webpages and PDFs into dataset/
└── data_processing.md # Step-by-step prompt for the agent processing a company
The dataset is organized as:
dataset/<industry>/<company>/<source-id>/
Each source folder may contain:
raw.html- saved HTML when availableraw.pdf- saved PDF or PDF rendering when availableraw.txt- extracted readable textmetadata.json- URL, scrape date, source type, title, and saved-file metadataextracted_company_statement.txt- company statements extracted from third-party sources, when relevant
Each company directory may also contain:
<company>_source_tracker.csv- source-level metadata and summaries<company>_raw_term_counts.csv- term counts acrossraw.txt<company>_statement_term_counts.csv- term counts across extracted company statements
The current dataset covers companies in four broad industries:
accommodationaviationgroceryrideshare
Sources include company communications, privacy policies, investor materials, news coverage, legal or regulatory materials, watchdog reports, and public-pressure sources where they are directly relevant to a company's pricing practices.
Install Python dependencies from the repository root:
pip3 install -r utilities/requirements.txt
python3 -m playwright install chromiumIf your system uses python instead of python3, use the corresponding pip and python commands.
Use scrape.py to save a webpage, PDF, or plain-text URL into the dataset:
python3 scrape.py "<URL>" "<industry>" "<company>"You can optionally provide the source folder name:
python3 scrape.py "<URL>" "<industry>" "<company>" "<source-id>"Useful flags:
python3 scrape.py "<URL>" "<industry>" "<company>" --no-git
python3 scrape.py "<URL>" "<industry>" "<company>" --no-pdf--no-gitsaves files without committing or pushing.--no-pdfskips PDF rendering for HTML webpages.
By default, the script saves the source under dataset/<industry>/<company>/<source-id>/, writes metadata.json, extracts text into raw.txt when possible, and attempts to commit and push the new source.
After sources have been collected for a company, follow data_processing.md.
The basic workflow is:
- Review each source folder for duplicates and scrape-quality problems.
- Create or update
<company>_source_tracker.csv. - Extract company statements from third-party sources when applicable.
- Count pricing-related term matches.
Run term counts from the repository root:
python3 utilities/count_terms.py <company>Example:
python3 utilities/count_terms.py deltaThe script reads regex patterns from utilities/term_list.txt and writes updated count CSVs to the relevant company directory.
- Keep source folder names short, lowercase, and descriptive.
- Do not overwrite existing source folders. The scraper will create a numbered folder if a name already exists.
- Check
raw.txtafter scraping. Some websites return login pages, CAPTCHA pages, or incomplete text. - Use
metadata.jsonandraw.txtas the primary inputs for source trackers. - Keep source summaries factual and distinguish company claims, third-party allegations, and legal or regulatory findings.