A house searching app written in Python (Innovation Day 2023)
- Filter by criterias
- beach, restaurants, food-store, bus-stop/train
- Show-case listings within a area
- Average salary in area
- Natural Language Query (ChatGPT -> structured query)
- Selling Description (e.g. Wiki+ChatGPT)
- Calculate Room Sizes based on total sqm & "planritning"
- Frontend -- Pause
- (Optional) Requirements / Improvements / Flow -- Erik
- OSM Integration --
- Booli integration --
- Backend Core --
- Tests --
curl micro.mamba.pm/install.sh | bash # alternatively https://mamba.readthedocs.io/en/latest/installation.html
micromamba create -f env.yml
micromamba shell init --shell=bash --prefix=~/micromamba
# Start a new shell
micromamba activate hemnet
There's a few ways to parse OSM data, both simpler and harder. I propose two different ways.
This API allows using a Web API which means nothing is kept local except what we query. There's network delay but it has a lot of possibilities.
This API allows querying a local .osm.pbf
file which means it's really fast and doesn't require network.
Albeit it is less configurable and requires more setup!
Sweden's latest .osm.pbf
file is available at download.geofabrik.de/europe/sweden-latest.osm.pbf.
I found two ways to accomplish a way to find available homes:
Scraping is ugly and regarded as bad practice, sometimes not even legal.
Hemnet's API is only built for brokers and is not able to list listings. Hence scraping is required.
I started building a scraper which I scrapped when I found the second solution.
Booli, another home search tool, has a real API which means we can much much simpler query in a (fully) legal way!
It becomes more efficient and nicer all round.
I see multiple ways we can implement this.
Simple as is.
Hard to test. We need a tool like "cypress" to test the frontend. No backend available.
Pretty simple too, perhaps an uglier frontend though. We can use some nice CSS styling to keep it decent.
Easier to test.
We use FastAPI as a backend and streamlit as a frontend. This decoupling makes the backend testable in separation.
Slower development. Better.
...