pudo avatar pudo committed 94865e8

[load] fix barnet

Comments (0)

Files changed (1)

wdmmgext/load/barnet.py

     filename - a filename
 
     '''
-    loader = Loader(DATASET_NAME, u"UK Barnet Council budget", currency=u'gbp', 
+    loader = Loader(DATASET_NAME, ["src_idx"], u"UK Barnet Council budget", currency=u'gbp', 
                     description=u'''Barnet Council spending data.
 
 Source data package: custom data supplied by Barnet Council''')
                  'to': loader.society, 'from': loader.barnet}
         level_1 = row[0].encode('utf-8')
         level_2 = row[1].encode('utf-8')
-        
         parent, child = None, None
         lower_levels = {}
         for item in classification_scheme:
                         label=level_2, taxonomy=TAXONOMY, level=2,
                         parent=parent.to_ref(), description=row[4])
             loader.classify_entry(entry, child, 'key_barnet_level_2')
-        loader.create_entry({'src_idx': row_index},
-                            **entry)
-    
+        entry['src_idx'] = row_index
+        loader.create_entry(**entry)
+
     loader.create_view(Dataset, {'name': DATASET_NAME}, 
                        name='default', label="Spending by Level 1",
                        dimension="dataset", breakdown="key_barnet_level_1")
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.