← back to Commercialrealestate

scripts/sources/la-county.js

89 lines

// sources/la-county.js — canonical Los Angeles County place set, used as the geographic in-band gate.
//
// WHY: the tracker started SFV-only with a hand-kept neighborhood allowlist. Scope is now "all LA
// County" — so instead of appending cities one batch at a time, this is the authoritative set every
// captured listing's city is checked against. Covers (1) all 88 incorporated cities, (2) the major
// City-of-Los-Angeles neighborhoods that appear as "city" in listing feeds, and (3) the common
// unincorporated communities (Altadena, Marina del Rey, Topanga, East LA, etc.). Names are stored
// lowercased; match with LA_COUNTY.has(city.trim().toLowerCase()).
//
// Maintenance: if a real in-county listing is dropped because its feed used a name not here, add the
// alias — don't loosen to a substring match (that would pull Orange/Ventura/SB county bleed).

'use strict';

// (1) The 88 incorporated cities of Los Angeles County.
const INCORPORATED = [
  'agoura hills', 'alhambra', 'arcadia', 'artesia', 'avalon', 'azusa', 'baldwin park', 'bell',
  'bell gardens', 'bellflower', 'beverly hills', 'bradbury', 'burbank', 'calabasas', 'carson',
  'cerritos', 'claremont', 'commerce', 'compton', 'covina', 'cudahy', 'culver city', 'diamond bar',
  'downey', 'duarte', 'el monte', 'el segundo', 'gardena', 'glendale', 'glendora', 'hawaiian gardens',
  'hawthorne', 'hermosa beach', 'hidden hills', 'huntington park', 'industry', 'city of industry',
  'inglewood', 'irwindale', 'la canada flintridge', 'la cañada flintridge', 'la habra heights',
  'la mirada', 'la puente', 'la verne', 'lakewood', 'lancaster', 'lawndale', 'lomita', 'long beach',
  'los angeles', 'lynwood', 'malibu', 'manhattan beach', 'maywood', 'monrovia', 'montebello',
  'monterey park', 'norwalk', 'palmdale', 'palos verdes estates', 'paramount', 'pasadena',
  'pico rivera', 'pomona', 'rancho palos verdes', 'redondo beach', 'rolling hills',
  'rolling hills estates', 'rosemead', 'san dimas', 'san fernando', 'san gabriel', 'san marino',
  'santa clarita', 'santa fe springs', 'santa monica', 'sierra madre', 'signal hill', 'south el monte',
  'south gate', 'south pasadena', 'temple city', 'torrance', 'vernon', 'walnut', 'west covina',
  'west hollywood', 'westlake village', 'whittier'
];

// (2) Major City-of-Los-Angeles neighborhoods that show up as the "city" field in listing feeds.
const LA_NEIGHBORHOODS = [
  // San Fernando Valley
  'van nuys', 'reseda', 'north hollywood', 'northridge', 'panorama city', 'canoga park', 'sherman oaks',
  'sun valley', 'encino', 'granada hills', 'tarzana', 'woodland hills', 'winnetka', 'west hills',
  'lake balboa', 'valley village', 'valley glen', 'studio city', 'toluca lake', 'arleta', 'pacoima',
  'mission hills', 'sylmar', 'tujunga', 'sunland', 'porter ranch', 'chatsworth', 'north hills',
  'sepulveda', 'shadow hills', 'lake view terrace', 'cahuenga pass',
  // Westside
  'pacific palisades', 'brentwood', 'westwood', 'west los angeles', 'sawtelle', 'mar vista', 'venice',
  'playa del rey', 'playa vista', 'palms', 'cheviot hills', 'rancho park', 'century city',
  'beverly crest', 'bel air', 'bel-air',
  // Central / Eastside
  'hollywood', 'east hollywood', 'west hollywood', 'hancock park', 'larchmont', 'koreatown',
  'mid-city', 'mid city', 'mid-wilshire', 'pico-union', 'pico union', 'westlake', 'silver lake',
  'silverlake', 'echo park', 'los feliz', 'atwater village', 'eagle rock', 'highland park',
  'mount washington', 'glassell park', 'cypress park', 'lincoln heights', 'el sereno', 'boyle heights',
  'downtown los angeles', 'downtown', 'arts district', 'chinatown', 'historic filipinotown',
  // South / Harbor
  'south los angeles', 'south la', 'jefferson park', 'west adams', 'leimert park', 'baldwin hills',
  'crenshaw', 'view park', 'windsor hills', 'watts', 'san pedro', 'wilmington', 'harbor city',
  'harbor gateway', 'south park', 'university park', 'exposition park'
];

// (3) Common unincorporated LA County communities that appear in feeds.
const UNINCORPORATED = [
  'altadena', 'marina del rey', 'topanga', 'universal city', 'east los angeles', 'east la',
  'ladera heights', 'lennox', 'del aire', 'westmont', 'florence-graham', 'florence graham',
  'willowbrook', 'walnut park', 'west whittier', 'south whittier', 'hacienda heights', 'rowland heights',
  'avocado heights', 'valinda', 'charter oak', 'citrus', 'vincent', 'covina islands',
  'south san gabriel', 'east pasadena', 'east san gabriel', 'kinneloa mesa', 'mayflower village',
  'north el monte', 'south monrovia island', 'valencia', 'newhall', 'saugus', 'canyon country',
  'stevenson ranch', 'castaic', 'val verde', 'agua dulce', 'acton', 'littlerock', 'quartz hill',
  'lake los angeles', 'sun village', 'desert view highlands', 'la crescenta', 'la crescenta-montrose',
  'montrose', 'altadena', 'west carson', 'west compton', 'rancho dominguez', 'east rancho dominguez',
  'athens', 'west athens', 'ladera', 'view park-windsor hills'
];

const LA_COUNTY = new Set([...INCORPORATED, ...LA_NEIGHBORHOODS, ...UNINCORPORATED]);

// A practical default set of investment-submarket HUBS to actually navigate (the full 88+ cities is
// too many to sweep in one Browserbase session). Override at runtime with CC_NAV. The FILTER above
// stays county-wide regardless, so a hub search that happens to surface a neighboring in-county city
// is still kept.
const NAV_HUBS = [
  'Van Nuys', 'Reseda', 'North Hollywood', 'Sherman Oaks', 'Encino', 'Woodland Hills', 'Northridge',
  'Canoga Park', 'Studio City', 'Burbank', 'Glendale', 'Pasadena', 'Altadena', 'Los Angeles',
  'Silver Lake', 'Echo Park', 'Highland Park', 'Hollywood', 'West Hollywood', 'Koreatown',
  'Culver City', 'Santa Monica', 'Venice', 'Mar Vista', 'Beverly Hills', 'Brentwood',
  'Pacific Palisades', 'Malibu', 'Inglewood', 'Hawthorne', 'Gardena', 'Torrance', 'Long Beach',
  'San Pedro', 'Downey', 'Whittier', 'El Monte', 'Pomona', 'Lancaster', 'Palmdale', 'Santa Clarita'
];

const inLACounty = (city) => LA_COUNTY.has(String(city || '').trim().toLowerCase());

module.exports = { LA_COUNTY, NAV_HUBS, inLACounty, INCORPORATED, LA_NEIGHBORHOODS, UNINCORPORATED };