A web app that provides filtering and visualizations for compliants received by the Consumer Finance Protection Bureau (CFPB).
This web application runs on a MEAN stack and was originally developed in 2016 using the package versions available at that time. See "Additional Notes"
- MongoDB Community Server collection to store data from CPFB public dataset.
- Express middleware to connect API routes to Node.js server.
- AngularJS for conroller to interact with API routes.
- Node.js for app server and queries to MongoDB.
- Bootstrap for UI theme & custom CSS.
- Google Charts API for visualizations.
Consumer Complaints Database is a public dataset available via consumerfinance.gov.
Clone the repo and at the root folder run
npm install
Install MongoDB for your development machine. I use Robomongo aka Studio3T for a GUI client.
- Download the CSV file from CPFB link here
- Save as file in /data/ConsumerComplaints.csv
- Modify /data/dataset_header.txt for the columns you are interested in.
- Windows - run /data/Import_Dataset.bat to import the collection into MongoDB
- Mac/Linux - run /data/Import_Dataset.sh to run the script that imports the collection into MongoDB
Using the /config.js file, update to your mongo_port
and node_port
for the ports on which you wish to run MongoDB and Node.js respectively.
Once collection has been imported to database and app configured, run npm start
and you will see the console messages shown below
$ npm start
> [email protected] start C:\Users\navin\Documents\Projects\Github\AngryConsumer
> node server.js
mongodb uri: mongodb://localhost:27017/?ssl=false
Connected to 'consumer-finance-explore' database
Express server listening on port 3000, DB is MongoDB
In your browser, open http://localhost:3000/ to see the app
This app has been hosted at https://angry-consumer.nvarma.com/ with data from 2020.
This web application runs on a MEAN stack and was originally developed in 2016 using the package versions available at that time. The data has been updated over the years and the last update was in 2020. This was a project to learn developing in the MEAN stack when it was up and coming library, coding practices were mostly to follow clear separation of API routes, Node server logic and DB queries to present them in cool looking UI views. Most of the code is self-explanatory with little comments strewn around.