Graphing of has scores
Former-commit-id: 0001366c9f06949ee37000803534e31aebb49c23
--- a/.gitmodules
+++ b/.gitmodules
@@ -10,4 +10,7 @@
[submodule "lib/php-diff"]
path = lib/php-diff
url = https://github.com/chrisboulton/php-diff.git
+[submodule "javascripts/flot"]
+ path = javascripts/flot
+ url = https://github.com/paradoxxxzero/flot.git
--- a/about.php
+++ b/about.php
@@ -13,48 +13,49 @@
Prometheus is the agent which polls agency websites to assess compliance.
<h2> Open everything </h2>
-all documents released CC-BY 3 AU
+All documents released CC-BY 3 AU
Open source git @
<h2>Organisational Data Sources</h2>
http://www.comlaw.gov.au/Browse/Results/ByTitle/AdministrativeArrangementsOrders/Current/Ad/0 defines departments
-Agencies can be found in the Schedule to an Appropriation Bill (budget), Schedule to FMA Regulations and/or Public Service Act.
+Agencies can be found in the Schedule to an Appropriation Bill (budget), Schedule to FMA Regulations and/or Public Service Act.<br>
-http://www.finance.gov.au/publications/flipchart/docs/FMACACFlipchart.pdf summarises these. view-source:https://www.tenders.gov.au/?event=public.advancedsearch.home is great for the suspended/active status
+http://www.finance.gov.au/publications/flipchart/docs/FMACACFlipchart.pdf summarises these. view-source:https://www.tenders.gov.au/?event=public.advancedsearch.home is great for the suspended/active status<br>
When defining the hierachy, this system is designed towards monitoring accountablity. Thus large agencies that have registered their own ABN
and have their own accountablity mechanisms/website receive a seperate record as a child of their department.
-Some small agencies will choose to simply rely on their parent department's accountablity measures.
+Some small agencies will choose to simply rely on their parent department's accountablity measures.<br>
This flows through to organisation name and other/past names. A department that completely accounts for an agency will list that agency as an other child name.
As agencies themselves shift between departments, there may be scope for providing time ranges but typically the newest hierarchy will be the one recorded.
-A department/agency name will be the newest active name assigned to that ABN.
+A department/agency name will be the newest active name assigned to that ABN.<br>
ABN information is derived from the ABR. This is the definitive umpire about which former name should be linked to which current name.
For example "Department of Transport and Regional Services" became "Department of Infrastructure, Transport, Regional Development and Local Government" (same ABN)
however it later split into "Department of Infrastructure and Transport" (same ABN)
-and "Department of Regional Australia, Regional Development and Local Government" (new ABN).
+and "Department of Regional Australia, Regional Development and Local Government" (new ABN).<br>
Statistical information from http://www.apsc.gov.au/stateoftheservice/1011/statsbulletin/section1.html#t2total https://www.apsedii.gov.au/apsedii/CustomQueryx33.shtml
-and individual annual reports.
+and individual annual reports.<br>
-Webpage Assessment
+<h2>Webpage Assessment</h2>
Much due care has been put into correctly recording disclosure URLs. Typically the "About", "Corporate", "Publications" and "Sitemap" sections are checked at the very least.
-Occasionally it is nessicary to use a site or Google search. In several rare cases, there is a secret "Disclosure" navigation menu you can find if you find one of the mandatory publishing obligations in that category (seriously).
-Some rules about leniency:
- An empty FOI disclosure log counts, a page outlining what the FOI Act is does not.
- A disclosure log in PDF or Word format counts :(
- An empty File/Record list counts (although that's very minimalistic that you have no files, electronic or paper)
- Only a current information publication scheme page counts, not a s.9 FOI Act page or an organisation chart.
- If there isn't a page easily listing all current and past Annual Reports, the most current one (html, pdf) counts.
- Consultancy contracts might not need it's own webpage (if in Annual Report), grants/appointments might not apply to all organisations but Legal Services Expenditure (and all other obligations) does need a webpage.
+Occasionally it is nessicary to use a site or Google search. In several rare cases, there is a secret "Disclosure" navigation menu you can find if you find one of the mandatory publishing obligations in that category (seriously).<br>
+Some rules about leniency:<br>
+<ul>
+ <li>An empty FOI disclosure log counts, a page outlining what the FOI Act is does not.</li>
+ <li>A disclosure log in PDF or Word format counts :(</li>
+ <li>An empty File/Record list counts (although that's very minimalistic that you have no files, electronic or paper)</li>
+ <li>Only a current information publication scheme page counts, not a s.9 FOI Act page or an organisation chart.</li>
+ <li>If there isn't a page easily listing all current and past Annual Reports, the most current one (html, pdf) counts.</li>
+ <li>Consultancy contracts might not need it's own webpage (if in Annual Report), grants/appointments might not apply to all organisations but Legal Services Expenditure (and all other obligations) does need a webpage. </li>
<h2>Open Government Scoring</h2>
-+1 point for every true Has... attribute
--1 point for every false Has... (ie. Has Not) attribute
++1 point for every true Has... attribute<br>
+-1 point for every false Has... (ie. Has Not) attribute</br>
-Don't like this? Make your own score, suggest a better scoring mechanism.
+Don't like this? Make your own score, suggest a better scoring mechanism.</br>
<?php
include_footer();
--- /dev/null
+++ b/charts.php
@@ -1,1 +1,70 @@
+<?php
+include_once('include/common.inc.php');
+include_header();
+$db = $server->get_db('disclosr-agencies');
+
+?>
+<div class="foundation-header">
+ <h1><a href="about.php">Charts</a></h1>
+ <h4 class="subheader">Lorem ipsum.</h4>
+</div>
+<div id="placeholder" style="width:900px;height:600px;"></div>
+<script id="source">
+window.onload = function() {
+ $(document).ready(function() {
+ var d1 = [];
+ var labels = [];
+ <?php
+ try {
+ $rows = $db->get_view("app", "scoreHas?group=true", null, true)->rows;
+
+ /*foreach ($rows as $key => $row) {
+ echo " d1.push([$key, {$row->value}]);".PHP_EOL;
+ echo " labels.push('{$row->key}');".PHP_EOL;
+ }*/
+ $dataValues = Array();
+ foreach ($rows as $row) {
+ $dataValues[$row->value] = $row->key;
+ }
+ $i = 0;
+ ksort($dataValues);
+ foreach($dataValues as $value => $key) {
+
+ echo " d1.push([$i, $value]);".PHP_EOL;
+ echo " labels.push('$key');".PHP_EOL;
+ $i++;
+ }
+} catch (SetteeRestClientException $e) {
+ setteErrorHandler($e);
+}
+?>
+
+ $.plot($("#placeholder"), [ d1], {
+ series: {
+ bars: { show: true, barWidth: 0.6 }
+ },
+ xaxis: {
+ tickFormatter: function formatter(val, axis) {
+ if (labels[val]) {
+ return(labels[val]);
+
+ } else {
+ return "";
+ }
+
+ },
+ labelAngle: 90
+ }
+ });
+
+
+
+
+});
+};
+</script>
+
+<?php
+include_footer();
+?>
--- a/include/template.inc.php
+++ b/include/template.inc.php
@@ -69,6 +69,9 @@
<script src="<?php echo $basePath; ?>javascripts/foundation.js"></script>
<script src="<?php echo $basePath; ?>javascripts/app.js"></script>
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
+
+ <!--<script language="javascript" type="text/javascript" src="javascripts/jquery.js"></script>-->
+ <script language="javascript" type="text/javascript" src="javascripts/flot/jquery.flot.js"></script>
</body>
</html>
--- a/javascripts/app.js
+++ b/javascripts/app.js
@@ -43,7 +43,7 @@
/* PLACEHOLDER FOR FORMS ------------- */
/* Remove this and jquery.placeholder.min.js if you don't need :) */
- $('input, textarea').placeholder();
+ //$('input, textarea').placeholder();
--- /dev/null
+++ b/javascripts/flot