Project Type: One-time Data Scraping & Normalization Pipeline
Author: Derious Vaughn
Last Updated: February 15th, 2025
- Overview
- Use Cases
- Case Study Insights
- Data Pipeline Architecture
- Installation & Setup
- Running the Pipeline
- Data Privacy & Compliance
- Sample Data Only
- Success Metrics
- Future Enhancements
- Acknowledgments
This repository contains a Python-based pipeline that:
- Scrapes the official California school directory (approximately 13,000 schools).
- Normalizes the data (addresses, contact info, standardized fields).
- Enriches each record with demographic data (e.g., black population ratio in the school’s city).
- Generates an Excel spreadsheet separating public and private schools, complete with contact details and a composite or ranking score for lead generation.
Why?
- Shades of Color: A black-owned company seeking to expand its fundraising program, targeting schools in areas with significant black populations.
- Educational Consulting Startup: Identifying prospective school clients for consulting services, with a particular focus on private schools (faster decision cycles).
- Objective: Identify schools (especially private) more likely to partner for fundraising.
- Reasoning: Private schools can make decisions quickly; demographic data (black population ratio) helps align outreach with the company’s audience.
- Outcome: A CRM-friendly spreadsheet listing school details, contact info, and demographic metrics.
- Objective: Garner a list of schools (both public and private) that may need consulting.
- Reasoning: The composite and ranking scores highlight high-enrollment schools in relevant demographic areas.
- Outcome: A single spreadsheet for import into a CRM or further segmentation.
This repository is not only a functional data-scraping pipeline but also a demonstration of engineering best practices and problem-solving skills:
-
Real-World Business Context
- Serving Shades of Color (fundraising expansion) and an Educational Consulting Startup, showing how data engineering solutions solve practical lead-generation problems.
-
Modular Architecture
- Each stage (Scraper, Normalizer, Demographics, Spreadsheet) is isolated, making code easier to maintain, test, and extend.
-
Scalable & Extensible
- The pipeline can handle thousands of schools and integrate new data sources (like Hispanic demographics) with minimal refactoring.
-
Validation & Quality Checks
- Success metrics explicitly track accuracy and completeness, reflecting real-world QA processes.
- Spot-checking ensures data reliability before final handoff to outreach teams or CRMs.
-
Practical Deliverable
- The final Excel file is CRM-friendly, enabling direct import.
- Employers can see how data flows from raw scraping → standardized records → advanced analytics.
-
Technical Fluency
- Showcases proficiency in Python, library usage (e.g.,
usaddress,pandas), BeautifulSoup parsing, and environment setup.
- Showcases proficiency in Python, library usage (e.g.,
-
Scraper
- Pulls data from the California School Directory.
- Collects essential details: name, address, phone, and administrator contacts.
- Offers a test mode (10 schools only) for quick demonstration.
-
Normalizer
- Cleans addresses (usaddress), standardizes fields, merges multi-layer data.
-
Demographic Calculator
- Loads city-level demographic data (e.g., black population from IRS/census sources).
- Enriches each school record with a “Black Population Ratio.”
-
Spreadsheet Builder
- Splits data into public vs. private schools.
- Public: Calculates a “Composite Score” combining enrollment size and black population ratio.
- Private: Uses black population ratio as a “Ranking Score.”
- Outputs to an Excel workbook with separate sheets.
-
Clone the Repository
git clone https://github.com/theHaruspex/CA-School-Scraper.git cd CA-School-Scraper -
Install Requirements
pip install -r requirements.txt
-
(Optional) Create a Virtual Environment
python -m venv venv source venv/bin/activate # or venv\Scripts�ctivate on Windows pip install -r requirements.txt
python pipeline.py- Generates the full dataset (~13,000 schools).
- Outputs an Excel file (
School_Outreach_Contacts.xlsx). - Use test mode for smaller runs (~10 schools).
- Publicly Available Data: No student-level PII, all administrator emails are professional/public.
- Compliance Considerations: If using this for outreach, comply with CAN-SPAM & local laws.
- Test Mode Sample: The repository contains a 10-school sample only.
- This repo excludes the full 13,000-school dataset (~98MB).
- A sample of ~10 schools is provided for testing and demonstration.
- Expand Demographics: Add Hispanic/other data.
- Geographic Expansion: Support for nationwide scraping.
- California Department of Education for the school directory data.
- Public IRS/City Data for demographic information.