Skip to content

perfectly-preserved-pie/larentals

Repository files navigation

CodeQL

Build image and publish to DockerHub

Build and Publish - Dev Build

This is an interactive map based on /u/WilliamMcCarty's and /u/TannerBeyer's weekly spreadsheets of new rental & for-sale listings in the /r/LArentals & /r/LosAngelesRealEstate subreddits. Just like the actual spreadsheets, you can filter the map based on different criteria, such as

  • Monthly rent/List price
  • Security deposit cost
  • Number of bedrooms
  • Number of garage spaces
  • Pet Policy
  • Square footage
  • HOA fees (for-sale properties only)
  • and more!

Some additional capabilities are offered, such as a featured MLS photo for the property and a link to the associated MLS listing page (if available).

You can click the toggle buttons next to the title to switch between For Rent and For Sale listings:

image

⚠ This website is mobile-friendly but I highly recommend using an actual computer or tablet for the best experience

What I'm Using

  • BeautifulSoup (webscraping MLS photos and links)
  • Dash Leaflet (displaying the map and graphing the markers)
  • Dash Bootstrap Components (the website layout and icons)
  • GeoPy (geocoding coordinates via the Google Maps API)
  • ImageKit (resizing MLS photos into a standard size on the fly)
  • Pandas (handling and manipulating the rental property data for each address)

A Deeper Dive

I made a post detailing my idea, progress, challenges, etc.

How to Build and Run

  1. Clone the repo git clone https://github.com/perfectly-preserved-pie/larentals.git
  2. cd into the new directory
  3. Run uv run wheretolive-la. uv will install the project into its managed environment and expose the configured CLI commands from pyproject.toml.

Docker

Build the app image:

docker build -t larentals .

Run the app container:

docker run --rm -p 8080:8080 larentals

Self-Hosted Valhalla

The commute filter can use a self-hosted Valhalla instance instead of the public demo service. This repo includes a sidecar Compose file for that setup:

docker compose -f docker-compose.valhalla.yml up -d

Setup details, GTFS folder layout, and the app env vars for switching to the local service live in docker/valhalla/README.md. There is also a helper to pull common LA-area GTFS feeds into the expected folders:

uv run download-gtfs-feeds all

The repo also includes a starter docker/valhalla/custom_files/valhalla.json that narrows Valhalla's service limits to this app's route + isochrone + multimodal commute workload.

Partial Exact Commute Verification

When the rough commute shortlist is large, the app now exact-checks the nearest subset of listings first instead of skipping exact verification entirely.

Helpful tuning env vars:

  • VALHALLA_EXACT_COMMUTE_MAX_CANDIDATES=60 to cap how many nearest listings are exact-verified
  • VALHALLA_EXACT_COMMUTE_MAX_WORKERS=4 to control concurrent route checks

The map shows verified commute matches by default and can optionally include additional rough matches when the shortlist is larger than the exact-check cap.

Non-Docker

Run the Dash app directly:

uv run wheretolive-la

Releases

No releases published

Packages

 
 
 

Contributors