<?php | <?php |
include_once('include/common.inc.php'); | include_once('include/common.inc.php'); |
include_header(); | include_header(); |
?> | ?> |
<div class="foundation-header"> | <div class="foundation-header"> |
<h1><a href="about.php">About/FAQ</a></h1> | <h1><a href="about.php">About/FAQ</a></h1> |
<h4 class="subheader">Lorem ipsum.</h4> | <h4 class="subheader">Lorem ipsum.</h4> |
</div> | </div> |
<h2> What is this? </h2> | <h2> What is this? </h2> |
Disclosr is a project to monitor Australian Federal Government agencies | Disclo.gs is a project to monitor Australian Federal Government agencies |
compliance with their <a href="http://www.oaic.gov.au/publications/other_operational/foi_policy_frequently_asked_questions.html#_Toc291837571">"proactive disclosure requirements"</a>. | compliance with their <a href="http://www.oaic.gov.au/publications/other_operational/foi_policy_frequently_asked_questions.html#_Toc291837571">"proactive disclosure requirements"</a>. |
OGRE (Open Government Realization Evaluation) is a ranking of compliance with these requirements. | |
Prometheus is the agent which polls agency websites to assess compliance. | |
<h2> Open everything </h2> | <h2> Open everything </h2> |
All documents released CC-BY 3 AU | All documents released CC-BY 3 AU |
Open source git @ | Open source git @ |
<h2>Organisational Data Sources</h2> | <h2>Organisational Data Sources</h2> |
http://www.comlaw.gov.au/Browse/Results/ByTitle/AdministrativeArrangementsOrders/Current/Ad/0 defines departments | 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.<br> | 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<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<br> |
Fraud in gov depts by Fairfax Media http://www.smh.com.au/national/public-service-keeps-fraud-cases-private-20110923-1kpdr.html | Fraud in gov depts by Fairfax Media http://www.smh.com.au/national/public-service-keeps-fraud-cases-private-20110923-1kpdr.html |
When defining the hierachy, this system is designed towards monitoring accountablity. Thus large agencies that have registered their own ABN | 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. | 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.<br> | 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. | 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. | 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.<br> | 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. | 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) | 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) | however it later split into "Department of Infrastructure and Transport" (same ABN) |
and "Department of Regional Australia, Regional Development and Local Government" (new ABN).<br> | 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 | 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.<br> | and individual annual reports.<br> |
<h2>Webpage Assessment</h2> | <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. | 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).<br> | 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> | Some rules about leniency:<br> |
<ul> | <ul> |
<li>An empty FOI disclosure log counts, a page outlining what the FOI Act is does not.</li> | <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>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>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>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>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> | <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> | <h2>Open Government Scoring</h2> |
+1 point for every true Has... attribute<br> | +1 point for every true Has... attribute<br> |
-1 point for every false Has... (ie. Has Not) 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.</br> | Don't like this? Make your own score, suggest a better scoring mechanism.</br> |
<?php | <?php |
include_footer(); | include_footer(); |
?> | ?> |
<?php | |
include_once('../include/common.inc.php'); | |
include_header(); | |
require_once '../lib/php-diff/lib/Diff.php'; | |
require_once '../lib/php-diff/lib/Diff/Renderer/Html/SideBySide.php'; | |
$db = $server->get_db('disclosr-agencies'); | |
try { | |
$rows = $db->get_view("app", "getConflicts", null, true)->rows; | |
//print_r($rows); | |
foreach ($rows as $row) { | |
echo "<h2>".$row->id."</h2>"; | |
$request = Requests::get($serverAddr."disclosr-agencies/".$row->id); | |
$origSort = object_to_array(json_decode($request->body)); | |
ksort($origSort); | |
$origDoc = explode(",",json_encode($origSort)); | |
foreach($row->value as $conflictRev) { | |
$conflictURL = $serverAddr."disclosr-agencies/".$row->id."?rev=".$conflictRev; | |
$request = Requests::get($conflictURL); | |
$conflictSort = object_to_array(json_decode($request->body)); | |
ksort($conflictSort); | |
$conflictDoc = explode(",",json_encode($conflictSort)); | |
echo "curl -X DELETE ".$conflictURL."<br>".PHP_EOL; | |
// Options for generating the diff | |
$options = array( | |
//'ignoreWhitespace' => true, | |
//'ignoreCase' => true, | |
); | |
// Initialize the diff class | |
$diff = new Diff($conflictDoc, $origDoc, $options); | |
// Generate a side by side diff | |
$renderer = new Diff_Renderer_Html_SideBySide; | |
echo $diff->Render($renderer); | |
} | |
die(); | |
} | |
} catch (SetteeRestClientException $e) { | |
setteErrorHandler($e); | |
} | |
include_footer(); | |
?> | |
<?php | |
$nodes = Array(Array("id" => "gov", "label" => "Federal Government")); | |
$edges = Array(); | |
function addEdge($source, $target) { | |
global $edges; | |
$edges[] = Array("id" => md5($source . $target), "source" => $source, "target" => $target); | |
} | |
function addNode($id, $label, $pid) { | |
global $nodes; | |
$nodes[] = Array("id" => $id, "label" => $label , "pid" => $pid); | |
} | |
function addChildren($parentID, $parentXML) { | |
foreach ($parentXML as $childXML) { | |
if ($childXML->getName() == "organization" || $childXML->getName() == "organizationalUnit" || $childXML->getName() == "person") { | |
$attr = $childXML->attributes(); | |
$id = $attr['UUID']; | |
if ($childXML->getName() == "organization" || $childXML->getName() == "organizationalUnit") { | |
$label = $childXML->name; | |
} else if ($childXML->getName() == "person") { | |
$label = $childXML->fullName; | |
} | |
addNode($id, $label, $parentID); | |
addEdge($id, $parentID); | |
addChildren($id, $childXML); | |
} | |
} | |
} | |
if (file_exists('directoryexport.xml')) { | |
$xml = simplexml_load_file('directoryexport.xml'); | |
addChildren("gov", $xml); | |
} else { | |
exit('Failed to open directoryexport.xml'); | |
} | |
header('Content-Type: application/gexf+xml'); | |
echo '<?xml version="1.0" encoding="UTF-8"?> | |
<gexf xmlns="http://www.gexf.net/1.2draft" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.gexf.net/1.2draft http://www.gexf.net/1.2draft/gexf.xsd" version="1.2"> | |
<graph mode="static" defaultedgetype="directed"> | |
<nodes>'; | |
foreach ($nodes as $node) { | |
echo ' <node id="' . $node['id'] . '" label="' . htmlentities($node['label'],ENT_XML1) . '" ' . (isset($node['pid']) ? 'pid="' . $node['pid'] . '"' : "") . ' />'; | |
} | |
echo '</nodes> | |
<edges>'; | |
foreach ($edges as $edge) { | |
echo ' <edge id="' . $edge['id'] . '" source="' . $edge['source'] . '" target="' . $edge['target'] . '" />'; | |
} | |
echo '</edges> | |
</graph> | |
</gexf>'; | |
?> | |
<!DOCTYPE html> | <!DOCTYPE html> |
<html xmlns="http://www.w3.org/1999/xhtml"> | <html xmlns="http://www.w3.org/1999/xhtml"> |
<head> | <head> |
<meta charset="UTF-8"/> | <meta charset="UTF-8"/> |
<title>Minimal BubbleTree Demo</title> | <title>Minimal BubbleTree Demo</title> |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.js"></script> | <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.js"></script> |
<script type="text/javascript" src="javascripts/bubbletree/lib/jquery.history.js"></script> | <script type="text/javascript" src="javascripts/bubbletree/lib/jquery.history.js"></script> |
<script type="text/javascript" src="javascripts/bubbletree/lib/raphael.js"></script> | <script type="text/javascript" src="javascripts/bubbletree/lib/raphael.js"></script> |
<script type="text/javascript" src="javascripts/bubbletree/lib/vis4.js"></script> | <script type="text/javascript" src="javascripts/bubbletree/lib/vis4.js"></script> |
<script type="text/javascript" src="javascripts/bubbletree/lib/Tween.js"></script> | <script type="text/javascript" src="javascripts/bubbletree/lib/Tween.js"></script> |
<script type="text/javascript" src="javascripts/bubbletree/build/bubbletree.js"></script> | <script type="text/javascript" src="javascripts/bubbletree/build/bubbletree.js"></script> |
<link rel="stylesheet" type="text/css" href="javascripts/bubbletree/build/bubbletree.css" /> | <link rel="stylesheet" type="text/css" href="javascripts/bubbletree/build/bubbletree.css" /> |
<script type="text/javascript" src="javascripts/bubbletree/styles/cofog.js"></script> | <script type="text/javascript" src="javascripts/bubbletree/styles/cofog.js"></script> |
<script type="text/javascript"> | <script type="text/javascript"> |
$(function() { | $(function() { |
<?php | <?php |
include_once('include/common.inc.php'); | include_once('include/common.inc.php'); |
include("lib/Color.php"); | include("lib/Color.php"); |
$color = new Lux_Color(); | $color = new Lux_Color(); |
$portfolios = Array(); | $portfolios = Array(); |
$total = 0; | |
$db = $server->get_db('disclosr-agencies'); | $db = $server->get_db('disclosr-agencies'); |
try { | try { |
$rows = $db->get_view("app", "byDeptStateName", null, true)->rows; | $rows = $db->get_view("app", "byDeptStateName", null, true)->rows; |
foreach ($rows as $row) { | foreach ($rows as $row) { |
$portfolios[trim(str_replace(Array("Department of","Department","the","'","`"),"",$row->key))] = $row->value; | $portfolios[trim(str_replace(Array("Department of", "Department", "the", "'", "`"), "", $row->key))] = $row->value; |
} | } |
} catch (SetteeRestClientException $e) { | } catch (SetteeRestClientException $e) { |
setteErrorHandler($e); | setteErrorHandler($e); |
} | } |
$agencies = Array(); | $agencies = Array(); |
try { | try { |
$rows = $db->get_view("app", "byCanonicalName", null, true)->rows; | $rows = $db->get_view("app", "byCanonicalName", null, true)->rows; |
//print_r($rows); | //print_r($rows); |
foreach ($rows as $row) { | foreach ($rows as $row) { |
$employees = 0; | $employees = 0; |
$portfolioid = 0; | $portfolioid = 0; |
if ($row->value->employees) $employees = $row->value->employees; | if (isset($row->value->employees)) { |
if (isset($row->value->statistics->employees)) { | $employees = $row->value->employees; |
$agencyEmployeesArray = object_to_array($row->value->statistics->employees); | } |
$employees = $agencyEmployeesArray["2010-2011"]["value"]; | if (isset($row->value->statistics->employees)) { |
} | $agencyEmployeesArray = object_to_array($row->value->statistics->employees); |
if (!($employees > 0)) $employees =0; | if (isset($agencyEmployeesArray["2010-2011"]["value"])) { |
if (isset($row->value->parentOrg)) $portfolioid = $row->value->parentOrg; | $employees = $agencyEmployeesArray["2010-2011"]["value"]; |
if (isset($row->value->orgType) && $row->value->orgType == "FMA-DepartmentOfState") $portfolioid = $row->id; | } else { |
$agencies[$portfolioid][$row->value->name] = $employees; | // bailout for agencies that are closed for business |
continue; | |
} | |
} | |
if (!($employees > 0)) { | |
$employees = 0; | |
} | |
if (isset($row->value->parentOrg)) { | |
$portfolioid = $row->value->parentOrg; | |
} | |
if (isset($row->value->orgType) && $row->value->orgType == "FMA-DepartmentOfState") { | |
$portfolioid = $row->id; | |
} | |
$agencies[$portfolioid][$row->value->name] = $employees; | |
} | } |
} catch (SetteeRestClientException $e) { | } catch (SetteeRestClientException $e) { |
setteErrorHandler($e); | setteErrorHandler($e); |
} | } |
//print_r($portfolios); | //print_r($portfolios); |
//print_r($agencies); | //print_r($agencies); |
$i = 0; | |
// http://martin.ankerl.com/2009/12/09/how-to-create-random-colors-programmatically/ | |
$golden_ratio_conjugate = 0.618033988749895; | |
$h = 0.00+rand(0,10)/10; # use random start value | |
foreach ($portfolios as $portfolioName => $portfolioID) { | foreach ($portfolios as $portfolioName => $portfolioID) { |
$i++; | $h += $golden_ratio_conjugate; |
$portfolioColor = $color->hsv2hex(Array($i/10, .7, abs(($i*(1/10))-.5) + .5)); | |
$subnodes = Array(); | $h = fmod($h,1); |
$portfolioEmployees = 0; | $portfolioColor = $color->hsv2hex(Array($h, .3, .99)); |
foreach ($agencies[$portfolioID] as $agencyName => $agencyEmployees) { | $subnodes = Array(); |
$agencyColor = $color->hsv2hex(Array($i/10, rand(1,10)/10, abs(($i*(1/10))-.5) + .5)); | $portfolioEmployees = 0; |
$subnodes[] = Array( | foreach ($agencies[$portfolioID] as $agencyName => $agencyEmployees) { |
"label" => str_replace(Array("'","`"),"",$agencyName), | $agencyColor = $color->hsv2hex(Array($h / 10, rand(1, 10) / 10, abs(($h * (1 / 10)) - .5) + .5)); |
"amount" => $agencyEmployees, | $subnodes[] = Array( |
"color" => "#".$agencyColor | "label" => str_replace(Array("'", "`"), "", $agencyName), |
); | "amount" => $agencyEmployees, |
$portfolioEmployees += $agencyEmployees; | //"color" => "#" . $agencyColor |
} | ); |
$nodes[] = Array( | $portfolioEmployees += $agencyEmployees; |
"label" => $portfolioName, | } |
"amount" => $portfolioEmployees, | $nodes[] = Array( |
"color" => "#".$portfolioColor, | "label" => $portfolioName, |
"children" => $subnodes | "amount" => $portfolioEmployees, |
); | //"color" => "#" . $portfolioColor, |
$total += $portfolioEmployees; | "children" => $subnodes |
); | |
$total += $portfolioEmployees; | |
} | } |
$data = Array( | $data = Array( |
"label" => "Australian Federal Government", | "label" => "Australian Federal Government", |
"amount" => $total, | "amount" => $total, |
"color" => "#000000", | //"color" => "#000000", |
"children" => $nodes | "children" => $nodes |
); | ); |
echo "var data =eval('('+'" . json_encode($data) . "'+')');"; | echo "var data =eval('('+'" . json_encode($data) . "'+')');"; |
?> | ?> |
new BubbleTree({ | new BubbleTree({ |
data: data, | data: data, |
container: '.bubbletree' | container: '.bubbletree' |
}); | }); |
}); | }); |
</script> | </script> |
</head> | </head> |
<body> | <body> |
<div class="bubbletree-wrapper"> | <div class="bubbletree-wrapper"> |
<div class="bubbletree"></div> | <div class="bubbletree"></div> |
</div> | </div> |
</body> | </body> |
</html> | </html> |
<?php | <?php |
include_once('include/common.inc.php'); | include_once('include/common.inc.php'); |
include_header(); | include_header(); |
function displayValue($key, $value, $mode) { | function displayValue($key, $value, $mode) { |
global $db, $schemas; | global $db, $schemas; |
if ($mode == "view") { | if ($mode == "view") |