Git Product home page Git Product logo

retirement's Introduction

⚠️ THIS REPO IS DEPRECATED (June 3, 2021) ⚠️

Please find the source code moved to https://github.com/cfpb/consumerfinance.gov/tree/main/cfgov/retirement_api


Build StatusCoverage Status

Retirement: Before You Claim

This is a project aimed at helping Americans make choices about retirement, including when to claim Social Security benefits.

  • Status: Beta

Edición español

Tú puedes ver este app en español por poner /es al parte final del url.
(You can view this app in Spanish by adding /es to the end of the url.)

Setup dependencies

Code dependencies

For Python testing

For browser testing

Installation

The tool is a Django module, intended to be installed in a larger Django project. But it can run on its own in a Mac or Linux environment, assuming you have the setup dependencies of pip, virtualenv and virtualenvwrapper installed. Here's how:

Go to where you want the project to be created, make a virtual environment, clone this repository (or your own fork of it) and install requirements and settings.

mkvirtualenv retirement
git clone https://github.com/cfpb/retirement.git
cd retirement
setvirtualenvproject
pip install -e '.[testing]'

Build the front-end requirements and the JavaScript files.

./frontendbuild.sh

Create a standalone database and load the app's tables and content.

python manage.py migrate
python manage.py loaddata retirement_api/fixtures/retiredata.json

Fire up a development server.

python manage.py runserver

The "Before You Claim" page should load at localhost:8000/before-you-claim/.

Fonts

This application uses a proprietary licensed font (Avenir Next) that is not included in this repository.

By default it will try to load this font from the Fonts.com content delivery network (CDN). This behavior can be modified to instead try to load the font locally from the retirement_api/static/retirement/webfonts/ directory by setting @use-font-cdn to false and rebuilding the assets with gulp build. Restart the local web server once you've made this change.

For Bureau employees or others with access to our private fonts repository, you can perform this step by creating a symbolic link to your local copy of the font files:

ln -s /path/to/cfgov-fonts/fonts/ retirement_api/static/retirement/webfonts

Usage notes

  • The app sends http requests to the Social Security Administration's Quick Calculator to get benefit estimates for the chart.

How to run software tests

  • To run the Python tests, install tox and then run it:
tox
  • You can run the JavaScript tests with:
npm test

Additional documentation

Getting involved

If you find a bug or see a way to improve the project, we'd love to hear from you. Add an issue, or fork the project and send us a pull request with your suggested changes.


Open source licensing info

  1. TERMS
  2. LICENSE
  3. CFPB Source Code Policy

retirement's People

Contributors

alexm118 avatar amymok avatar anselmbradford avatar chosak avatar contolini avatar cwdavies avatar higs4281 avatar hillaryj avatar jimmynotjim avatar marcesher avatar marteki avatar mistergone avatar niqjohnson avatar ooblioob avatar orlandosoto avatar richaagarwal avatar rosskarchner avatar schbetsy avatar scotchester avatar sebworks avatar serenaestrella avatar virginiacc avatar virtix avatar willbarton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

retirement's Issues

Main nav issue

Not sure if this is a wider issue or not...

This is in Chrome 43.0.2357.134, Mac OSX 10.10.3

Update npm packages

Regular Expression Denial of Service

High severity
Vulnerable module: minimatch
Detailed paths

Introduced through: retirement@cfpb/retirement#ebcfc7198ec2a9d390ea7f884a931f25dffe1646 ›
[email protected][email protected][email protected][email protected]
Introduced through: retirement@cfpb/retirement#ebcfc7198ec2a9d390ea7f884a931f25dffe1646 ›

minimatch is a minimalistic matching library used for converting glob expressions into JavaScript RegExp objects.

An attacker can provide a long value to the minimatch function, which nearly matches the pattern being matched. This will cause the regular expression matching to take a long time, all the while occupying the event loop and preventing it from processing other requests and making the server unavailable (a Denial of Service attack).

"The Regular expression Denial of Service (ReDoS) is a Denial of Service attack, that exploits the fact that most Regular Expression implementations may reach extreme situations that cause them to work very slowly (exponentially related to input size). An attacker can then cause a program using a Regular Expression to enter these extreme situations and then hang for a very long time."

User research - first round

The team came up with the following hypothesis for our first round of testing (that could potentially flow through to further rounds):

