From: Maxious Date: Sun, 23 Sep 2012 07:05:49 +0000 Subject: add prefix for positions X-Git-Url: https://maxious.lambdacomplex.org/git/?p=disclosr.git&a=commitdiff&h=9b494cfdc6446fe3b632bc59fb665c77d9a6dc45 --- add prefix for positions Former-commit-id: 2eb28a3a36f76484db67773b1c6df6f238257aad --- --- a/.gitmodules +++ b/.gitmodules @@ -10,16 +10,22 @@ [submodule "lib/Requests"] path = lib/Requests url = https://github.com/rmccue/Requests.git -[submodule "javascripts/flotr2"] - path = javascripts/flotr2 +[submodule "js/flotr2"] + path = js/flotr2 url = https://github.com/HumbleSoftware/Flotr2.git [submodule "lib/phpquery"] path = lib/phpquery url = https://github.com/TobiaszCudnik/phpquery.git -[submodule "javascripts/sigma"] - path = javascripts/sigma +[submodule "js/sigma"] + path = js/sigma url = https://github.com/jacomyal/sigma.js.git -[submodule "javascripts/bubbletree"] - path = javascripts/bubbletree +[submodule "js/bubbletree"] + path = js/bubbletree url = https://github.com/okfn/bubbletree.git +[submodule "lib/querypath"] + path = lib/querypath + url = https://github.com/technosophos/querypath.git +[submodule "lib/amon-php"] + path = lib/amon-php + url = https://github.com/martinrusev/amon-php.git --- a/about.php +++ b/about.php @@ -1,6 +1,6 @@

About/FAQ

@@ -8,10 +8,12 @@

What is this?

Disclo.gs is a project to monitor Australian Federal Government agencies -compliance with their "proactive disclosure requirements". +compliance with their "proactive disclosure requirements" to make a transparency league table as suggested by gov2 taskforce http://gov2.net.au/blog/2009/09/19/a-league-ladder-of-psi-openness/.

Attributions

-National Archives of Australia, Australian Governments’ Interactive Functions Thesaurus, 2nd edition, September 2005, published at http://www.naa.gov.au/recordkeeping/thesaurus/index.htm. - +National Archives of Australia, Australian Governments’ Interactive Functions Thesaurus, 2nd edition, September 2005, published at http://www.naa.gov.au/recordkeeping/thesaurus/index.htm
+data.gov.au http://data.gov.au/dataset/directory-gov-au-full-data-export/
+directory.gov.au
+australia.gov.au http://australia.gov.au/about/copyright

Open everything

