openspending / cameroon.openspending.org

Website for "Cameroon Budget Inquirer"
http://cameroon.openspending.org/
7 stars 10 forks source link

Linking to specific years isn't working #42

Open vitorbaptista opened 10 years ago

vitorbaptista commented 10 years ago

For example, if you visit http://cameroon.openspending.org/en/council.html?name=yaounde2#/~/total--2009- , you'll be redirected to that dataset's last year (2012), and not the one linked (2009).

vitorbaptista commented 10 years ago

The problem is that the URLs are set by js/bubbletree.js, but there's no initialization. The actual values are initialized by each .html page (e.g. en/council.html) without taking the URL into account. This seems like a difficult bug to fix, given that the BubbleTree doesn't expose its URL parsing methods, so we would need to either replicate the same logic on every other place we use it, or change the BubbleTree to expose it.