If we present a simple UI that progressively inquires for information a little at a time,
Then consumers will become engaged in the process of learning more about their own retirement.

Other questions that the team brought up to answer: (go ahead and comment to add more, guys!)

  • Is this step by step website how people in our target age group (50 - 62) want to engage in a digital product?
  • Do people think about retirement?
  • How are users creating their retirement plans?

Our first test script will also be added to this thread, for review/revision/refinement/whatever.

Prorating increases in benefits after FRA

Somehow the tool is not prorating the monthly increase after FRA for cases of people who are past their FRA. For example someone who is age 69 and 11 months, should see the benefit increase at age 70 (one month later) by only (.006666666) (that is 2/3 of 1%). Therefore, in the attached example of someone born 1/1/1946 the value for age 70 should be $1,854 rather $1,989 than a full 8% as shown.

example

Result No Longer Return (also in production)

Looks like the HTML coming back from Social Security broke (also broken on the live production site). Seems that the HTML coming back from the request is no longer complete (cuts off after the commented out table), so the data points searched for in the HTML are not found.

IE8 breakage

The tool is non-functional in IE8. After clicking "Get your estimates", here's what I see:

screen shot 2015-08-28 at 16 40 14
screen shot 2015-08-28 at 16 41 04

Here are the reported JS errors:


Message: Invalid argument.
Line: 11
Char: 24781
Code: 0
URI: http://www.consumerfinance.gov/static/retirement/js/raphael-min.js

Message: Object doesn't support this property or method
Line: 489
Char: 5
Code: 0
URI: http://www.consumerfinance.gov/static/retirement/js/claiming-social-security.js

Message: Script error
Line: 0
Char: 0
Code: 0
URI: http://www.googletagmanager.com/gtm.js?id=GTM-KMMLRS

Message: Script error
Line: 0
Char: 0
Code: 0
URI: http://www.googletagmanager.com/gtm.js?id=GTM-KMMLRS

Message: Script error
Line: 0
Char: 0
Code: 0
URI: http://www.googletagmanager.com/gtm.js?id=GTM-KMMLRS

Message: Script error
Line: 0
Char: 0
Code: 0
URI: http://www.googletagmanager.com/gtm.js?id=GTM-KMMLRS

Message: Failed
Line: 11
Char: 20441
Code: 0
URI: http://www.consumerfinance.gov/static/retirement/js/raphael-min.js

Message: Failed
Line: 11
Char: 20441
Code: 0
URI: http://www.consumerfinance.gov/static/retirement/js/raphael-min.js

Message: Script error
Line: 0
Char: 0
Code: 0
URI: http://www.googletagmanager.com/gtm.js?id=GTM-KMMLRS

Testing help needed?

I see lots of good stuff going on in here,, feel free to ask me or the software delivery team if you need help setting up browser, API, performance tests, we're more than glad to help you get started :)

We'll start setting up BDD security testing for this project soon.

Extra .cf-icon code shrinks the footer buttons in the new footer

Hey FPO,

There's a small issue in the footer, where extra code for .cf-icon shrinks all the icons we have the footer. Ideally those styles should be coming in from Capital Framework and any non-standard sizing should be handled through another class to not conflict with other .cf-icons. Deleting this line should fix the issue, but L1103-1111 could be removed to have Capital Framework handle any future changes.

Current behavior

image

Viewable at http://beta.consumerfinance.gov/retirement/before-you-claim/

Expected behavior

image

Can you fix it?

@niqjohnson @mistergone 🙏

Initial sketches

Yay retirement repo! Let's start talking about our initial ideas/sketches for what this thing might be. I'll start with some of my rough sketches and a few other ideas I've been thinking about.

Excited to hear feedback and see everyone's ideas!

Sketches

Age sliders

nj-01-sliders

The first of three variations on a theme.

This concept starts off with two visualizations that compare retirement income if you claim Social Security at two different ages. This visualization can either be generic or generated from your inputs of age, income, savings, expected claiming age, etc. Initially, the visualization on the left is for a later claiming age, and the one on the right is for an earlier claiming age. We might think about including things like survivor benefits in this comparison to get you thinking about some uncomfortable facts that you might otherwise ignore (i.e. you die before your spouse).

Following that is one or more stories (either fictional or from real people) that present the claiming decision from an outside perspective.

Last, there are alternative claiming scenarios/action steps you can take to claim later if you want to.

Category comparisons

nj-02-category-comps

