<?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(); | |
?> | |
<!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; | $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 (isset($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); | } |
if (isset($agencyEmployeesArray["2010-2011"]["value"])) { | if (isset($row->value->statistics->employees)) { |
$employees = $agencyEmployeesArray["2010-2011"]["value"]; | $agencyEmployeesArray = object_to_array($row->value->statistics->employees); |
} else { | if (isset($agencyEmployeesArray["2010-2011"]["value"])) { |
// get last year that is recorded? throw error? | $employees = $agencyEmployeesArray["2010-2011"]["value"]; |
continue; | } else { |
} | // 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; | if (!($employees > 0)) { |
$agencies[$portfolioid][$row->value->name] = $employees; | $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> |
google-site-verification: google676a414ad086cefb.html | |
<?php | <?php |
date_default_timezone_set("Australia/Sydney"); | date_default_timezone_set("Australia/Sydney"); |
$basePath = ""; | $basePath = ""; |
if (strstr($_SERVER['PHP_SELF'], "alaveteli/") | if (strstr($_SERVER['PHP_SELF'], "alaveteli/") |
|| strstr($_SERVER['PHP_SELF'], "admin/") | || strstr($_SERVER['PHP_SELF'], "admin/") |
|| strstr($_SERVER['PHP_SELF'], "lib/") | || strstr($_SERVER['PHP_SELF'], "lib/") |
|| strstr($_SERVER['PHP_SELF'], "include/")) | || strstr($_SERVER['PHP_SELF'], "include/")) |
$basePath = "../"; | $basePath = "../"; |
include_once ('couchdb.inc.php'); | include_once ('couchdb.inc.php'); |
include_once ('template.inc.php'); | include_once ('template.inc.php'); |
require_once $basePath.'lib/Requests/library/Requests.php'; | require_once $basePath.'lib/Requests/library/Requests.php'; |
Requests::register_autoloader(); | Requests::register_autoloader(); |
# Convert a stdClass to an Array. http://www.php.net/manual/en/language.types.object.php#102735 | # Convert a stdClass to an Array. http://www.php.net/manual/en/language.types.object.php#102735 |
function object_to_array(stdClass $Class) { | function object_to_array(stdClass $Class) { |
# Typecast to (array) automatically converts stdClass -> array. | # Typecast to (array) automatically converts stdClass -> array. |
$Class = (array) $Class; | $Class = (array) $Class; |
# Iterate through the former properties looking for any stdClass properties. | # Iterate through the former properties looking for any stdClass properties. |
# Recursively apply (array). | # Recursively apply (array). |
foreach ($Class as $key => $value) { | foreach ($Class as $key => $value) { |
if (is_object($value) && get_class($value) === 'stdClass') { | if (is_object($value) && get_class($value) === 'stdClass') { |
$Class[$key] = object_to_array($value); | $Class[$key] = object_to_array($value); |
} | } |
} | } |
return $Class; | return $Class; |
} | } |
# Convert an Array to stdClass. http://www.php.net/manual/en/language.types.object.php#102735 | # Convert an Array to stdClass. http://www.php.net/manual/en/language.types.object.php#102735 |
function array_to_object(array $array) { | function array_to_object(array $array) { |
# Iterate through our array looking for array values. | # Iterate through our array looking for array values. |
# If found recurvisely call itself. | # If found recurvisely call itself. |
foreach ($array as $key => $value) { | foreach ($array as $key => $value) { |
if (is_array($value)) { | if (is_array($value)) { |
$array[$key] = array_to_object($value); | $array[$key] = array_to_object($value); |
} | } |
} | } |
# Typecast to (object) will automatically convert array -> stdClass | # Typecast to (object) will automatically convert array -> stdClass |
return (object) $array; | return (object) $array; |
} | } |
function dept_to_portfolio($deptName) { | function dept_to_portfolio($deptName) { |
return trim(str_replace("Department of", "", str_replace("Department of the", "Department of", $deptName))); | return trim(str_replace("Department of", "", str_replace("Department of the", "Department of", $deptName))); |
} | } |
function phrase_to_tag ($phrase) { | function phrase_to_tag ($phrase) { |
return str_replace(" ","_",str_replace("'","",str_replace(",","",strtolower($phrase)))); | return str_replace(" ","_",str_replace("'","",str_replace(",","",strtolower($phrase)))); |
} | } |
function local_url() { | |
return "http://" . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), '/\\') . "/"; | |
} | |
function GetDomain($url) | function GetDomain($url) |