--- a/documents/disclogsList.php
+++ b/documents/disclogsList.php
@@ -8,6 +8,11 @@
Agency Name | Disclosure Log URL recorded? | Do we monitor this URL? |
";
$agenciesdb = $server->get_db('disclosr-agencies');
$docsdb = $server->get_db('disclosr-documents');
+$agencies = 0;
+$disclogs = 0;
+$red = 0;
+$green = 0;
+$orange = 0;
try {
$rows = $agenciesdb->get_view("app", "byCanonicalName", null, true)->rows;
@@ -19,26 +24,30 @@
if ($ENV == "DEV")
echo "
(" . $row->id . ")";
echo "\n";
-
+$agencies++;
echo "";
if (isset($row->value->FOIDocumentsURL)) {
+ $disclogs++;
echo ''
. $row->value->FOIDocumentsURL . '';
if ($ENV == "DEV")
echo ' ('
. 'view local copy)';
} else {
- echo "✘";
+ echo "✘";
}
echo " | \n";
if (isset($row->value->FOIDocumentsURL)) {
if (file_exists("./scrapers/" . $row->id . '.py')) {
- echo "✔";
+ echo "✔";
+ $green++;
} else if (file_exists("./scrapers/" . $row->id . '.txt')) {
- echo "▬";
+ echo "▬";
+ $orange++;
} else {
- echo "✘";
+ echo "✘";
+ $red++;
}
}
echo " | \n";
@@ -48,5 +57,9 @@
setteErrorHandler($e);
}
echo "";
+echo $agencies." agencies, ".round(($disclogs/$agencies)*100)."% with disclosure logs; "
+.round(($green/$disclogs)*100)."% logs with scrapers ".round(($red/$disclogs)*100)."% logs without scrapers ".round(($orange/$disclogs)*100)."% logs Work-In-Progress scrapers ";
+
include_footer_documents();
?>
+