misikoff commited on
Commit
4364bbc
1 Parent(s): a6f1f9e

fix: get home values working again

Browse files
Files changed (1) hide show
  1. zillow.py +15 -7
zillow.py CHANGED
@@ -36,14 +36,21 @@ _HOMEPAGE = "https://www.zillow.com/research/data/"
36
  _LICENSE = "other"
37
 
38
  HOME_TYPES = [
 
 
 
39
  "all homes",
40
  "all homes plus multifamily",
41
- "SFR",
42
- "condo/co-op",
43
- "multifamily",
44
  ]
45
 
46
- REGION_TYPES = ["county", "city", "zip", "country", "msa"]
 
 
 
 
 
 
 
47
 
48
 
49
  class Zillow(datasets.GeneratorBasedBuilder):
@@ -260,9 +267,10 @@ class Zillow(datasets.GeneratorBasedBuilder):
260
  "Region ID": datasets.Value(dtype="string", id="Region ID"),
261
  "Size Rank": datasets.Value(dtype="int32", id="Size Rank"),
262
  "Region": datasets.Value(dtype="string", id="Region"),
263
- # "Region Type": datasets.ClassLabel(
264
- # num_classes=len(REGION_TYPES), names=REGION_TYPES
265
- # ),
 
266
  "State": datasets.Value(dtype="string", id="State"),
267
  "Home Type": datasets.ClassLabel(
268
  num_classes=len(HOME_TYPES), names=HOME_TYPES
 
36
  _LICENSE = "other"
37
 
38
  HOME_TYPES = [
39
+ "multifamily",
40
+ "condo/co-op",
41
+ "SFR",
42
  "all homes",
43
  "all homes plus multifamily",
 
 
 
44
  ]
45
 
46
+ REGION_TYPES = [
47
+ "zip",
48
+ "city",
49
+ "county",
50
+ "msa",
51
+ "state",
52
+ "country",
53
+ ]
54
 
55
 
56
  class Zillow(datasets.GeneratorBasedBuilder):
 
267
  "Region ID": datasets.Value(dtype="string", id="Region ID"),
268
  "Size Rank": datasets.Value(dtype="int32", id="Size Rank"),
269
  "Region": datasets.Value(dtype="string", id="Region"),
270
+ # this is the problem
271
+ "Region Type": datasets.ClassLabel(
272
+ num_classes=len(REGION_TYPES), names=REGION_TYPES
273
+ ),
274
  "State": datasets.Value(dtype="string", id="State"),
275
  "Home Type": datasets.ClassLabel(
276
  num_classes=len(HOME_TYPES), names=HOME_TYPES