Commits

Chris Mutel committed 54fa90b

0.4: Upgrade for changes downstream in data and calc

Comments (0)

Files changed (5)

bw2analyzer/contribution.py

         return r, b, t
 
     def hinton_matrix(self, lca, rows=5, cols=5):
-        coo, b, t = self.top_coo_matrix(lca.characterized_inventory.data,
+        coo, b, t = self.top_coo_matrix(lca.characterized_inventory,
             rows=rows, cols=cols)
         rt, rb = lca.reverse_dict()
         flows = [self.get_name(rb[x]) for x in b]
     def annotated_top_processes(self, lca, **kwargs):
         rt, rb = lca.reverse_dict()
         return [(score, self.get_name(rt[index])) for score, index in \
-            self.top_processes(lca.characterized_inventory.data)]
+            self.top_processes(lca.characterized_inventory)]
 
     def annotated_top_emissions(self, lca, **kwargs):
         rt, rb = lca.reverse_dict()
         return [(score, self.get_name(rb[index])) for score, index in \
-            self.top_emissions(lca.characterized_inventory.data)]
+            self.top_emissions(lca.characterized_inventory)]
 
     def get_name(self, name):
         if name[0] not in self.db_names:

bw2analyzer/report.py

         lca = LCA(self.activity, self.method)
         lca.lci()
         lca.lcia()
+        lca.fix_dictionaries()
         rt, rb = lca.reverse_dict()
 
         ca = ContributionAnalysis()
         hinton = ca.hinton_matrix(lca)
-        treemap = ca.d3_treemap(lca.characterized_inventory.data, rb, rt)
+        treemap = ca.d3_treemap(lca.characterized_inventory, rb, rt)
         herfindahl = ca.herfindahl_index(
-            lca.characterized_inventory.data, lca.score)
+            lca.characterized_inventory, lca.score)
         concentration = ca.concentration_ratio(
-            lca.characterized_inventory.data, lca.score)
+            lca.characterized_inventory, lca.score)
 
         self.report = {
             "activity": [(ca.get_name(k), "%.2g" % v, ca.db_names[k[0]][k][
 # built documents.
 #
 # The short X.Y version.
-version = '0.3'
+version = '0.4'
 # The full version, including alpha/beta/rc tags.
-release = '0.3.3'
+release = '0.4'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
 numpy>=1.6
 requests>=1.1.0
 scipy
-brightway2>=0.9.1
-bw2calc>=0.9.2.2
-bw2data>=0.9.1
+brightway2>=0.10
+bw2calc>=0.10.1
+bw2data>=0.10.1
 
 setup(
     name='bw2analyzer',
-    version="0.3.3",
+    version="0.4",
     packages=["bw2analyzer", "bw2analyzer.tests"],
     author="Chris Mutel",
     author_email="cmutel@gmail.com",