All documents released CC-BY 3 AU Open source git @ --- /dev/null +++ b/admin/agls.php @@ -1,1 +1,35 @@ + + namefunction"; +$db = $server->get_db('disclosr-agencies'); +try { + $agencies = $db->get_view("app", "byCanonicalName", null, true)->rows; + + + if ($agencies) { + foreach ($agencies as $row) { + + echo "" . $row->value->name . ""; + if (isset($row->value->metaTags)) { + if (is_array($row->value->metaTags)) { + $tags =$row->value->metaTags; + } else { + $tags = object_to_array($row->value->metaTags); + } + if (isset($tags['AGLS.Function'])) { + echo "" . $tags['AGLS.Function'] . ""; + } + } + echo ""; + } + } +} catch (SetteeRestClientException $e) { + setteErrorHandler($e); +} +include_footer(); +?> + --- a/admin/conflicts.php +++ b/admin/conflicts.php @@ -1,7 +1,7 @@ get_db('disclosr-agencies'); + +try { + $agencies = $db->get_view("app", "byCanonicalName", null, true)->rows; + //print_r($rows); + foreach ($agencies as $agency) { + //echo $agency->value->name . " ".$agency->value->website."
\n"; + // print_r($agency); + //hasRestricitiveLicence" hasRestrictiveLicense -> has Restrictive Licence + // "hasYoutube" -> Tube + // "comment" -> "comments" + if (!isset($agency->value->metaTags) && isset($agency->value->website)) { + echo $agency->value->name . " ".$agency->value->website."
\n"; + $agency->value->metaTags = Array(); + $request = Requests::get($agency->value->website); + $html = phpQuery::newDocumentHTML($request->body); + phpQuery::selectDocument($html); + foreach (pq('meta')->elements as $meta) { + $tagName = $meta->getAttribute('name');; + $content = $meta->getAttribute('content'); + if ($tagName != "") { +echo "$tagName == $content
\n"; + $agency->value->metaTags[$tagName] = $content; + } + } + //print_r($agency->value->metaTags); + $db->save($agency->value); + echo "
"; + flush(); + } + } +} catch (SetteeRestClientException $e) { + setteErrorHandler($e); +} +?> + --- /dev/null +++ b/admin/naa-agift-tree.php @@ -1,1 +1,2504 @@ + + + + Demo of the tree layout in D3.js + + + + + +
+
+ + + + + + + + + + --- a/alaveteli/exportAgencies.csv.php +++ b/alaveteli/exportAgencies.csv.php @@ -1,20 +1,6 @@ id; $row["name"] = trim($agency->value->name); - if (isset($agency->value->foiEmail)) { - $row["request_email"] = $agency->value->foiEmail; - } else { - if ($agency->value->orgType == "FMA-DepartmentOfState") { - $row["request_email"] = "foi@" . GetDomain($agency->value->website); - } else { - $row["request_email"] = $foiEmail[$agency->value->parentOrg]; + $row["request_email"] = (isset($agency->value->foiEmail) ? $agency->value->foiEmail : ""); + $row["short_name"] = (isset($agency->value->shortName) ? $agency->value->shortName : ""); + $row["notes"] = (isset($agency->value->description) ? $agency->value->description : ""); + + $otherBodies = Array(); + if (isset($agency->value->foiBodies)) { + $otherBodies = array_merge($otherBodies, $agency->value->foiBodies); + } + if (isset($agency->value->positions)) { + $positions = Array(); + foreach ($agency->value->positions as $position) { + $positions[] = "Office of the ".$position; } + $otherBodies = array_merge($otherBodies, $positions); } - if (isset($agency->value->shortName)) { - $row["short_name"] = $agency->value->shortName; - } else { - $row["short_name"] = shortName($agency->value->name); + sort($otherBodies); + if (count($otherBodies) > 0) { + $row["notes"] .= "
This department also responds to requests for information held by " . implode(", ", $otherBodies); } - $row["notes"] = ""; + $row["publication_scheme"] = (isset($agency->value->infoPublicationSchemeURL) ? $agency->value->infoPublicationSchemeURL : ""); $row["home_page"] = (isset($agency->value->website) ? $agency->value->website : ""); if ($agency->value->orgType == "FMA-DepartmentOfState") { - $row["tag_string"] = $tag[$agency->value->_id] . " " . $agency->value->orgType; + $row["tag_string"] = $tag[$agency->value->_id]; } else { - $row["tag_string"] = $tag[$agency->value->parentOrg] . " " . $agency->value->orgType; + $row["tag_string"] = $tag[$agency->value->parentOrg]; } - + $row["tag_string"] .= " " . $agency->value->orgType; + $row["tag_string"] .= " federal"; fputcsv($fp, array_values($row)); - - if (isset($agency->value->foiBodies)) { - foreach ($agency->value->foiBodies as $foiBody) { - $row['name'] = iconv("UTF-8", "ASCII//TRANSLIT",$foiBody); - $row["short_name"] = shortName($foiBody); - fputcsv($fp, array_values($row)); - } - } } } } catch (SetteeRestClientException $e) { --- a/bubbletree.php +++ b/bubbletree.php @@ -5,13 +5,13 @@ Minimal BubbleTree Demo - - - - - - - + + + + + +