Clock Icon - Technology Webflow Template
10
min read

Peak to Current Real Estate Price Analysis with the Parcl Labs API

Learn how to calculate the peak to current real estate price delta in a few lines of code with the Parcl Labs API.

The Parcl Labs API gives you access to the Parcl Labs Price Feed,  a daily price feed that mimics the behavior of real-world real estate markets and gives users access to price exposure of real estate. Not only does it update daily, and expose real time insights, but the historical price feed of a given geography is available as well, allowing you to understand the trends of any MSA, city or neighborhood. Get access to the Parcl Labs API today, for free, in three easy steps:

  1. Register for the API
  2. Define the GraphQL query
  3. Call the API and visualize the results

Step 1: Register for the API

If you haven’t registered for the API, check out our first blog which teaches you the basics of querying the Parcl Labs Price Feed or click the button below. If you’ve already registered, move on the step 2!

After you register you will receive an API key giving you access to the Parcl Labs API. The Parcl Labs API leverages GraphQL to give you access to real time real estate data, demographic data and geospatial data to empower users to perform accurate and timely real estate analysis. If you are not familiar with the Parcl Labs API or GraphQL, you can read our documentation to learn more.

You can retrieve API data with only a couple lines of GraphQL code. For demonstration purposes here we will show you a use case using Python, one of the most popular programming languages for data analysis, but the API can be used in combination with your favorite tech stack. Once you’ve received your key, you can store it as a variable in Python along with the API endpoint URL:

Step 2: Define the GraphQL query

By accessing the price feed through the API, we can explore the price feed fluctuations in the Case Schiller 20 MSAs (metropolitan statistical areas) for 2022. Specifically, in just a few lines of code, we can extract the 2022 peak and current price feed values, and calculate the percentage change.

First we name our query, in this case PEAK_TO_CURRENT_2022, and then we can query all MSAs in the MSA table (see the Parcl Labs API docs for a comprehensive list of geographies and objects available in the API). In the pilot MSA only the Case Schiller 20 MSAs are available.

After defining the level of geography, the columns we output from the MSA table are MSA_NAME and PARCL_ID (our unique identifier of different levels of geography). Within the MSA geographies is a nested table, parcl_price_feed, containing the price feed for each day. In the example below we pull in the most recent price feed, in addition to the max price that occurred in 2022. This is what the query would look like:

Step 3: Call the API and visualize the results 

Once you have plugged in your query, the URL and API key you can call the API with Python:

The next step is to flatten the JSON response into a dataframe and calculate the percent difference between the peak and current prices:


#Pull the data into a dataframe and calculate the delta 
PEAK_TO_CURRENT_2022_df = pd.json_normalize(
    data,
    'parcl_price_feed',
    ['MSA_NAME', 'PARCL_ID', ['parcl_price_feed_aggregate', 'aggregate', 'max', 'PARCL_PRICE_FEED']]
)

PEAK_TO_CURRENT_2022_df.rename(columns={'PARCL_PRICE_FEED': 'Current PLPF', 'parcl_price_feed_aggregate.aggregate.max.PARCL_PRICE_FEED': '2022 Peak PLPF'}, inplace=True)
PEAK_TO_CURRENT_2022_df['Percent Delta'] = ((PEAK_TO_CURRENT_2022_df['Current PLPF'] - PEAK_TO_CURRENT_2022_df['2022 Peak PLPF']) / PEAK_TO_CURRENT_2022_df['2022 Peak PLPF'] * 100)
PEAK_TO_CURRENT_2022_df[['Percent Delta', '2022 Peak PLPF', 'Current PLPF']] = PEAK_TO_CURRENT_2022_df[['Percent Delta', '2022 Peak PLPF', 'Current PLPF']].astype(float).round(2)
PEAK_TO_CURRENT_2022_df = PEAK_TO_CURRENT_2022_df.sort_values(by=['Percent Delta'], ascending=True)

And finally visualize it with your choice of visualization libraries, here we use Plotly:

Based on our parameters, this outputs a bar chart showing the percent delta between the 2022 peak price and current day, with all data coming from the Parcl Labs API.

Pilot API data is currently in beta and may not exactly match our published content.

The real estate market has been in flux over the past couple of months. After prices soared across the country in late Spring and early Summer they have come down significantly in the past couple of months, so these peak to current values are no surprise. Our proprietary Parcl Labs Price Feed (PLPF) can give you insights into the evolution any geography in real time, so you don’t have to make decisions with untimely data, such as the lagged Case Schiller index. In addition being up-to-date, the historical values are available as well, allowing users to contextualize their market for any time frame.

Couple this valuable and timely pricing information with unique enrichment data, such as public sentiment around housing price (will link to next blog here once it’s posted), to unlock previously unknown insights into any real estate market.

You can register here for early access to our API and start getting insights into your markets well ahead of others.

Check out the full notebook to run this code yourself!

Disclaimer: The material contained on this website is provided for educational and informational purposes only, without any express or implied warranty of any kind. The information on this website does not constitute the provision of investment, tax, legal or other professional advice. No reliance may be placed for any purpose on the information and opinions contained herein or their accuracy or completeness, and nothing contained herein may be relied upon in making any investment decision.

Jason Lewris

Co-Founder

Jason leads the data team at Parcl Labs. Jason brings his experience from Microsoft and Deloitte where he worked on international data standardization and machine learning problems at scale.