hollyyfc commited on
Commit
a903c41
1 Parent(s): 519a5d3

Update tidytuesday_for_python.py

Browse files
Files changed (1) hide show
  1. tidytuesday_for_python.py +11 -2
tidytuesday_for_python.py CHANGED
@@ -118,5 +118,14 @@ class TidyTuesdayPython(datasets.GeneratorBasedBuilder):
118
  logging.info("generating examples from = %s", filepath)
119
  with open(filepath, "r") as j:
120
  tidytuesday_json = json.load(j)
121
- for record in tidytuesday_json:
122
- yield record
 
 
 
 
 
 
 
 
 
 
118
  logging.info("generating examples from = %s", filepath)
119
  with open(filepath, "r") as j:
120
  tidytuesday_json = json.load(j)
121
+
122
+ for record in tidytuesday_json:
123
+ id_ = record['date_posted']
124
+ yield id_, {
125
+ "project_name": record["project_name"],
126
+ "project_source": record["project_source"],
127
+ "description": record["description"],
128
+ "data_source_url": record["data_source_url"],
129
+ "data_dictionary": record["data_dictionary"],
130
+ "data": record["data"],
131
+ }