{ "cells": [ { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import os\n", "\n", "from helpers import (\n", " get_data_path_for_config,\n", " get_combined_df,\n", " save_final_df_as_jsonl,\n", " handle_slug_column_mappings,\n", " set_home_type,\n", ")" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "CONFIG_NAME = \"days_on_market\"" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "processing Metro_med_listings_price_cut_amt_uc_sfr_month.csv\n", "processing Metro_perc_listings_price_cut_uc_sfr_week.csv\n", "processing Metro_med_listings_price_cut_amt_uc_sfrcondo_month.csv\n", "processing Metro_med_listings_price_cut_amt_uc_sfr_week.csv\n", "processing Metro_med_doz_pending_uc_sfrcondo_month.csv\n", "processing Metro_mean_listings_price_cut_amt_uc_sfr_sm_month.csv\n", "processing Metro_med_listings_price_cut_perc_uc_sfrcondo_sm_month.csv\n", "processing Metro_mean_days_to_close_uc_sfrcondo_week.csv\n", "processing Metro_mean_days_to_close_uc_sfrcondo_month.csv\n", "processing Metro_mean_listings_price_cut_amt_uc_sfrcondo_sm_month.csv\n", "processing Metro_med_listings_price_cut_perc_uc_sfr_week.csv\n", "processing Metro_median_days_to_close_uc_sfrcondo_sm_week.csv\n", "processing Metro_med_listings_price_cut_perc_uc_sfr_sm_week.csv\n", "processing Metro_mean_listings_price_cut_perc_uc_sfrcondo_sm_week.csv\n", "processing Metro_perc_listings_price_cut_uc_sfrcondo_week.csv\n", "processing Metro_med_doz_pending_uc_sfrcondo_sm_month.csv\n", "processing Metro_mean_days_to_close_uc_sfrcondo_sm_week.csv\n", "processing Metro_med_listings_price_cut_perc_uc_sfrcondo_week.csv\n", "processing Metro_mean_listings_price_cut_amt_uc_sfr_week.csv\n", "processing Metro_med_listings_price_cut_perc_uc_sfrcondo_month.csv\n", "processing Metro_mean_doz_pending_uc_sfrcondo_week.csv\n", "processing Metro_mean_listings_price_cut_amt_uc_sfrcondo_week.csv\n", "processing Metro_median_days_to_close_uc_sfrcondo_week.csv\n", "processing Metro_med_listings_price_cut_amt_uc_sfr_sm_month.csv\n", "processing Metro_mean_doz_pending_uc_sfrcondo_sm_month.csv\n", "processing Metro_med_listings_price_cut_perc_uc_sfr_sm_month.csv\n", "processing Metro_perc_listings_price_cut_uc_sfrcondo_sm_week.csv\n", "processing Metro_median_days_to_close_uc_sfrcondo_sm_month.csv\n", "processing Metro_med_listings_price_cut_perc_uc_sfr_month.csv\n", "processing Metro_mean_listings_price_cut_perc_uc_sfrcondo_week.csv\n", "processing Metro_med_listings_price_cut_amt_uc_sfrcondo_week.csv\n", "processing Metro_med_listings_price_cut_amt_uc_sfrcondo_sm_week.csv\n", "processing Metro_mean_days_to_close_uc_sfrcondo_sm_month.csv\n", "processing Metro_med_listings_price_cut_amt_uc_sfr_sm_week.csv\n", "processing Metro_mean_doz_pending_uc_sfrcondo_sm_week.csv\n", "processing Metro_mean_listings_price_cut_amt_uc_sfrcondo_sm_week.csv\n", "processing Metro_mean_listings_price_cut_amt_uc_sfr_sm_week.csv\n", "processing Metro_perc_listings_price_cut_uc_sfrcondo_sm_month.csv\n", "processing Metro_mean_listings_price_cut_amt_uc_sfrcondo_month.csv\n", "processing Metro_med_listings_price_cut_amt_uc_sfrcondo_sm_month.csv\n", "processing Metro_med_doz_pending_uc_sfrcondo_sm_week.csv\n", "processing Metro_med_listings_price_cut_perc_uc_sfrcondo_sm_week.csv\n", "processing Metro_perc_listings_price_cut_uc_sfr_month.csv\n", "processing Metro_med_doz_pending_uc_sfrcondo_week.csv\n", "processing Metro_mean_listings_price_cut_perc_uc_sfrcondo_sm_month.csv\n", "processing Metro_perc_listings_price_cut_uc_sfr_sm_month.csv\n", "processing Metro_median_days_to_close_uc_sfrcondo_month.csv\n", "processing Metro_perc_listings_price_cut_uc_sfr_sm_week.csv\n", "processing Metro_mean_listings_price_cut_perc_uc_sfrcondo_month.csv\n", "processing Metro_mean_listings_price_cut_amt_uc_sfr_month.csv\n", "processing Metro_mean_doz_pending_uc_sfrcondo_month.csv\n" ] }, { "data": { "text/html": [ "
\n", " | RegionID | \n", "SizeRank | \n", "RegionName | \n", "RegionType | \n", "StateName | \n", "Home Type | \n", "Date | \n", "Percent Listings Price Cut | \n", "Mean Listings Price Cut Amount | \n", "Percent Listings Price Cut (Smoothed) | \n", "Mean Listings Price Cut Amount (Smoothed) | \n", "Median Days on Pending (Smoothed) | \n", "Median Days on Pending | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "102001 | \n", "0 | \n", "United States | \n", "country | \n", "NaN | \n", "SFR | \n", "2018-01-06 | \n", "NaN | \n", "13508.368375 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
1 | \n", "102001 | \n", "0 | \n", "United States | \n", "country | \n", "NaN | \n", "SFR | \n", "2018-01-13 | \n", "0.049042 | \n", "14114.788383 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
2 | \n", "102001 | \n", "0 | \n", "United States | \n", "country | \n", "NaN | \n", "SFR | \n", "2018-01-20 | \n", "0.044740 | \n", "14326.128956 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
3 | \n", "102001 | \n", "0 | \n", "United States | \n", "country | \n", "NaN | \n", "SFR | \n", "2018-01-27 | \n", "0.047930 | \n", "13998.585612 | \n", "NaN | \n", "13998.585612 | \n", "NaN | \n", "NaN | \n", "
4 | \n", "102001 | \n", "0 | \n", "United States | \n", "country | \n", "NaN | \n", "SFR | \n", "2018-02-03 | \n", "0.047622 | \n", "14120.035549 | \n", "0.047622 | \n", "14120.035549 | \n", "NaN | \n", "NaN | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
586709 | \n", "845172 | \n", "769 | \n", "Winfield, KS | \n", "msa | \n", "KS | \n", "all homes | \n", "2024-01-06 | \n", "0.094017 | \n", "NaN | \n", "0.037378 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
586710 | \n", "845172 | \n", "769 | \n", "Winfield, KS | \n", "msa | \n", "KS | \n", "all homes | \n", "2024-01-13 | \n", "0.070175 | \n", "NaN | \n", "0.043203 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
586711 | \n", "845172 | \n", "769 | \n", "Winfield, KS | \n", "msa | \n", "KS | \n", "all homes | \n", "2024-01-20 | \n", "0.043478 | \n", "NaN | \n", "0.054073 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
586712 | \n", "845172 | \n", "769 | \n", "Winfield, KS | \n", "msa | \n", "KS | \n", "all homes | \n", "2024-01-27 | \n", "0.036697 | \n", "NaN | \n", "0.061092 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
586713 | \n", "845172 | \n", "769 | \n", "Winfield, KS | \n", "msa | \n", "KS | \n", "all homes | \n", "2024-02-03 | \n", "0.077670 | \n", "NaN | \n", "0.057005 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
586714 rows × 13 columns
\n", "\n", " | Region ID | \n", "Size Rank | \n", "Region | \n", "Region Type | \n", "State | \n", "Home Type | \n", "Date | \n", "Percent Listings Price Cut | \n", "Mean Listings Price Cut Amount | \n", "Percent Listings Price Cut (Smoothed) | \n", "Mean Listings Price Cut Amount (Smoothed) | \n", "Median Days on Pending (Smoothed) | \n", "Median Days on Pending | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "102001 | \n", "0 | \n", "United States | \n", "country | \n", "NaN | \n", "SFR | \n", "2018-01-06 | \n", "NaN | \n", "13508.368375 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
1 | \n", "102001 | \n", "0 | \n", "United States | \n", "country | \n", "NaN | \n", "SFR | \n", "2018-01-13 | \n", "0.049042 | \n", "14114.788383 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
2 | \n", "102001 | \n", "0 | \n", "United States | \n", "country | \n", "NaN | \n", "SFR | \n", "2018-01-20 | \n", "0.044740 | \n", "14326.128956 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
3 | \n", "102001 | \n", "0 | \n", "United States | \n", "country | \n", "NaN | \n", "SFR | \n", "2018-01-27 | \n", "0.047930 | \n", "13998.585612 | \n", "NaN | \n", "13998.585612 | \n", "NaN | \n", "NaN | \n", "
4 | \n", "102001 | \n", "0 | \n", "United States | \n", "country | \n", "NaN | \n", "SFR | \n", "2018-02-03 | \n", "0.047622 | \n", "14120.035549 | \n", "0.047622 | \n", "14120.035549 | \n", "NaN | \n", "NaN | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
586709 | \n", "845172 | \n", "769 | \n", "Winfield, KS | \n", "msa | \n", "KS | \n", "all homes | \n", "2024-01-06 | \n", "0.094017 | \n", "NaN | \n", "0.037378 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
586710 | \n", "845172 | \n", "769 | \n", "Winfield, KS | \n", "msa | \n", "KS | \n", "all homes | \n", "2024-01-13 | \n", "0.070175 | \n", "NaN | \n", "0.043203 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
586711 | \n", "845172 | \n", "769 | \n", "Winfield, KS | \n", "msa | \n", "KS | \n", "all homes | \n", "2024-01-20 | \n", "0.043478 | \n", "NaN | \n", "0.054073 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
586712 | \n", "845172 | \n", "769 | \n", "Winfield, KS | \n", "msa | \n", "KS | \n", "all homes | \n", "2024-01-27 | \n", "0.036697 | \n", "NaN | \n", "0.061092 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
586713 | \n", "845172 | \n", "769 | \n", "Winfield, KS | \n", "msa | \n", "KS | \n", "all homes | \n", "2024-02-03 | \n", "0.077670 | \n", "NaN | \n", "0.057005 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
586714 rows × 13 columns
\n", "