housingCost module¶
- housingCost.housingCostMain(countyCode_HousingCost, apiKey_HousingCost)[source]¶
Scrapes the HUD website to retrieve the most recent housing cost data for Racine, WI by default.
The function sends a GET request to the HUD API to fetch data for different bedroom sizes. If successful, it processes the JSON response into a Polars DataFrame containing housing costs for Efficiency, One-Bedroom, Two-Bedroom, Three-Bedroom, and Four-Bedroom types.
Returns: polars.DataFrame: A polars DataFrame with three columns, ‘Type’, ‘Lookup’, and ‘Cost’, representing housing costs for each type.
Prints a message if the request fails, including the status code of the response.