Repository is being kept for information purposes. Please see https://github.com/cfpb/consumer-credit-trends-data/ for current development and archival data.
Explore recent developments in consumer credit markets.
Nothing presented in the issues or in this repo is a final product unless it is marked as such or appears on http://www.consumerfinance.gov/data-research/consumer-credit-trends/. Some copy or formulas may be replaced with dummy text to ensure that we follow any and all privacy and security procedures at the CFPB. All the designs, layouts, and evolution of our decision making process are accurate.
We are working under an agile framework, and plan to use this repo to publish, receive feedback, and iterate on that feedback as often as possible. Our goal is to see user trends and reactions to our work. We want as much feedback as possible to help us make informed decisions so that we can make this tool better. Unfortunately, we will not be able to respond to every piece of feedback or comment we receive, but intend to respond with our progress through the evolution of the tool.
This project requires that you have Node.js installed.
To run this website locally:
- Clone repo
- Create an
env.js
file and add your Github personal access token there:
cp src/static/js/env_SAMPLE.js src/static/js/env.js
- In Terminal, run
./setup.sh
from the root directory. This will install the required Node modules for the project. - Run the following command:
gulp watch
This should open a new window in your browser with the /dist/index.html
file visible at http://localhost:3000/
When working on feature branches that are still in development, use the workflow described above in the Installation instructions.
For publishing the graphs to compiled HTML for use in a production environment, use the following Release workflow.
- Check out and pull from the latest
gh-pages
branch from upstream.
git checkout gh-pages
git pull upstream gh-pages
- Create a new branch and check it out locally:
git checkout -b release-v2000
- Merge your feature branch work into your release branch locally:
git merge feature-branch-2000
- Build the front end using the watch task:*
gulp watch
- In a new Terminal window, run the release task to generate your production-ready HTML:
gulp release
- Review your production HTML locally to check that it's ready to commit (no server required - just open the HTML file at
consumer-credit-trends/index.html
in your browser). - Commit your production ready files,
index.html
and thecharts
folder, to your release branch and push to Github:
git add index.html
git add charts
git commit -m ''
git push origin release-v2000
- Submit your pull request to the
gh-pages
branch for review. - Optional: test your production pages in Github by merging your release branch to your fork of
gh-pages
. You can then post the link to your PR for others to easily review.
git checkout gh-pages
git merge release-v2000
git push origin gh-pages
- Once it's merged, visit https://cfpb.github.io/consumer-credit-trends/ to view the published HTML files.
*Note that you must run the watch
task so that the release task can access your localhost environment to grab the rendered svg code.
Documentation about the data is available and contains definitions for each column and field value in the csv files.
Common errors and their causes:
window.setTimeout( getSVG, 10000 );
^
TypeError: Cannot read property 'setTimeout' of undefined
This error happens when you run gulp release
without a local server running. Make sure you have the gulp watch
task running in a separate Terminal window when you run gulp release
. See Release Workflow instructions for more details.
Use the issue tracker to follow the development conversation. If you find a bug not listed in the issue tracker, please [file a bug report](https://github.com/cfpb/consumer-credit-trends/issues/new?body= %23%23%20URL%0D%0D%0D%23%23%20Actual%20Behavior%0D%0D%0D%23%23%20Expected%20Behavior %0D%0D%0D%23%23%20Steps%20to%20Reproduce%0D%0D%0D%23%23%20Screenshot&labels=bug).
We welcome your feedback and contributions. See the contribution guidelines for more details.
Additionally, you may want to consider contributing to the Chart Builder, which is the chart generator and library used to create the d3 data visualizations in this project.
This project uses:
- Capital Framework for its user interface and layout components.
- CFPB Chart Builder for its data visualizations.