Yesterday, I scraped texts from the Freedom of Information site in order to determine how the agencies are responding to the requests for publicly-available data. Anyway, since the FOI Order was signed, there were already 1597 requests as of the time that I scraped the data. (At the moment, there are already 1600. Not bad. I am working on automatically updating my data as soon as new information becomes available online.
Below, I show the codes and the outputs for the top 20 agencies with the most number of requests for data.
We load the required packages first, and use the data that I stored in the file foi_requests.csv.
library(tidyverse)
foi <- read_csv("foi_requests.csv")
Here, we plot the total number of requests for the top 20 agencies with the most number of requests for information.
foi %>%
group_by(requestee) %>%
summarise(total_req = n()) %>%
ungroup() %>%
top_n(20) %>%
mutate(requestee = reorder(requestee, total_req)) %>%
ggplot(aes(requestee, total_req)) +
geom_bar(stat = "identity") +
theme_classic() +
labs(x = "Agency", y = "Total Requests") +
ggtitle("Top 20 Government Agencies with the\nMost Number of Government Requests") +
coord_flip()
It might be more insightful to see the distribution of actions taken by each of the agencies on the requests, relative to the number of total requests each agency have.
action_order <- c("SUCCESSFUL", "DENIED", "ACCEPTED", "CLOSED", "AWAITING", "EXTENDED", "PARTIALLY", "PENDING", "PROCESSING")
foi %>%
group_by(requestee, action) %>%
summarise(total_req = n()) %>%
mutate(total_req_action = sum(total_req)) %>%
ungroup() %>%
mutate(requestee = reorder(requestee, total_req_action)) %>%
filter(total_req_action > 18) %>%
ggplot(aes(requestee, total_req, fill = action)) +
geom_bar(stat = "identity") +
theme_classic() +
scale_fill_discrete(breaks = action_order) +
labs(fill = "Action") +
xlab("Agency") +
ylab("Total Requestes") +
ggtitle("Breakdown of Actions of Agencies\nwith Most Number of FOI Requests") +
coord_flip()
And it might be more insightful to see the proportion of actions taken on the requests by each of the agencies.
foi %>%
group_by(requestee, action) %>%
summarise(total_req = n()) %>%
mutate(total_req_action = sum(total_req)) %>%
mutate(percent_action = round(total_req / total_req_action * 100, 2)) %>%
ungroup() %>%
mutate(requestee = reorder(requestee, total_req_action)) %>%
filter(total_req_action > 18) %>%
ggplot(aes(requestee, percent_action, fill = action)) +
geom_bar(stat = "identity") +
theme_classic() +
scale_fill_discrete(breaks = action_order) +
labs(fill = "Action") +
xlab("Agency") +
ylab("Percent Requests") +
ggtitle("Breakdown of Actions of Agencies\nwith Most Number of FOI Requests in Percent") +
coord_flip()
So how have the agencies responded to the requests? What proportion of the requests are successfully granted? Attached are three photos of the top 20 agencies with the most number of requests. These graphs could give us some insights.
Note that PSA (Philippines Statistics Authority), understandably, had the most number of requests, and that more than half of these requests are granted.
It is also noteworthy that PCOO, the Presidential Communications Operations Office, denied most of the requests on their agency. (And yet they have “COMMUNICATIONS” in the name of their agency.) The same is true for DILG, DENR, NAP (National Archives of the Philippines), and DTI. In fact, #DENR and #DTI have almost 100% denial rate! Unfortunately, there are no reasons specified why the requests were denied. However, one can only surmise that it has something to do with the dates of coverage of the request, the availability of data–which might mean that they don’t have soft copies stored in a database somewhere–the manpower required to encode the data, and the overall data infrastructure that we have in our country.
It is also very noteworthy that #LTO has 100% pending requests and #LTFRB has almost 100% pending requests! What are they doing in those agencies that they can’t act immediately on requests?
On the other hand, the DOJ (Department of Justice) seems to have the largest proportion of successful requests among the agencies with a total of more than 18 requests.
But are there agencies with 100% request success rate? Yes. However, they only have few requests. These agencies are NHA (7), PCW (4), BLGF (2), PCSO (2), and CESB (1). On the other hand, the agencies with 100% denial rate are LGA (14), PPA (12), NLP (2), NTC (1), and PCC (1).
Some other questions need to be answered and will be explored in next posts:
If you have some more questions about the FOI that you want answered, please feel free to comment below.