Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions bin/xml-datasets/xml-dataset-download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ case $YEAR in
2024)
declare -a agencies=(oncd abmc doj achp acus afrh asc ceq cfa cfpb cftc cia cigie cncs co cppbsd cpsc csb csosa dc dfc dhs dnfsb doc dod doe doi dol dos dot eac ed eeoc epa fca fcc fcsic fdic fec ferc ffiec fhfa flra fmc fmcs fmshrc fomc frb frtib ftc gcerc gsa ha hhs hstsf hud iaf imls ipec fpisc jmmff lsc mcc mkuf mmc mspb nara nasa ncd ncpc ncua nea neh nigc nlrb nmb nrc nrpc nsf ntsb nw nwtrb odni oge omb ondcp onhir opm oppr osc oshrc ostp pbgc pc pclob prc pt usrrb sba sec sigar ssa ssab sss stb treasury tva usab usadf usagm usaid usccr usda usibwc usich usip usitc usps ustda ustr va)
;;
2025)
declare -a agencies=(oncd abmc doj achp acus afrh asc ceq cfa cfpb cftc cia cigie cncs co cppbsd cpsc crccrrb csb csosa dc dfc dhs dnfsb doc dod doe doi dol dos dot eac ed eeoc epa exim fca fcc fcsic fdic fec ferc ffiec fhfa flra fmc fmcs fmshrc fomc frb frtib ftc gcerc gsa ha hhs hstsf hud iaf imls ipec fpisc jmmff lsc mcc mkuf mmc mspb nara nasa ncd ncpc ncua nea neh nigc nlrb nmb nrc nrpc nsf ntsb nw nwtrb odni oge omb ondcp opm osc oshrc ostp pbgc pc pclob prc pt usrrb sba sec sigar ssa sss stb treasury tva usab usagm usaid usccr usda usibwc usich usitc usps ustda ustr va)
;;
*)
echo -n "Year unavailable: ${YEAR}"
exit;
Expand Down
3 changes: 3 additions & 0 deletions features/AgencySearch.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ Feature: Agency Search
Given I am on "/agency-search.html"
And I wait 60 seconds

Scenario: The sorting works to show the most popular components first
Then I should see "Department of Homeland Security"

Scenario: The agency type-ahead works
Then I should see "Search an agency name or keyword"
And I enter "ENV" into the agency search box
Expand Down
2 changes: 1 addition & 1 deletion js/actions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export const requestActions = {
});

const referenceFields = includeReferenceFields || {
agency_component: ['title', 'abbreviation', 'agency', 'description', 'status'],
agency_component: ['title', 'abbreviation', 'agency', 'description', 'status', 'num_requests'],
agency: ['name', 'abbreviation', 'description', 'category'],
'agency.category': ['name'],
};
Expand Down
2 changes: 2 additions & 0 deletions js/models/agency.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ const defaults = {
// component_count is not from the API, we track the number of components to
// determine is_centralized
component_count: 0,
// Same with num_requests.
num_requests: 0,
description: {},
id: null,
links: {},
Expand Down
1 change: 1 addition & 0 deletions js/models/agency_component.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const defaults = {
formFields: new List(),
id: null,
links: new Map(),
num_requests: 0,
paper_receiver: null, // foia_personnel
portal_submission_format: 'email',
public_liaisons: [], // foia_personnel
Expand Down
6 changes: 4 additions & 2 deletions js/pages/foia_dataset_download.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ function FoiaDatasetDownload() {
<div className="usa-grid">
<div className="usa-width-one-whole">
<h1>FOIA Data Set Downloads</h1>
<p>The following compressed files are complete archives of the agency FOIA data sets for the years 2008 through 2023 in .xml format.</p>
<p>The following compressed files are complete archives of the agency FOIA data sets for the years 2008 through 2025 in .xml format.</p>
<ul>
<li><a href="/2025-FOIASetFull.zip">Download the full 2025 FOIA Data set</a> (.zip format)</li>
<li><a href="/2024-FOIASetFull.zip">Download the full 2024 FOIA Data set</a> (.zip format)</li>
<li><a href="/2023-FOIASetFull.zip">Download the full 2023 FOIA Data set</a> (.zip format)</li>
<li><a href="/2022-FOIASetFull.zip">Download the full 2022 FOIA Data set</a> (.zip format)</li>
Expand All @@ -29,8 +30,9 @@ function FoiaDatasetDownload() {
</ul>
</div>
<div className="usa-width-one-whole pt5">
<p>The following compressed files are complete archives of governmentwide FOIA data sets for the years 2008 through 2023 in .csv format.</p>
<p>The following compressed files are complete archives of governmentwide FOIA data sets for the years 2008 through 2025 in .csv format.</p>
<ul>
<li><a href="/downloads/all_agencies_csv_2025.zip">Download the full 2025 All Agency Data set</a> (.zip format)</li>
<li><a href="/downloads/all_agencies_csv_2024.zip">Download the full 2024 All Agency Data set</a> (.zip format)</li>
<li><a href="/downloads/all_agencies_csv_2023.zip">Download the full 2023 All Agency Data set</a> (.zip format)</li>
<li><a href="/downloads/all_agencies_csv_2022.zip">Download the full 2022 All Agency Data set</a> (.zip format)</li>
Expand Down
22 changes: 17 additions & 5 deletions js/stores/agency_component.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,30 @@ class AgencyComponentStore extends Store {
// Add the agency to the index of centralized agencies
centralizedAgencyIndex[agency.id] = true;
}

// Add a title property for common displayKey
return { ...agency.toJS(), title: agency.name };
// Count up the agency's num_requests total from components.
let numRequests = 0;
this.getAgencyComponentsForAgency(agency.id).forEach((component) => {
if (component.num_requests) {
numRequests += parseInt(component.num_requests, 10) || 0;
}
});
// Add a title and num_requests property for common displayKey
return {
...agency.toJS(),
title: agency.name,
num_requests: numRequests,
};
})
.toJS()
.sort((a, b) => collator.compare(a.title, b.title))
.sort((a, b) => (b.num_requests - a.num_requests)
|| collator.compare(a.title, b.title))
// Include decentralized agency components in typeahead
.concat(
this.state.agencyComponents.toJS().filter(
(agencyComponent) => !(agencyComponent.agency.id in centralizedAgencyIndex),
)
.sort((a, b) => collator.compare(a.title, b.title)),
.sort((a, b) => (b.num_requests - a.num_requests)
|| collator.compare(a.title, b.title)),
)
.map((/** @type FlatListItem */ a) => {
if (!a.title) {
Expand Down
Binary file added www.foia.gov/2025-FOIASetFull.zip
Binary file not shown.
Binary file added www.foia.gov/downloads/all_agencies_csv_2025.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion www.foia.gov/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: home
hero:
hed: The basic function of the Freedom of Information Act is to ensure informed citizens, vital to the functioning of a democratic society.
hed: The basic function of the Freedom of Information Act is to ensure an informed citizenry, which is vital to the functioning of a democratic society.
text: This site can help you determine if filing a FOIA request is the best option for you and help you create your request when you’re ready.
section_one:
hed: Do research and determine if you need to make a FOIA request, then get ready.
Expand Down
Loading