USAspending.gov data is available for anyone to access via Amazon Relational Database Service (RDS).
USAspending.gov is a government website launched in 2007 to provide access to the federal spending data mandated by the Federal Funding Accountability and Transparency Act of 2006. USAspending.gov includes data on all spending by the federal government, including contracts, grants, loans, employee salaries, and more. This data can be used by researchers, entrepreneurs, and anyone interested in analyzing how federal tax dollars are spent.
The USAspending.gov database is available as a PostgreSQL snapshot on Amazon RDS, and is updated weekly. The snapshot provides bulk access to the entire USAspending.gov database that powers the USAspending.gov API.
For more information about this data, please visit the USAspending.gov API documentation. Their API repository on GitHub includes open source software that includes python models for the database structure in this RDS snapshot, as well as the source code for the API that makes use of this database.
You can use the AWS Command Line Interface (CLI) to deploy the USAspending.gov database. The following command will copy the snapshot to a new Amazon RDS DB instance called “my-test-db-cli” in your AWS account:
aws rds restore-db-instance-from-db-snapshot --db-instance-identifier my-test-db-cli --db-snapshot-identifier arn:aws:rds:us-east-1:515495268755:snapshot:usaspending-db --region us-east-1
Once the DB instance is launched, the CLI will display information about the instance, including Endpoint.Address, which you can use to connect to the database.
After following the AWS Management Console or AWS CLI instructions above, you will have access to the full USAspending.gov database within this Amazon RDS DB instance, and you can connect to it using any PostgreSQL client using the following credentials:
username: root
password: password
database: data_store_api
If you use psql, you could access the database using this command:
psql -h my-endpoint.rds.amazonaws.com -U root -d data_store_api
It is recommended that you change the database password as soon as you access it.
If you cannot connect to the DB instance but think you should be able to, you may need to check your VPC Security Groups and make sure inbound and outbound traffic on the port (usually 5432) is allowed from where you are connecting.
Please raise an issue on the USAspending.gov Website GitHub repository if you have any questions or concerns about this dataset.