The second of three variations on a theme.

This has a lot of elements from the concept above, but they're more granular (Social Security income is broken out from personal savings) and explicitly compared.

Also, this concept compares lots of factors other than income that may have a bearing on your decision of when to claim: free time, declining health, etc. The examples in this concept now are mostly made up, but the idea is that your claiming decision is going to be based on more than just a Spock-like assessment of when is most financially logical.

See the effects

nj-03-see-effects

The third of three variations on a theme.

Here, a lot of the same visualizations are present from the first two concepts, but they're all overlaid on each other to give a more integrated view of your post-retirement finances. Again, this visualization may be generic or may take into account user inputs we decide to as for. As always, non-optimal claiming choices are framed as losses rather than optimal choices being framed as gains.

Following the One Graph to Rule Them All are alternate strategies that you can explore. Hitting that "see the effect" button will shift your graph to see what, say, claiming later will do for you.

This concept ends with stories from other people, again to help bring an outside perspective to the claiming decision and as a way for us to gently prompt you to think about what will happen to your plan if it doesn't go as planned (hey-o!).

Giant timeline

nj-04-timeline

A totally different approach from the first three concepts, this one pretty much requires you to put in some basic info in a previous step. From that info we whip up a timeline of your financial life from today through the great unknown showing expected income, expenses, and places where you might be leaving "money on the table." Your inputs are shown above the timeline and could be sticky so that you can see how changing an input might change your timeline.

Alongside that timeline are action steps around how you can change your financial future (claim later, work longer, pay off debt now, etc.) with links to more information, as needed.

After your timeline are alternate timelines that give you options you might not have thought of.

Action steps

nj-05-action-steps

This concept ditches a single, large visualization for a series of smaller ones and is much more focused on action items to change your claiming strategy rather than a graph of your retirement finances.

Like the previous concept, this one depends on collecting input on your current situation as a first step. From there, though, the output is organized into action items you can take to optimize your claiming strategy. Each step would have a little visualization with it to show how implementing the item would change your plan. We could have a repository of lots of different action items and only show the, say, three most relevant to each user.

This might be a good concept to explore if we want to move away from gathering the standard info (age, income, etc.) in the first step and instead want to focus on questions that get more at why you may want to claim early, like "are you worried about being forced into retirement by a layoff?" or "do you expect to retire early because of health concerns?" The action items could be a good way to start addressing those reasons for not claiming optimally (this idea comes from Melissa's research, "According to EBRI's (2006) report, 38 percent of individuals reported retiring early; although 39 percent of early retirees surveyed said they did so because they could afford to, 24 percent reported that they wanted to do something else and 22 percent indicated that they retired early for family reasons. If individuals in those latter two groups have little personal retirement savings and no pension, they will quite likely claim Social Security benefits upon retiring." http://www.ssa.gov/policy/docs/ssb/v71n4/v71n4p15.html)

Just wait!

nj-06-just-wait

This concept came from an offhand comment I made after a meeting that maybe our MVP is a single web page that says "Just wait six months!"

What if we actually structure the tool that way, though? You come to the tool, tell us when you're thinking of claiming and how long you might be willing to hold off (or another consideration that might impact your claiming strategy, like a layoff or sick spouse), and we show you what would happen. You'd have the option of entering more information about your specific situation to get a really customized report. We'd also give you action items on how you can fit whatever event you've selected into your retirement plan.

Affective forecasts

nj-07-affective-forecasts

This concept is heavily influenced by the "Predicting Future Happiness" section at http://www.ssa.gov/policy/docs/ssb/v71n4/v71n4p15.html. Basically, humans are terrible at accurately predicting how they'll feel in the future, so we'll help them out by asking (sometimes pointed) questions that could affect their decision of how to claim. We'll provide feedback based on their answers.

The sketch has all the questions and feedback on a single page, but questions could come on one page, followed by feedback on the next.

Other ideas

  • One-month graph view instead of multi-year graph to focus in on a single, representative month and prevent information overload
  • Play with sliders to see how changing inputs affects outputs

LXML Usage

I noted on /utils/ss_calculator.py and ss_update_stats that you are importing lxml. Using lxml to parse untrusted XML data is known to be vulnerable to XML attacks. Perhaps you could replace lxml with the equivilent defusedxml package.

Security Findings

Hello Team,
I have reviewed the source codes and found few security issues that I would like to discuss with anyone available.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.