fix: treat date as date
Browse files- .gitignore +3 -1
- processed/sales/final5.jsonl +2 -2
- processors/sales.ipynb +362 -411
- zillow.py +1 -1
.gitignore
CHANGED
@@ -1,3 +1,5 @@
|
|
1 |
*.DS_STORE
|
2 |
|
3 |
-
*__pycache__*
|
|
|
|
|
|
1 |
*.DS_STORE
|
2 |
|
3 |
+
*__pycache__*
|
4 |
+
|
5 |
+
*cache**
|
processed/sales/final5.jsonl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c219585a613fd2d8f7dd0fa8059ee961f94f36642aa882d2b785bdc0dd6c3515
|
3 |
+
size 139297577
|
processors/sales.ipynb
CHANGED
@@ -96,17 +96,16 @@
|
|
96 |
" <th>StateName</th>\n",
|
97 |
" <th>Home Type</th>\n",
|
98 |
" <th>Date</th>\n",
|
99 |
-
" <th>Mean Sale to List Ratio (Smoothed)</th>\n",
|
100 |
" <th>Median Sale to List Ratio</th>\n",
|
101 |
" <th>Median Sale Price</th>\n",
|
102 |
-
" <th>% Sold Below List (Smoothed)</th>\n",
|
103 |
" <th>Median Sale Price (Smoothed) (Seasonally Adjusted)</th>\n",
|
104 |
-
" <th>% Sold Below List</th>\n",
|
105 |
" <th>Median Sale Price (Smoothed)</th>\n",
|
|
|
106 |
" <th>Median Sale to List Ratio (Smoothed)</th>\n",
|
107 |
" <th>% Sold Above List</th>\n",
|
108 |
-
" <th>
|
109 |
" <th>Mean Sale to List Ratio</th>\n",
|
|
|
110 |
" <th>% Sold Above List (Smoothed)</th>\n",
|
111 |
" </tr>\n",
|
112 |
" </thead>\n",
|
@@ -121,7 +120,6 @@
|
|
121 |
" <td>SFR</td>\n",
|
122 |
" <td>2008-02-02</td>\n",
|
123 |
" <td>NaN</td>\n",
|
124 |
-
" <td>NaN</td>\n",
|
125 |
" <td>172000.0</td>\n",
|
126 |
" <td>NaN</td>\n",
|
127 |
" <td>NaN</td>\n",
|
@@ -143,7 +141,6 @@
|
|
143 |
" <td>SFR</td>\n",
|
144 |
" <td>2008-02-09</td>\n",
|
145 |
" <td>NaN</td>\n",
|
146 |
-
" <td>NaN</td>\n",
|
147 |
" <td>165400.0</td>\n",
|
148 |
" <td>NaN</td>\n",
|
149 |
" <td>NaN</td>\n",
|
@@ -165,7 +162,6 @@
|
|
165 |
" <td>SFR</td>\n",
|
166 |
" <td>2008-02-16</td>\n",
|
167 |
" <td>NaN</td>\n",
|
168 |
-
" <td>NaN</td>\n",
|
169 |
" <td>168000.0</td>\n",
|
170 |
" <td>NaN</td>\n",
|
171 |
" <td>NaN</td>\n",
|
@@ -187,12 +183,11 @@
|
|
187 |
" <td>SFR</td>\n",
|
188 |
" <td>2008-02-23</td>\n",
|
189 |
" <td>NaN</td>\n",
|
|
|
190 |
" <td>NaN</td>\n",
|
191 |
-
" <td>
|
192 |
-
" <td>NaN</td>\n",
|
193 |
" <td>NaN</td>\n",
|
194 |
" <td>NaN</td>\n",
|
195 |
-
" <td>167600.0</td>\n",
|
196 |
" <td>NaN</td>\n",
|
197 |
" <td>NaN</td>\n",
|
198 |
" <td>NaN</td>\n",
|
@@ -207,12 +202,11 @@
|
|
207 |
" <td>country</td>\n",
|
208 |
" <td>NaN</td>\n",
|
209 |
" <td>SFR</td>\n",
|
210 |
-
" <td>2008-
|
211 |
-
" <td>NaN</td>\n",
|
212 |
-
" <td>NaN</td>\n",
|
213 |
-
" <td>NaN</td>\n",
|
214 |
" <td>NaN</td>\n",
|
|
|
215 |
" <td>NaN</td>\n",
|
|
|
216 |
" <td>NaN</td>\n",
|
217 |
" <td>NaN</td>\n",
|
218 |
" <td>NaN</td>\n",
|
@@ -241,229 +235,210 @@
|
|
241 |
" <td>...</td>\n",
|
242 |
" <td>...</td>\n",
|
243 |
" <td>...</td>\n",
|
244 |
-
" <td>...</td>\n",
|
245 |
" </tr>\n",
|
246 |
" <tr>\n",
|
247 |
-
" <th>
|
248 |
-
" <td>
|
249 |
-
" <td>
|
250 |
-
" <td>
|
251 |
" <td>msa</td>\n",
|
252 |
-
" <td>
|
253 |
" <td>all homes</td>\n",
|
254 |
-
" <td>2023-
|
255 |
-
" <td>0.
|
256 |
-
" <td>
|
257 |
-
" <td>
|
258 |
-
" <td>0
|
259 |
-
" <td>
|
260 |
-
" <td>0.
|
261 |
-
" <td>
|
262 |
-
" <td>0.
|
263 |
-
" <td>0.
|
264 |
-
" <td>
|
265 |
-
" <td>0.
|
266 |
-
" <td>0.312332</td>\n",
|
267 |
" </tr>\n",
|
268 |
" <tr>\n",
|
269 |
-
" <th>
|
270 |
-
" <td>
|
271 |
-
" <td>
|
272 |
-
" <td>
|
273 |
" <td>msa</td>\n",
|
274 |
-
" <td>
|
275 |
" <td>all homes</td>\n",
|
276 |
-
" <td>2023-
|
277 |
-
" <td>0.
|
278 |
-
" <td>
|
279 |
-
" <td>
|
280 |
-
" <td>0
|
281 |
-
" <td>
|
282 |
-
" <td>0.
|
283 |
-
" <td>
|
284 |
-
" <td>0.
|
285 |
-
" <td>0.
|
286 |
-
" <td>
|
287 |
-
" <td>0.
|
288 |
-
" <td>0.294778</td>\n",
|
289 |
" </tr>\n",
|
290 |
" <tr>\n",
|
291 |
-
" <th>
|
292 |
-
" <td>
|
293 |
-
" <td>
|
294 |
-
" <td>
|
295 |
" <td>msa</td>\n",
|
296 |
-
" <td>
|
297 |
" <td>all homes</td>\n",
|
298 |
-
" <td>2023-
|
299 |
-
" <td>0.
|
300 |
-
" <td>
|
301 |
-
" <td>
|
302 |
-
" <td>0
|
303 |
-
" <td>
|
304 |
-
" <td>0.
|
305 |
-
" <td>
|
306 |
-
" <td>0.
|
307 |
-
" <td>0.
|
308 |
-
" <td>
|
309 |
-
" <td>0.
|
310 |
-
" <td>0.285128</td>\n",
|
311 |
" </tr>\n",
|
312 |
" <tr>\n",
|
313 |
-
" <th>
|
314 |
-
" <td>
|
315 |
-
" <td>
|
316 |
-
" <td>
|
317 |
" <td>msa</td>\n",
|
318 |
-
" <td>
|
319 |
" <td>all homes</td>\n",
|
320 |
-
" <td>2023-
|
321 |
-
" <td>0.
|
322 |
-
" <td>
|
323 |
-
" <td>
|
324 |
-
" <td>0
|
325 |
-
" <td>
|
326 |
-
" <td>0.
|
327 |
-
" <td>
|
328 |
-
" <td>0.
|
329 |
-
" <td>0.
|
330 |
-
" <td>
|
331 |
-
" <td>0.
|
332 |
-
" <td>0.272350</td>\n",
|
333 |
" </tr>\n",
|
334 |
" <tr>\n",
|
335 |
-
" <th>
|
336 |
-
" <td>
|
337 |
-
" <td>
|
338 |
-
" <td>
|
339 |
" <td>msa</td>\n",
|
340 |
-
" <td>
|
341 |
" <td>all homes</td>\n",
|
342 |
-
" <td>2023-
|
343 |
-
" <td>0.
|
344 |
-
" <td>
|
345 |
-
" <td>
|
346 |
-
" <td>0
|
347 |
-
" <td>
|
348 |
-
" <td>0.
|
349 |
-
" <td>
|
350 |
-
" <td>0.
|
351 |
-
" <td>0.
|
352 |
-
" <td>
|
353 |
-
" <td>0.
|
354 |
-
" <td>0.280538</td>\n",
|
355 |
" </tr>\n",
|
356 |
" </tbody>\n",
|
357 |
"</table>\n",
|
358 |
-
"<p>
|
359 |
"</div>"
|
360 |
],
|
361 |
"text/plain": [
|
362 |
-
" RegionID SizeRank
|
363 |
-
"0 102001 0
|
364 |
-
"1 102001 0
|
365 |
-
"2 102001 0
|
366 |
-
"3 102001 0
|
367 |
-
"4 102001 0
|
368 |
-
"... ... ...
|
369 |
-
"
|
370 |
-
"
|
371 |
-
"
|
372 |
-
"
|
373 |
-
"
|
374 |
-
"\n",
|
375 |
-
" Date Mean Sale to List Ratio (Smoothed) \\\n",
|
376 |
-
"0 2008-02-02 NaN \n",
|
377 |
-
"1 2008-02-09 NaN \n",
|
378 |
-
"2 2008-02-16 NaN \n",
|
379 |
-
"3 2008-02-23 NaN \n",
|
380 |
-
"4 2008-02-29 NaN \n",
|
381 |
-
"... ... ... \n",
|
382 |
-
"504603 2023-07-31 0.976219 \n",
|
383 |
-
"504604 2023-08-31 0.971893 \n",
|
384 |
-
"504605 2023-09-30 0.968028 \n",
|
385 |
-
"504606 2023-10-31 0.962485 \n",
|
386 |
-
"504607 2023-11-30 0.967126 \n",
|
387 |
"\n",
|
388 |
-
" Median Sale to List Ratio Median Sale Price \\\n",
|
389 |
-
"0
|
390 |
-
"1
|
391 |
-
"2
|
392 |
-
"3
|
393 |
-
"4
|
394 |
-
"...
|
395 |
-
"
|
396 |
-
"
|
397 |
-
"
|
398 |
-
"
|
399 |
-
"
|
400 |
"\n",
|
401 |
-
"
|
402 |
-
"0
|
403 |
-
"1
|
404 |
-
"2
|
405 |
-
"3
|
406 |
-
"4
|
407 |
-
"...
|
408 |
-
"
|
409 |
-
"
|
410 |
-
"
|
411 |
-
"
|
412 |
-
"
|
413 |
"\n",
|
414 |
-
" Median Sale Price (Smoothed)
|
415 |
-
"0
|
416 |
-
"1
|
417 |
-
"2
|
418 |
-
"3
|
419 |
-
"4
|
420 |
-
"...
|
421 |
-
"
|
422 |
-
"
|
423 |
-
"
|
424 |
-
"
|
425 |
-
"
|
426 |
"\n",
|
427 |
-
" Median Sale
|
428 |
-
"0
|
429 |
-
"1
|
430 |
-
"2
|
431 |
-
"3
|
432 |
-
"4
|
433 |
-
"...
|
434 |
-
"
|
435 |
-
"
|
436 |
-
"
|
437 |
-
"
|
438 |
-
"
|
439 |
"\n",
|
440 |
-
"
|
441 |
-
"0
|
442 |
-
"1
|
443 |
-
"2
|
444 |
-
"3
|
445 |
-
"4
|
446 |
-
"...
|
447 |
-
"
|
448 |
-
"
|
449 |
-
"
|
450 |
-
"
|
451 |
-
"
|
452 |
"\n",
|
453 |
-
" % Sold Above List (Smoothed) \n",
|
454 |
-
"0
|
455 |
-
"1
|
456 |
-
"2
|
457 |
-
"3
|
458 |
-
"4
|
459 |
-
"...
|
460 |
-
"
|
461 |
-
"
|
462 |
-
"
|
463 |
-
"
|
464 |
-
"
|
465 |
"\n",
|
466 |
-
"[
|
467 |
]
|
468 |
},
|
469 |
"execution_count": 3,
|
@@ -529,7 +504,7 @@
|
|
529 |
},
|
530 |
{
|
531 |
"cell_type": "code",
|
532 |
-
"execution_count":
|
533 |
"metadata": {},
|
534 |
"outputs": [
|
535 |
{
|
@@ -560,17 +535,16 @@
|
|
560 |
" <th>State</th>\n",
|
561 |
" <th>Home Type</th>\n",
|
562 |
" <th>Date</th>\n",
|
563 |
-
" <th>Mean Sale to List Ratio (Smoothed)</th>\n",
|
564 |
" <th>Median Sale to List Ratio</th>\n",
|
565 |
" <th>Median Sale Price</th>\n",
|
566 |
-
" <th>% Sold Below List (Smoothed)</th>\n",
|
567 |
" <th>Median Sale Price (Smoothed) (Seasonally Adjusted)</th>\n",
|
568 |
-
" <th>% Sold Below List</th>\n",
|
569 |
" <th>Median Sale Price (Smoothed)</th>\n",
|
|
|
570 |
" <th>Median Sale to List Ratio (Smoothed)</th>\n",
|
571 |
" <th>% Sold Above List</th>\n",
|
572 |
-
" <th>
|
573 |
" <th>Mean Sale to List Ratio</th>\n",
|
|
|
574 |
" <th>% Sold Above List (Smoothed)</th>\n",
|
575 |
" </tr>\n",
|
576 |
" </thead>\n",
|
@@ -585,7 +559,6 @@
|
|
585 |
" <td>SFR</td>\n",
|
586 |
" <td>2008-02-02</td>\n",
|
587 |
" <td>NaN</td>\n",
|
588 |
-
" <td>NaN</td>\n",
|
589 |
" <td>172000.0</td>\n",
|
590 |
" <td>NaN</td>\n",
|
591 |
" <td>NaN</td>\n",
|
@@ -607,7 +580,6 @@
|
|
607 |
" <td>SFR</td>\n",
|
608 |
" <td>2008-02-09</td>\n",
|
609 |
" <td>NaN</td>\n",
|
610 |
-
" <td>NaN</td>\n",
|
611 |
" <td>165400.0</td>\n",
|
612 |
" <td>NaN</td>\n",
|
613 |
" <td>NaN</td>\n",
|
@@ -629,7 +601,6 @@
|
|
629 |
" <td>SFR</td>\n",
|
630 |
" <td>2008-02-16</td>\n",
|
631 |
" <td>NaN</td>\n",
|
632 |
-
" <td>NaN</td>\n",
|
633 |
" <td>168000.0</td>\n",
|
634 |
" <td>NaN</td>\n",
|
635 |
" <td>NaN</td>\n",
|
@@ -651,12 +622,11 @@
|
|
651 |
" <td>SFR</td>\n",
|
652 |
" <td>2008-02-23</td>\n",
|
653 |
" <td>NaN</td>\n",
|
|
|
654 |
" <td>NaN</td>\n",
|
655 |
-
" <td>
|
656 |
-
" <td>NaN</td>\n",
|
657 |
" <td>NaN</td>\n",
|
658 |
" <td>NaN</td>\n",
|
659 |
-
" <td>167600.0</td>\n",
|
660 |
" <td>NaN</td>\n",
|
661 |
" <td>NaN</td>\n",
|
662 |
" <td>NaN</td>\n",
|
@@ -671,12 +641,11 @@
|
|
671 |
" <td>country</td>\n",
|
672 |
" <td>NaN</td>\n",
|
673 |
" <td>SFR</td>\n",
|
674 |
-
" <td>2008-
|
675 |
-
" <td>NaN</td>\n",
|
676 |
-
" <td>NaN</td>\n",
|
677 |
-
" <td>NaN</td>\n",
|
678 |
" <td>NaN</td>\n",
|
|
|
679 |
" <td>NaN</td>\n",
|
|
|
680 |
" <td>NaN</td>\n",
|
681 |
" <td>NaN</td>\n",
|
682 |
" <td>NaN</td>\n",
|
@@ -705,232 +674,213 @@
|
|
705 |
" <td>...</td>\n",
|
706 |
" <td>...</td>\n",
|
707 |
" <td>...</td>\n",
|
708 |
-
" <td>...</td>\n",
|
709 |
" </tr>\n",
|
710 |
" <tr>\n",
|
711 |
-
" <th>
|
712 |
-
" <td>
|
713 |
-
" <td>
|
714 |
-
" <td>
|
715 |
" <td>msa</td>\n",
|
716 |
-
" <td>
|
717 |
" <td>all homes</td>\n",
|
718 |
-
" <td>2023-
|
719 |
-
" <td>0.
|
720 |
-
" <td>
|
721 |
-
" <td>
|
722 |
-
" <td>0
|
723 |
-
" <td>
|
724 |
-
" <td>0.
|
725 |
-
" <td>
|
726 |
-
" <td>0.
|
727 |
-
" <td>0.
|
728 |
-
" <td>
|
729 |
-
" <td>0.
|
730 |
-
" <td>0.312332</td>\n",
|
731 |
" </tr>\n",
|
732 |
" <tr>\n",
|
733 |
-
" <th>
|
734 |
-
" <td>
|
735 |
-
" <td>
|
736 |
-
" <td>
|
737 |
" <td>msa</td>\n",
|
738 |
-
" <td>
|
739 |
" <td>all homes</td>\n",
|
740 |
-
" <td>2023-
|
741 |
-
" <td>0.
|
742 |
-
" <td>
|
743 |
-
" <td>
|
744 |
-
" <td>0
|
745 |
-
" <td>
|
746 |
-
" <td>0.
|
747 |
-
" <td>
|
748 |
-
" <td>0.
|
749 |
-
" <td>0.
|
750 |
-
" <td>
|
751 |
-
" <td>0.
|
752 |
-
" <td>0.294778</td>\n",
|
753 |
" </tr>\n",
|
754 |
" <tr>\n",
|
755 |
-
" <th>
|
756 |
-
" <td>
|
757 |
-
" <td>
|
758 |
-
" <td>
|
759 |
" <td>msa</td>\n",
|
760 |
-
" <td>
|
761 |
" <td>all homes</td>\n",
|
762 |
-
" <td>2023-
|
763 |
-
" <td>0.
|
764 |
-
" <td>
|
765 |
-
" <td>
|
766 |
-
" <td>0
|
767 |
-
" <td>
|
768 |
-
" <td>0.
|
769 |
-
" <td>
|
770 |
-
" <td>0.
|
771 |
-
" <td>0.
|
772 |
-
" <td>
|
773 |
-
" <td>0.
|
774 |
-
" <td>0.285128</td>\n",
|
775 |
" </tr>\n",
|
776 |
" <tr>\n",
|
777 |
-
" <th>
|
778 |
-
" <td>
|
779 |
-
" <td>
|
780 |
-
" <td>
|
781 |
" <td>msa</td>\n",
|
782 |
-
" <td>
|
783 |
" <td>all homes</td>\n",
|
784 |
-
" <td>2023-
|
785 |
-
" <td>0.
|
786 |
-
" <td>
|
787 |
-
" <td>
|
788 |
-
" <td>0
|
789 |
-
" <td>
|
790 |
-
" <td>0.
|
791 |
-
" <td>
|
792 |
-
" <td>0.
|
793 |
-
" <td>0.
|
794 |
-
" <td>
|
795 |
-
" <td>0.
|
796 |
-
" <td>0.272350</td>\n",
|
797 |
" </tr>\n",
|
798 |
" <tr>\n",
|
799 |
-
" <th>
|
800 |
-
" <td>
|
801 |
-
" <td>
|
802 |
-
" <td>
|
803 |
" <td>msa</td>\n",
|
804 |
-
" <td>
|
805 |
" <td>all homes</td>\n",
|
806 |
-
" <td>2023-
|
807 |
-
" <td>0.
|
808 |
-
" <td>
|
809 |
-
" <td>
|
810 |
-
" <td>0
|
811 |
-
" <td>
|
812 |
-
" <td>0.
|
813 |
-
" <td>
|
814 |
-
" <td>0.
|
815 |
-
" <td>0.
|
816 |
-
" <td>
|
817 |
-
" <td>0.
|
818 |
-
" <td>0.280538</td>\n",
|
819 |
" </tr>\n",
|
820 |
" </tbody>\n",
|
821 |
"</table>\n",
|
822 |
-
"<p>
|
823 |
"</div>"
|
824 |
],
|
825 |
"text/plain": [
|
826 |
-
" Region ID Size Rank
|
827 |
-
"0 102001 0
|
828 |
-
"1 102001 0
|
829 |
-
"2 102001 0
|
830 |
-
"3 102001 0
|
831 |
-
"4 102001 0
|
832 |
-
"... ... ...
|
833 |
-
"
|
834 |
-
"
|
835 |
-
"
|
836 |
-
"
|
837 |
-
"
|
838 |
-
"\n",
|
839 |
-
" Date Mean Sale to List Ratio (Smoothed) \\\n",
|
840 |
-
"0 2008-02-02 NaN \n",
|
841 |
-
"1 2008-02-09 NaN \n",
|
842 |
-
"2 2008-02-16 NaN \n",
|
843 |
-
"3 2008-02-23 NaN \n",
|
844 |
-
"4 2008-02-29 NaN \n",
|
845 |
-
"... ... ... \n",
|
846 |
-
"504603 2023-07-31 0.976219 \n",
|
847 |
-
"504604 2023-08-31 0.971893 \n",
|
848 |
-
"504605 2023-09-30 0.968028 \n",
|
849 |
-
"504606 2023-10-31 0.962485 \n",
|
850 |
-
"504607 2023-11-30 0.967126 \n",
|
851 |
"\n",
|
852 |
-
" Median Sale to List Ratio Median Sale Price \\\n",
|
853 |
-
"0
|
854 |
-
"1
|
855 |
-
"2
|
856 |
-
"3
|
857 |
-
"4
|
858 |
-
"...
|
859 |
-
"
|
860 |
-
"
|
861 |
-
"
|
862 |
-
"
|
863 |
-
"
|
864 |
"\n",
|
865 |
-
"
|
866 |
-
"0
|
867 |
-
"1
|
868 |
-
"2
|
869 |
-
"3
|
870 |
-
"4
|
871 |
-
"...
|
872 |
-
"
|
873 |
-
"
|
874 |
-
"
|
875 |
-
"
|
876 |
-
"
|
877 |
"\n",
|
878 |
-
" Median Sale Price (Smoothed)
|
879 |
-
"0
|
880 |
-
"1
|
881 |
-
"2
|
882 |
-
"3
|
883 |
-
"4
|
884 |
-
"...
|
885 |
-
"
|
886 |
-
"
|
887 |
-
"
|
888 |
-
"
|
889 |
-
"
|
890 |
"\n",
|
891 |
-
" Median Sale
|
892 |
-
"0
|
893 |
-
"1
|
894 |
-
"2
|
895 |
-
"3
|
896 |
-
"4
|
897 |
-
"...
|
898 |
-
"
|
899 |
-
"
|
900 |
-
"
|
901 |
-
"
|
902 |
-
"
|
903 |
"\n",
|
904 |
-
"
|
905 |
-
"0
|
906 |
-
"1
|
907 |
-
"2
|
908 |
-
"3
|
909 |
-
"4
|
910 |
-
"...
|
911 |
-
"
|
912 |
-
"
|
913 |
-
"
|
914 |
-
"
|
915 |
-
"
|
916 |
"\n",
|
917 |
-
" % Sold Above List (Smoothed) \n",
|
918 |
-
"0
|
919 |
-
"1
|
920 |
-
"2
|
921 |
-
"3
|
922 |
-
"4
|
923 |
-
"...
|
924 |
-
"
|
925 |
-
"
|
926 |
-
"
|
927 |
-
"
|
928 |
-
"
|
929 |
"\n",
|
930 |
-
"[
|
931 |
]
|
932 |
},
|
933 |
-
"execution_count":
|
934 |
"metadata": {},
|
935 |
"output_type": "execute_result"
|
936 |
}
|
@@ -947,12 +897,13 @@
|
|
947 |
" }\n",
|
948 |
")\n",
|
949 |
"\n",
|
|
|
950 |
"final_df.sort_values(by=[\"Region ID\", \"Home Type\", \"Date\"])"
|
951 |
]
|
952 |
},
|
953 |
{
|
954 |
"cell_type": "code",
|
955 |
-
"execution_count":
|
956 |
"metadata": {},
|
957 |
"outputs": [],
|
958 |
"source": [
|
|
|
96 |
" <th>StateName</th>\n",
|
97 |
" <th>Home Type</th>\n",
|
98 |
" <th>Date</th>\n",
|
|
|
99 |
" <th>Median Sale to List Ratio</th>\n",
|
100 |
" <th>Median Sale Price</th>\n",
|
|
|
101 |
" <th>Median Sale Price (Smoothed) (Seasonally Adjusted)</th>\n",
|
|
|
102 |
" <th>Median Sale Price (Smoothed)</th>\n",
|
103 |
+
" <th>% Sold Below List (Smoothed)</th>\n",
|
104 |
" <th>Median Sale to List Ratio (Smoothed)</th>\n",
|
105 |
" <th>% Sold Above List</th>\n",
|
106 |
+
" <th>Mean Sale to List Ratio (Smoothed)</th>\n",
|
107 |
" <th>Mean Sale to List Ratio</th>\n",
|
108 |
+
" <th>% Sold Below List</th>\n",
|
109 |
" <th>% Sold Above List (Smoothed)</th>\n",
|
110 |
" </tr>\n",
|
111 |
" </thead>\n",
|
|
|
120 |
" <td>SFR</td>\n",
|
121 |
" <td>2008-02-02</td>\n",
|
122 |
" <td>NaN</td>\n",
|
|
|
123 |
" <td>172000.0</td>\n",
|
124 |
" <td>NaN</td>\n",
|
125 |
" <td>NaN</td>\n",
|
|
|
141 |
" <td>SFR</td>\n",
|
142 |
" <td>2008-02-09</td>\n",
|
143 |
" <td>NaN</td>\n",
|
|
|
144 |
" <td>165400.0</td>\n",
|
145 |
" <td>NaN</td>\n",
|
146 |
" <td>NaN</td>\n",
|
|
|
162 |
" <td>SFR</td>\n",
|
163 |
" <td>2008-02-16</td>\n",
|
164 |
" <td>NaN</td>\n",
|
|
|
165 |
" <td>168000.0</td>\n",
|
166 |
" <td>NaN</td>\n",
|
167 |
" <td>NaN</td>\n",
|
|
|
183 |
" <td>SFR</td>\n",
|
184 |
" <td>2008-02-23</td>\n",
|
185 |
" <td>NaN</td>\n",
|
186 |
+
" <td>167600.0</td>\n",
|
187 |
" <td>NaN</td>\n",
|
188 |
+
" <td>167600.0</td>\n",
|
|
|
189 |
" <td>NaN</td>\n",
|
190 |
" <td>NaN</td>\n",
|
|
|
191 |
" <td>NaN</td>\n",
|
192 |
" <td>NaN</td>\n",
|
193 |
" <td>NaN</td>\n",
|
|
|
202 |
" <td>country</td>\n",
|
203 |
" <td>NaN</td>\n",
|
204 |
" <td>SFR</td>\n",
|
205 |
+
" <td>2008-03-01</td>\n",
|
|
|
|
|
|
|
206 |
" <td>NaN</td>\n",
|
207 |
+
" <td>168100.0</td>\n",
|
208 |
" <td>NaN</td>\n",
|
209 |
+
" <td>168100.0</td>\n",
|
210 |
" <td>NaN</td>\n",
|
211 |
" <td>NaN</td>\n",
|
212 |
" <td>NaN</td>\n",
|
|
|
235 |
" <td>...</td>\n",
|
236 |
" <td>...</td>\n",
|
237 |
" <td>...</td>\n",
|
|
|
238 |
" </tr>\n",
|
239 |
" <tr>\n",
|
240 |
+
" <th>255019</th>\n",
|
241 |
+
" <td>845160</td>\n",
|
242 |
+
" <td>198</td>\n",
|
243 |
+
" <td>Prescott Valley, AZ</td>\n",
|
244 |
" <td>msa</td>\n",
|
245 |
+
" <td>AZ</td>\n",
|
246 |
" <td>all homes</td>\n",
|
247 |
+
" <td>2023-11-11</td>\n",
|
248 |
+
" <td>0.985132</td>\n",
|
249 |
+
" <td>515000.0</td>\n",
|
250 |
+
" <td>480020.0</td>\n",
|
251 |
+
" <td>480020.0</td>\n",
|
252 |
+
" <td>0.651221</td>\n",
|
253 |
+
" <td>0.982460</td>\n",
|
254 |
+
" <td>0.080000</td>\n",
|
255 |
+
" <td>0.978546</td>\n",
|
256 |
+
" <td>0.983288</td>\n",
|
257 |
+
" <td>0.680000</td>\n",
|
258 |
+
" <td>0.119711</td>\n",
|
|
|
259 |
" </tr>\n",
|
260 |
" <tr>\n",
|
261 |
+
" <th>255020</th>\n",
|
262 |
+
" <td>845160</td>\n",
|
263 |
+
" <td>198</td>\n",
|
264 |
+
" <td>Prescott Valley, AZ</td>\n",
|
265 |
" <td>msa</td>\n",
|
266 |
+
" <td>AZ</td>\n",
|
267 |
" <td>all homes</td>\n",
|
268 |
+
" <td>2023-11-18</td>\n",
|
269 |
+
" <td>0.972559</td>\n",
|
270 |
+
" <td>510000.0</td>\n",
|
271 |
+
" <td>476901.0</td>\n",
|
272 |
+
" <td>476901.0</td>\n",
|
273 |
+
" <td>0.659583</td>\n",
|
274 |
+
" <td>0.980362</td>\n",
|
275 |
+
" <td>0.142857</td>\n",
|
276 |
+
" <td>0.972912</td>\n",
|
277 |
+
" <td>0.958341</td>\n",
|
278 |
+
" <td>0.625000</td>\n",
|
279 |
+
" <td>0.120214</td>\n",
|
|
|
280 |
" </tr>\n",
|
281 |
" <tr>\n",
|
282 |
+
" <th>255021</th>\n",
|
283 |
+
" <td>845160</td>\n",
|
284 |
+
" <td>198</td>\n",
|
285 |
+
" <td>Prescott Valley, AZ</td>\n",
|
286 |
" <td>msa</td>\n",
|
287 |
+
" <td>AZ</td>\n",
|
288 |
" <td>all homes</td>\n",
|
289 |
+
" <td>2023-11-25</td>\n",
|
290 |
+
" <td>0.979644</td>\n",
|
291 |
+
" <td>484500.0</td>\n",
|
292 |
+
" <td>496540.0</td>\n",
|
293 |
+
" <td>496540.0</td>\n",
|
294 |
+
" <td>0.669387</td>\n",
|
295 |
+
" <td>0.979179</td>\n",
|
296 |
+
" <td>0.088235</td>\n",
|
297 |
+
" <td>0.971177</td>\n",
|
298 |
+
" <td>0.973797</td>\n",
|
299 |
+
" <td>0.705882</td>\n",
|
300 |
+
" <td>0.107185</td>\n",
|
|
|
301 |
" </tr>\n",
|
302 |
" <tr>\n",
|
303 |
+
" <th>255022</th>\n",
|
304 |
+
" <td>845160</td>\n",
|
305 |
+
" <td>198</td>\n",
|
306 |
+
" <td>Prescott Valley, AZ</td>\n",
|
307 |
" <td>msa</td>\n",
|
308 |
+
" <td>AZ</td>\n",
|
309 |
" <td>all homes</td>\n",
|
310 |
+
" <td>2023-12-02</td>\n",
|
311 |
+
" <td>0.978261</td>\n",
|
312 |
+
" <td>538000.0</td>\n",
|
313 |
+
" <td>510491.0</td>\n",
|
314 |
+
" <td>510491.0</td>\n",
|
315 |
+
" <td>0.678777</td>\n",
|
316 |
+
" <td>0.978899</td>\n",
|
317 |
+
" <td>0.126761</td>\n",
|
318 |
+
" <td>0.970576</td>\n",
|
319 |
+
" <td>0.966876</td>\n",
|
320 |
+
" <td>0.704225</td>\n",
|
321 |
+
" <td>0.109463</td>\n",
|
|
|
322 |
" </tr>\n",
|
323 |
" <tr>\n",
|
324 |
+
" <th>255023</th>\n",
|
325 |
+
" <td>845160</td>\n",
|
326 |
+
" <td>198</td>\n",
|
327 |
+
" <td>Prescott Valley, AZ</td>\n",
|
328 |
" <td>msa</td>\n",
|
329 |
+
" <td>AZ</td>\n",
|
330 |
" <td>all homes</td>\n",
|
331 |
+
" <td>2023-12-09</td>\n",
|
332 |
+
" <td>0.981498</td>\n",
|
333 |
+
" <td>485000.0</td>\n",
|
334 |
+
" <td>503423.0</td>\n",
|
335 |
+
" <td>503423.0</td>\n",
|
336 |
+
" <td>0.658777</td>\n",
|
337 |
+
" <td>0.977990</td>\n",
|
338 |
+
" <td>0.100000</td>\n",
|
339 |
+
" <td>0.970073</td>\n",
|
340 |
+
" <td>0.981278</td>\n",
|
341 |
+
" <td>0.600000</td>\n",
|
342 |
+
" <td>0.114463</td>\n",
|
|
|
343 |
" </tr>\n",
|
344 |
" </tbody>\n",
|
345 |
"</table>\n",
|
346 |
+
"<p>255024 rows × 18 columns</p>\n",
|
347 |
"</div>"
|
348 |
],
|
349 |
"text/plain": [
|
350 |
+
" RegionID SizeRank RegionName RegionType StateName \\\n",
|
351 |
+
"0 102001 0 United States country NaN \n",
|
352 |
+
"1 102001 0 United States country NaN \n",
|
353 |
+
"2 102001 0 United States country NaN \n",
|
354 |
+
"3 102001 0 United States country NaN \n",
|
355 |
+
"4 102001 0 United States country NaN \n",
|
356 |
+
"... ... ... ... ... ... \n",
|
357 |
+
"255019 845160 198 Prescott Valley, AZ msa AZ \n",
|
358 |
+
"255020 845160 198 Prescott Valley, AZ msa AZ \n",
|
359 |
+
"255021 845160 198 Prescott Valley, AZ msa AZ \n",
|
360 |
+
"255022 845160 198 Prescott Valley, AZ msa AZ \n",
|
361 |
+
"255023 845160 198 Prescott Valley, AZ msa AZ \n",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
362 |
"\n",
|
363 |
+
" Home Type Date Median Sale to List Ratio Median Sale Price \\\n",
|
364 |
+
"0 SFR 2008-02-02 NaN 172000.0 \n",
|
365 |
+
"1 SFR 2008-02-09 NaN 165400.0 \n",
|
366 |
+
"2 SFR 2008-02-16 NaN 168000.0 \n",
|
367 |
+
"3 SFR 2008-02-23 NaN 167600.0 \n",
|
368 |
+
"4 SFR 2008-03-01 NaN 168100.0 \n",
|
369 |
+
"... ... ... ... ... \n",
|
370 |
+
"255019 all homes 2023-11-11 0.985132 515000.0 \n",
|
371 |
+
"255020 all homes 2023-11-18 0.972559 510000.0 \n",
|
372 |
+
"255021 all homes 2023-11-25 0.979644 484500.0 \n",
|
373 |
+
"255022 all homes 2023-12-02 0.978261 538000.0 \n",
|
374 |
+
"255023 all homes 2023-12-09 0.981498 485000.0 \n",
|
375 |
"\n",
|
376 |
+
" Median Sale Price (Smoothed) (Seasonally Adjusted) \\\n",
|
377 |
+
"0 NaN \n",
|
378 |
+
"1 NaN \n",
|
379 |
+
"2 NaN \n",
|
380 |
+
"3 NaN \n",
|
381 |
+
"4 NaN \n",
|
382 |
+
"... ... \n",
|
383 |
+
"255019 480020.0 \n",
|
384 |
+
"255020 476901.0 \n",
|
385 |
+
"255021 496540.0 \n",
|
386 |
+
"255022 510491.0 \n",
|
387 |
+
"255023 503423.0 \n",
|
388 |
"\n",
|
389 |
+
" Median Sale Price (Smoothed) % Sold Below List (Smoothed) \\\n",
|
390 |
+
"0 NaN NaN \n",
|
391 |
+
"1 NaN NaN \n",
|
392 |
+
"2 NaN NaN \n",
|
393 |
+
"3 167600.0 NaN \n",
|
394 |
+
"4 168100.0 NaN \n",
|
395 |
+
"... ... ... \n",
|
396 |
+
"255019 480020.0 0.651221 \n",
|
397 |
+
"255020 476901.0 0.659583 \n",
|
398 |
+
"255021 496540.0 0.669387 \n",
|
399 |
+
"255022 510491.0 0.678777 \n",
|
400 |
+
"255023 503423.0 0.658777 \n",
|
401 |
"\n",
|
402 |
+
" Median Sale to List Ratio (Smoothed) % Sold Above List \\\n",
|
403 |
+
"0 NaN NaN \n",
|
404 |
+
"1 NaN NaN \n",
|
405 |
+
"2 NaN NaN \n",
|
406 |
+
"3 NaN NaN \n",
|
407 |
+
"4 NaN NaN \n",
|
408 |
+
"... ... ... \n",
|
409 |
+
"255019 0.982460 0.080000 \n",
|
410 |
+
"255020 0.980362 0.142857 \n",
|
411 |
+
"255021 0.979179 0.088235 \n",
|
412 |
+
"255022 0.978899 0.126761 \n",
|
413 |
+
"255023 0.977990 0.100000 \n",
|
414 |
"\n",
|
415 |
+
" Mean Sale to List Ratio (Smoothed) Mean Sale to List Ratio \\\n",
|
416 |
+
"0 NaN NaN \n",
|
417 |
+
"1 NaN NaN \n",
|
418 |
+
"2 NaN NaN \n",
|
419 |
+
"3 NaN NaN \n",
|
420 |
+
"4 NaN NaN \n",
|
421 |
+
"... ... ... \n",
|
422 |
+
"255019 0.978546 0.983288 \n",
|
423 |
+
"255020 0.972912 0.958341 \n",
|
424 |
+
"255021 0.971177 0.973797 \n",
|
425 |
+
"255022 0.970576 0.966876 \n",
|
426 |
+
"255023 0.970073 0.981278 \n",
|
427 |
"\n",
|
428 |
+
" % Sold Below List % Sold Above List (Smoothed) \n",
|
429 |
+
"0 NaN NaN \n",
|
430 |
+
"1 NaN NaN \n",
|
431 |
+
"2 NaN NaN \n",
|
432 |
+
"3 NaN NaN \n",
|
433 |
+
"4 NaN NaN \n",
|
434 |
+
"... ... ... \n",
|
435 |
+
"255019 0.680000 0.119711 \n",
|
436 |
+
"255020 0.625000 0.120214 \n",
|
437 |
+
"255021 0.705882 0.107185 \n",
|
438 |
+
"255022 0.704225 0.109463 \n",
|
439 |
+
"255023 0.600000 0.114463 \n",
|
440 |
"\n",
|
441 |
+
"[255024 rows x 18 columns]"
|
442 |
]
|
443 |
},
|
444 |
"execution_count": 3,
|
|
|
504 |
},
|
505 |
{
|
506 |
"cell_type": "code",
|
507 |
+
"execution_count": 6,
|
508 |
"metadata": {},
|
509 |
"outputs": [
|
510 |
{
|
|
|
535 |
" <th>State</th>\n",
|
536 |
" <th>Home Type</th>\n",
|
537 |
" <th>Date</th>\n",
|
|
|
538 |
" <th>Median Sale to List Ratio</th>\n",
|
539 |
" <th>Median Sale Price</th>\n",
|
|
|
540 |
" <th>Median Sale Price (Smoothed) (Seasonally Adjusted)</th>\n",
|
|
|
541 |
" <th>Median Sale Price (Smoothed)</th>\n",
|
542 |
+
" <th>% Sold Below List (Smoothed)</th>\n",
|
543 |
" <th>Median Sale to List Ratio (Smoothed)</th>\n",
|
544 |
" <th>% Sold Above List</th>\n",
|
545 |
+
" <th>Mean Sale to List Ratio (Smoothed)</th>\n",
|
546 |
" <th>Mean Sale to List Ratio</th>\n",
|
547 |
+
" <th>% Sold Below List</th>\n",
|
548 |
" <th>% Sold Above List (Smoothed)</th>\n",
|
549 |
" </tr>\n",
|
550 |
" </thead>\n",
|
|
|
559 |
" <td>SFR</td>\n",
|
560 |
" <td>2008-02-02</td>\n",
|
561 |
" <td>NaN</td>\n",
|
|
|
562 |
" <td>172000.0</td>\n",
|
563 |
" <td>NaN</td>\n",
|
564 |
" <td>NaN</td>\n",
|
|
|
580 |
" <td>SFR</td>\n",
|
581 |
" <td>2008-02-09</td>\n",
|
582 |
" <td>NaN</td>\n",
|
|
|
583 |
" <td>165400.0</td>\n",
|
584 |
" <td>NaN</td>\n",
|
585 |
" <td>NaN</td>\n",
|
|
|
601 |
" <td>SFR</td>\n",
|
602 |
" <td>2008-02-16</td>\n",
|
603 |
" <td>NaN</td>\n",
|
|
|
604 |
" <td>168000.0</td>\n",
|
605 |
" <td>NaN</td>\n",
|
606 |
" <td>NaN</td>\n",
|
|
|
622 |
" <td>SFR</td>\n",
|
623 |
" <td>2008-02-23</td>\n",
|
624 |
" <td>NaN</td>\n",
|
625 |
+
" <td>167600.0</td>\n",
|
626 |
" <td>NaN</td>\n",
|
627 |
+
" <td>167600.0</td>\n",
|
|
|
628 |
" <td>NaN</td>\n",
|
629 |
" <td>NaN</td>\n",
|
|
|
630 |
" <td>NaN</td>\n",
|
631 |
" <td>NaN</td>\n",
|
632 |
" <td>NaN</td>\n",
|
|
|
641 |
" <td>country</td>\n",
|
642 |
" <td>NaN</td>\n",
|
643 |
" <td>SFR</td>\n",
|
644 |
+
" <td>2008-03-01</td>\n",
|
|
|
|
|
|
|
645 |
" <td>NaN</td>\n",
|
646 |
+
" <td>168100.0</td>\n",
|
647 |
" <td>NaN</td>\n",
|
648 |
+
" <td>168100.0</td>\n",
|
649 |
" <td>NaN</td>\n",
|
650 |
" <td>NaN</td>\n",
|
651 |
" <td>NaN</td>\n",
|
|
|
674 |
" <td>...</td>\n",
|
675 |
" <td>...</td>\n",
|
676 |
" <td>...</td>\n",
|
|
|
677 |
" </tr>\n",
|
678 |
" <tr>\n",
|
679 |
+
" <th>255019</th>\n",
|
680 |
+
" <td>845160</td>\n",
|
681 |
+
" <td>198</td>\n",
|
682 |
+
" <td>Prescott Valley, AZ</td>\n",
|
683 |
" <td>msa</td>\n",
|
684 |
+
" <td>AZ</td>\n",
|
685 |
" <td>all homes</td>\n",
|
686 |
+
" <td>2023-11-11</td>\n",
|
687 |
+
" <td>0.985132</td>\n",
|
688 |
+
" <td>515000.0</td>\n",
|
689 |
+
" <td>480020.0</td>\n",
|
690 |
+
" <td>480020.0</td>\n",
|
691 |
+
" <td>0.651221</td>\n",
|
692 |
+
" <td>0.982460</td>\n",
|
693 |
+
" <td>0.080000</td>\n",
|
694 |
+
" <td>0.978546</td>\n",
|
695 |
+
" <td>0.983288</td>\n",
|
696 |
+
" <td>0.680000</td>\n",
|
697 |
+
" <td>0.119711</td>\n",
|
|
|
698 |
" </tr>\n",
|
699 |
" <tr>\n",
|
700 |
+
" <th>255020</th>\n",
|
701 |
+
" <td>845160</td>\n",
|
702 |
+
" <td>198</td>\n",
|
703 |
+
" <td>Prescott Valley, AZ</td>\n",
|
704 |
" <td>msa</td>\n",
|
705 |
+
" <td>AZ</td>\n",
|
706 |
" <td>all homes</td>\n",
|
707 |
+
" <td>2023-11-18</td>\n",
|
708 |
+
" <td>0.972559</td>\n",
|
709 |
+
" <td>510000.0</td>\n",
|
710 |
+
" <td>476901.0</td>\n",
|
711 |
+
" <td>476901.0</td>\n",
|
712 |
+
" <td>0.659583</td>\n",
|
713 |
+
" <td>0.980362</td>\n",
|
714 |
+
" <td>0.142857</td>\n",
|
715 |
+
" <td>0.972912</td>\n",
|
716 |
+
" <td>0.958341</td>\n",
|
717 |
+
" <td>0.625000</td>\n",
|
718 |
+
" <td>0.120214</td>\n",
|
|
|
719 |
" </tr>\n",
|
720 |
" <tr>\n",
|
721 |
+
" <th>255021</th>\n",
|
722 |
+
" <td>845160</td>\n",
|
723 |
+
" <td>198</td>\n",
|
724 |
+
" <td>Prescott Valley, AZ</td>\n",
|
725 |
" <td>msa</td>\n",
|
726 |
+
" <td>AZ</td>\n",
|
727 |
" <td>all homes</td>\n",
|
728 |
+
" <td>2023-11-25</td>\n",
|
729 |
+
" <td>0.979644</td>\n",
|
730 |
+
" <td>484500.0</td>\n",
|
731 |
+
" <td>496540.0</td>\n",
|
732 |
+
" <td>496540.0</td>\n",
|
733 |
+
" <td>0.669387</td>\n",
|
734 |
+
" <td>0.979179</td>\n",
|
735 |
+
" <td>0.088235</td>\n",
|
736 |
+
" <td>0.971177</td>\n",
|
737 |
+
" <td>0.973797</td>\n",
|
738 |
+
" <td>0.705882</td>\n",
|
739 |
+
" <td>0.107185</td>\n",
|
|
|
740 |
" </tr>\n",
|
741 |
" <tr>\n",
|
742 |
+
" <th>255022</th>\n",
|
743 |
+
" <td>845160</td>\n",
|
744 |
+
" <td>198</td>\n",
|
745 |
+
" <td>Prescott Valley, AZ</td>\n",
|
746 |
" <td>msa</td>\n",
|
747 |
+
" <td>AZ</td>\n",
|
748 |
" <td>all homes</td>\n",
|
749 |
+
" <td>2023-12-02</td>\n",
|
750 |
+
" <td>0.978261</td>\n",
|
751 |
+
" <td>538000.0</td>\n",
|
752 |
+
" <td>510491.0</td>\n",
|
753 |
+
" <td>510491.0</td>\n",
|
754 |
+
" <td>0.678777</td>\n",
|
755 |
+
" <td>0.978899</td>\n",
|
756 |
+
" <td>0.126761</td>\n",
|
757 |
+
" <td>0.970576</td>\n",
|
758 |
+
" <td>0.966876</td>\n",
|
759 |
+
" <td>0.704225</td>\n",
|
760 |
+
" <td>0.109463</td>\n",
|
|
|
761 |
" </tr>\n",
|
762 |
" <tr>\n",
|
763 |
+
" <th>255023</th>\n",
|
764 |
+
" <td>845160</td>\n",
|
765 |
+
" <td>198</td>\n",
|
766 |
+
" <td>Prescott Valley, AZ</td>\n",
|
767 |
" <td>msa</td>\n",
|
768 |
+
" <td>AZ</td>\n",
|
769 |
" <td>all homes</td>\n",
|
770 |
+
" <td>2023-12-09</td>\n",
|
771 |
+
" <td>0.981498</td>\n",
|
772 |
+
" <td>485000.0</td>\n",
|
773 |
+
" <td>503423.0</td>\n",
|
774 |
+
" <td>503423.0</td>\n",
|
775 |
+
" <td>0.658777</td>\n",
|
776 |
+
" <td>0.977990</td>\n",
|
777 |
+
" <td>0.100000</td>\n",
|
778 |
+
" <td>0.970073</td>\n",
|
779 |
+
" <td>0.981278</td>\n",
|
780 |
+
" <td>0.600000</td>\n",
|
781 |
+
" <td>0.114463</td>\n",
|
|
|
782 |
" </tr>\n",
|
783 |
" </tbody>\n",
|
784 |
"</table>\n",
|
785 |
+
"<p>255024 rows × 18 columns</p>\n",
|
786 |
"</div>"
|
787 |
],
|
788 |
"text/plain": [
|
789 |
+
" Region ID Size Rank Region Region Type State \\\n",
|
790 |
+
"0 102001 0 United States country NaN \n",
|
791 |
+
"1 102001 0 United States country NaN \n",
|
792 |
+
"2 102001 0 United States country NaN \n",
|
793 |
+
"3 102001 0 United States country NaN \n",
|
794 |
+
"4 102001 0 United States country NaN \n",
|
795 |
+
"... ... ... ... ... ... \n",
|
796 |
+
"255019 845160 198 Prescott Valley, AZ msa AZ \n",
|
797 |
+
"255020 845160 198 Prescott Valley, AZ msa AZ \n",
|
798 |
+
"255021 845160 198 Prescott Valley, AZ msa AZ \n",
|
799 |
+
"255022 845160 198 Prescott Valley, AZ msa AZ \n",
|
800 |
+
"255023 845160 198 Prescott Valley, AZ msa AZ \n",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
801 |
"\n",
|
802 |
+
" Home Type Date Median Sale to List Ratio Median Sale Price \\\n",
|
803 |
+
"0 SFR 2008-02-02 NaN 172000.0 \n",
|
804 |
+
"1 SFR 2008-02-09 NaN 165400.0 \n",
|
805 |
+
"2 SFR 2008-02-16 NaN 168000.0 \n",
|
806 |
+
"3 SFR 2008-02-23 NaN 167600.0 \n",
|
807 |
+
"4 SFR 2008-03-01 NaN 168100.0 \n",
|
808 |
+
"... ... ... ... ... \n",
|
809 |
+
"255019 all homes 2023-11-11 0.985132 515000.0 \n",
|
810 |
+
"255020 all homes 2023-11-18 0.972559 510000.0 \n",
|
811 |
+
"255021 all homes 2023-11-25 0.979644 484500.0 \n",
|
812 |
+
"255022 all homes 2023-12-02 0.978261 538000.0 \n",
|
813 |
+
"255023 all homes 2023-12-09 0.981498 485000.0 \n",
|
814 |
"\n",
|
815 |
+
" Median Sale Price (Smoothed) (Seasonally Adjusted) \\\n",
|
816 |
+
"0 NaN \n",
|
817 |
+
"1 NaN \n",
|
818 |
+
"2 NaN \n",
|
819 |
+
"3 NaN \n",
|
820 |
+
"4 NaN \n",
|
821 |
+
"... ... \n",
|
822 |
+
"255019 480020.0 \n",
|
823 |
+
"255020 476901.0 \n",
|
824 |
+
"255021 496540.0 \n",
|
825 |
+
"255022 510491.0 \n",
|
826 |
+
"255023 503423.0 \n",
|
827 |
"\n",
|
828 |
+
" Median Sale Price (Smoothed) % Sold Below List (Smoothed) \\\n",
|
829 |
+
"0 NaN NaN \n",
|
830 |
+
"1 NaN NaN \n",
|
831 |
+
"2 NaN NaN \n",
|
832 |
+
"3 167600.0 NaN \n",
|
833 |
+
"4 168100.0 NaN \n",
|
834 |
+
"... ... ... \n",
|
835 |
+
"255019 480020.0 0.651221 \n",
|
836 |
+
"255020 476901.0 0.659583 \n",
|
837 |
+
"255021 496540.0 0.669387 \n",
|
838 |
+
"255022 510491.0 0.678777 \n",
|
839 |
+
"255023 503423.0 0.658777 \n",
|
840 |
"\n",
|
841 |
+
" Median Sale to List Ratio (Smoothed) % Sold Above List \\\n",
|
842 |
+
"0 NaN NaN \n",
|
843 |
+
"1 NaN NaN \n",
|
844 |
+
"2 NaN NaN \n",
|
845 |
+
"3 NaN NaN \n",
|
846 |
+
"4 NaN NaN \n",
|
847 |
+
"... ... ... \n",
|
848 |
+
"255019 0.982460 0.080000 \n",
|
849 |
+
"255020 0.980362 0.142857 \n",
|
850 |
+
"255021 0.979179 0.088235 \n",
|
851 |
+
"255022 0.978899 0.126761 \n",
|
852 |
+
"255023 0.977990 0.100000 \n",
|
853 |
"\n",
|
854 |
+
" Mean Sale to List Ratio (Smoothed) Mean Sale to List Ratio \\\n",
|
855 |
+
"0 NaN NaN \n",
|
856 |
+
"1 NaN NaN \n",
|
857 |
+
"2 NaN NaN \n",
|
858 |
+
"3 NaN NaN \n",
|
859 |
+
"4 NaN NaN \n",
|
860 |
+
"... ... ... \n",
|
861 |
+
"255019 0.978546 0.983288 \n",
|
862 |
+
"255020 0.972912 0.958341 \n",
|
863 |
+
"255021 0.971177 0.973797 \n",
|
864 |
+
"255022 0.970576 0.966876 \n",
|
865 |
+
"255023 0.970073 0.981278 \n",
|
866 |
"\n",
|
867 |
+
" % Sold Below List % Sold Above List (Smoothed) \n",
|
868 |
+
"0 NaN NaN \n",
|
869 |
+
"1 NaN NaN \n",
|
870 |
+
"2 NaN NaN \n",
|
871 |
+
"3 NaN NaN \n",
|
872 |
+
"4 NaN NaN \n",
|
873 |
+
"... ... ... \n",
|
874 |
+
"255019 0.680000 0.119711 \n",
|
875 |
+
"255020 0.625000 0.120214 \n",
|
876 |
+
"255021 0.705882 0.107185 \n",
|
877 |
+
"255022 0.704225 0.109463 \n",
|
878 |
+
"255023 0.600000 0.114463 \n",
|
879 |
"\n",
|
880 |
+
"[255024 rows x 18 columns]"
|
881 |
]
|
882 |
},
|
883 |
+
"execution_count": 6,
|
884 |
"metadata": {},
|
885 |
"output_type": "execute_result"
|
886 |
}
|
|
|
897 |
" }\n",
|
898 |
")\n",
|
899 |
"\n",
|
900 |
+
"final_df[\"Date\"] = pd.to_datetime(final_df[\"Date\"])\n",
|
901 |
"final_df.sort_values(by=[\"Region ID\", \"Home Type\", \"Date\"])"
|
902 |
]
|
903 |
},
|
904 |
{
|
905 |
"cell_type": "code",
|
906 |
+
"execution_count": 7,
|
907 |
"metadata": {},
|
908 |
"outputs": [],
|
909 |
"source": [
|
zillow.py
CHANGED
@@ -209,7 +209,7 @@ class Zillow(datasets.GeneratorBasedBuilder):
|
|
209 |
num_classes=2,
|
210 |
names=["SFR", "all homes"],
|
211 |
),
|
212 |
-
"Date": datasets.Value(dtype="
|
213 |
"Mean Sale to List Ratio (Smoothed)": datasets.Value(
|
214 |
dtype="float32", id="Mean Sale to List Ratio (Smoothed)"
|
215 |
),
|
|
|
209 |
num_classes=2,
|
210 |
names=["SFR", "all homes"],
|
211 |
),
|
212 |
+
"Date": datasets.Value(dtype="date32", id="Date"),
|
213 |
"Mean Sale to List Ratio (Smoothed)": datasets.Value(
|
214 |
dtype="float32", id="Mean Sale to List Ratio (Smoothed)"
|
215 |
),
|