A rent-prediction model for Dar es Salaam built from 30,220 Instagram broker listings, told as a data essay: four models in order of ambition, SHAP on the winner, and a calculator that turns a budget into wards you can actually afford.

There is no MLS in Dar es Salaam. The rental market runs through madalali (brokers) posting to Instagram, and a listing is a caption, not a record: the price shows up as "2.5 Laki", the size as "vyumba vitatu", the location as a neighbourhood name spelled three different ways. Nobody can tell you what actually drives a rent, because nobody has the market in a table.
Turn 30,220 broker captions into 13,245 deduplicated rentals with eight structured features, then climb a ladder of models rather than jumping to the fanciest one: predict the neighbourhood median, then a regularised line, then a forest, then gradient boosting. Each rung has to beat the one below it to earn its place. Then interrogate the winner with SHAP and publish what it learned, as an essay with the figures inline rather than a notebook nobody opens.
70% of the model's predictive power comes from two features: the number of bedrooms (36%) and the neighbourhood (34%), in almost equal measure. Everything else combined (furnishing, amenities, property type, payment terms, timing) is the other 30%.
That revises the received wisdom. Location is not the whole story: where a home is and how big it is matter about equally.
Median baseline, ridge and lasso, random forest, XGBoost. Four rungs, each one accountable to the last.
Importance bars, a beeswarm and a partial-dependence curve, so the model says which way each feature pushes, not just how much.
Type a monthly budget and get the wards in reach, the brokers who post there, and what to search on Instagram.
The whole thing reads as a magazine issue: the method is the narrative, and every figure opens full-screen.



Split by property, not by row. Brokers repost the same flat across accounts. A careless random split lets the answer leak from train into test and makes a mediocre model look excellent.
Drop the features that already know the price. Affordability tier and price per bedroom are derived from price, so feeding them back in is predicting price from price. The price was also masked out of the caption before any text was read from it.
Publish the ceiling, not just the score. The target itself is an LLM extraction that is only about 73% consistent on re-run, so part of the remaining error is the label rather than the model. Saying so is the difference between an honest number and an impressive one.
Asking prices, stated up front. The model predicts what a dalali will advertise, not what a home is worth. That caveat is in the opening paragraph, not the footnotes.
Tell the calculator what you can pay a month. It shows which wards are in reach.