Common Calculations
The HelloData API returns raw property data, giving you the freedom to aggregate and analyze it according to your needs. This guide shows you how to compute common metrics like average effective rent, occupancy, and price per square foot (PSF) from the /property/{id} response.
All examples assume you have a PropertyDetailsResponse object from GET /property/{id}. See the Property Details guide for how to fetch this data.
Important: Filtering Units
Before computing any metrics, you need to filter units correctly:
- Skip floorplans when actual units exist: If a property has both floorplans (
is_floorplan: true) and actual units, only use the actual units for calculations. - Handle null values: Filter out units with null values before averaging.
- Use current vs historical data: The examples below use the top-level fields (
price,effective_price,sqft) which represent the latest values. For historical calculations, use thehistoryarray.
Average Effective Rent
Average effective rent is the mean of all unit effective rents (price after discounts/concessions).
Formula: Average of effective_price or min_effective_price (if effective_price is null) for all valid units.
Average Asking Rent
Average asking rent is the mean of all unit asking rents (advertised price before discounts).
Formula: Average of price or min_price (if price is null) for all valid units.
Average Square Footage
Average square footage is the mean of all unit sizes.
Formula: Average of sqft or min_sqft (if sqft is null) for all valid units.
Average Effective Price Per Square Foot (PSF)
Important: PSF must be calculated as a weighted average, not as the average of individual unit PSF values.
Formula: sum(all_effective_prices) / sum(all_sqfts)
This gives you the true average PSF, accounting for unit size differences. Calculating average(price/sqft) would incorrectly weight all units equally regardless of size.
Average Asking Price Per Square Foot (PSF)
Same as effective PSF, but using asking prices instead.
Formula: sum(all_asking_prices) / sum(all_sqfts)
Average Concession Amount
Concessions are discounts or promotions that reduce the effective rent below the asking rent.
Formula: Average of (asking_price - effective_price) for all units with both values.
Occupancy Rate (Simplified)
Occupancy represents the percentage of units that are leased (not available for rent). This is a simplified calculation for a specific date. For time-series occupancy data, you would need to analyze availability_periods over time.
Formula: (total_units - available_units) / total_units * 100
This simplified calculation assumes number_units from the property represents the total unit count. For lease-up properties or more accurate calculations, you may need to use the occupancyOverTime function logic which considers when units entered/exited the market.
Complete Example
Here’s a complete example that computes all metrics at once:
Key Takeaways
-
Always filter floorplans: When a property has both floorplans and actual units, use only the actual units for calculations.
-
Handle null values: Filter out null values before computing averages. Use fallback values (
min_price,min_effective_price,min_sqft) when the primary field is null. -
PSF is weighted: Always calculate PSF as
sum(prices) / sum(sqfts), notaverage(price/sqft). This accounts for unit size differences. -
Use top-level fields for current values: The
price,effective_price, andsqftfields represent the latest values. For historical analysis, use thehistoryarray. -
Occupancy is complex: The simplified occupancy calculation above works for a single date. For accurate time-series occupancy, you need to analyze
availability_periodsover time, considering when units enter/exit the market.
These calculations match what you see on the HelloData platform. If your results differ, check that you’re filtering units correctly and handling null values as shown above.