-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path2015-17-proposed-budget-tree.html
124 lines (117 loc) · 8.21 KB
/
2015-17-proposed-budget-tree.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<!DOCTYPE html><html><head><meta name="viewport" content="width=device-width"><link rel="stylesheet" href="/css/main.css"><title>Detailed Breakdown: Mayor's 2015-17 Proposed Policy Budget - Open Budget: Oakland</title><script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-35908939-3', 'openbudgetoakland.org');
ga('send', 'pageview');
</script><script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script><script src="https://code.jquery.com/jquery-migrate-1.2.1.js"></script><script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.2.0/js/bootstrap.min.js"></script><script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.4.5/d3.min.js"></script></head><body class="undefined"><div id="wrapper"><nav class="main-nav"><div class="navbar navbar-default navbar-fixed-top"><div class="container"><div class="navbar-header"><button type="button" data-toggle="collapse" data-target=".navbar-collapse" class="navbar-toggle"><span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button><a href="/" class="navbar-brand">Open Budget: Oakland</a></div><div class="navbar-collapse collapse"><ul class="nav navbar-nav navbar-right"><li class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">About<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="what-we-do.html">What and How</a></li><li><a href="who-we-are.html">Who We Are</a></li><li><a href="news.html">News</a></li><li><a href="contact.html">Contact Us</a></li></ul></li><li><a href="/budget-visuals.html">Visualizations</a></li><li><a href="http://data.openoakland.org/dataset/city-oakland-budget" target="_blank">Data</a></li><li class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Resources<b class="caret"></b></a><ul class="dropdown-menu"><li><a href="oakland-budget-101.html">Oakland Budget 101</a></li><li><a href="tools-projects.html">Tools and Projects</a></li></ul><li><a href="feedback.html">Feedback</a></li></li></ul></div></div></div></nav><div class="container"><style>#treemap{
display: block;
max-width: 100%;
margin: auto;
padding-top: 10px;
}
#breadcrumbs {
margin: 0px;
padding: 0px;
cursor:pointer;
}
#table {
display: block;
max-width: 100%;
margin: auto;
}
#tooltip p {
margin: 0px;
padding: 0px;
}
.amount {
padding: 0px;
margin: 0px;
font-size: medium;
font-family: "Open Sans", Helvetica, Arial, sans-serif;
}
.name {
padding: 0px;
margin: 0px;
font-size: small ;
font-family: "Open Sans", Helvetica, Arial, sans-serif;
}
#spacer {
height: 30px;
}</style><div class="row"><div class="intro col-md-8"><h1>Detailed Breakdown: 2015-17 Mayor's Proposed Policy Budget </h1><p>Select year and account (revenues or expenses). Click on a fund to see the departments that receive its funding. Click on that department to see its spending or revenue.</p><p>The <strong>General Fund</strong> — roughly 40% of Oakland's total budget -- is decided by a <a href="/budget-process.html">budget process</a> that includes private and public meetings, surveys, and negotiations. The other 60% of the budget comes from taxes, ballot measures, grants, fees, and other sources.</p></div></div><div class="row"><div class="col-sm-12"><p id="breadcrumbs"> </p></div></div><div class="row"><div class="col-sm-6"><h3 id="title">title</h3></div><div id="dropdown" class="col-sm-6"></div></div><div id="treemap"></div><div id="spacer"></div><div id="table" style="margin-bottom: 30px"></div><section id="comments"><div class="row"><div class="col-md-8"><h4>Comments</h4><div id="disqus_thread"></div></div></div></section></div><script type="text/javascript">var disqus_identifier = "MayorsBudget1517";
</script><script type="text/javascript">/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'openbudgetoakland';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();</script><noscript>Please enable JavaScript to view the<a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript><script src="/js/palette.js" charset="utf-8"></script><script src="/js/source.js" charset="utf-8"></script><script src="/js/data.js" charset="utf-8"></script><script src="/js/treemap.js" charset="utf-8"></script><script src="/js/spreadsheet.js" charset="utf-8"></script><script src="/js/tooltip.js" charset="utf-8"></script><script src="/js/budget-treemap.js" charset="utf-8"></script><script>var config = {
/* set values available in dropdown files */
dropdown_values: {
"Year": ["FY15-16", "FY16-17"],
"Account": ["Revenue", "Expense"]
},
/* set the default values */
dropdown_choice: {
"Year": "FY16-17",
"Account": "Expense"
},
/* create the url to the data file based on the dropdown choices */
url: function() {
return 'data/tree/Proposed.' + this.dropdown_choice["Account"] + "." + this.dropdown_choice["Year"] + ".json";
}
};</script><script>function _hash_normalize(s) {
return s.toLowerCase().replace(/\s+/g, '');
}
function _hash_compare(v1, v2) {
return _hash_normalize(v1) == _hash_normalize(v2) ? 0 : 1;
}
function _parse_hash(hash) {
function _parse_hash_dropdown(arr, category) {
if (arr.length) {
var x = arr.shift();
/* see if hash array value matches to dropdown value, and set value
* it matches */
var idx = ob.data.findIndex(
config.dropdown_values[category], x, _hash_compare);
if (idx > -1) {
config.dropdown_choice[category] = config.dropdown_values[category][idx];
}
}
}
var hash_array = hash.split(".");
_parse_hash_dropdown(hash_array, "Year");
_parse_hash_dropdown(hash_array, "Account");
return hash_array.join(".");
}
/* need to parse hash on load before creating treemap to make sure we
* don't set the dropdown values before reading them from the hash */
_parse_hash(window.location.hash.replace("#",""));
/* get width of container */
var parent = d3.select(".container");
var width = parent.node().offsetWidth - parseInt(parent.style("padding-left")) - parseInt(parent.style("padding-right"));
/* create display */
ob.display.budget_treemap()
.width(width)
.height(600)
.count(40)
.config(config)
.dropdown("#dropdown")
.spreadsheet("#table")
.treemap("#treemap")
.title("#title")
.breadcrumbs("#breadcrumbs")
.hashnorm(_hash_normalize)
.hashcmp(_hash_compare)
.on("set_hash", function(hash) {
/* add year and account to hash for linking */
var prefix = _hash_normalize(config.dropdown_choice["Year"]) +
"." +
_hash_normalize(config.dropdown_choice["Account"]);
return hash.length ? prefix + "." + hash : prefix;
})
.on("get_hash", function(hash) { return _parse_hash(hash); })
.url(config.url())
.create();</script><div id="wrapper-footer"></div></div><footer id="footer"><div class="container"><div class="row"><div class="col-md-6 col-sm-9"><p>
Open Budget: Oakland is an open-source project by <a href="http://openoakland.org">OpenOakland</a> to help citizens better understand Oakland's spending and budget process.</p><ul class="list-inline"><li><a href="http://openoakland.org"><img src="/images/global/openoakland-logo.png" width="150"></a></li><li><a href="https://twitter.com/openbudgetoak"><img src="/images/global/twitter-icon.png"></a></li><li><a href="https://github.com/openoakland/openbudgetoakland"><img src="/images/global/github-icon.png"></a></li></ul></div><div class="col-sm-3 col-md-push-3"><ul class="list-unstyled"><li><a href="who-we-are.html">About the Project</a></li><li><a href="http://www.meetup.com/OpenOakland">Get Involved</a></li><li><a href="feedback.html">Give Feedback</a></li></ul></div></div></div></footer><link href="https://fonts.googleapis.com/css?family=Arvo:400,700" rel="stylesheet" type="text/css"></body></html>