Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TCCP: Display account fee as a number #8281

Merged
merged 3 commits into from
Apr 2, 2024
Merged

TCCP: Display account fee as a number #8281

merged 3 commits into from
Apr 2, 2024

Conversation

chosak
Copy link
Member

@chosak chosak commented Apr 1, 2024

With this change, the TCCP list view now displays a dollar amount for each card's "account fee". This value is based off the values of several different columns in the TCCP dataset:

  • periodic_fee_type: what type of periodic fees a card has, which can have zero or more values of "Annual", "Monthly", "Weekly", and "Other"
  • annual_fee: amount in dollars of annual fee
  • monthly_fee: amount in dollars of monthly fee
  • weekly_fee: amount in dollars of weekly fee

If a card has any fee type besides "Other", we can estimate the annual fee by multiplying the monthly fee by 12 and the weekly fee by 52. If a card has an "Other" fee, we can't do that, because it isn't represented in a predictable way in the various related "Other fee" columns, for example "Other Periodic Fee Name".

For this reason, if a card has an "Other" fee, it will show up as "See details" (we will iterate on this). If a card has no fee, it will show up as "None". If a card has a value that can be computed, we show that dollar amount.

How to test this PR

If running locally, you'll need to run cfgov/manage.py migrate to migrate the field type for the currency fields. Once you've done that, run a local server and visit http://localhost:8000/consumer-tools/credit-cards/explore-cards/cards/ to see a list of cards. Experiment with the credit tier selector to see different results.

Screenshots

Looking at the "poor" tier, the middle column is the "Account fee" column:

image

Checklist

  • PR has an informative and human-readable title
  • Changes are limited to a single goal (no scope creep)
  • Code follows the standards laid out in the CFPB development guidelines

@chosak
Copy link
Member Author

chosak commented Apr 1, 2024

Per team discussion and suggestion from @caheberer, I've changed the "no account fee" state to show "$0" instead of "None".

@contolini
Copy link
Member

Very exciting! How would y'all feel about rounding to whole numbers? There's a lot of .00

image

@caheberer
Copy link
Member

Agree with @contolini, round numbers would be :chefkiss:

chosak added 3 commits April 2, 2024 15:57
With this change, the TCCP list view now displays a dollar amount for
each card's "account fee". This value is based off the values of several
different columns in the TCCP dataset:

- periodic_fee_type: what type of periodic fees a card has, which can
have zero or more values of "Annual", "Monthly", "Weekly", and "Other"
- annual_fee: amount in dollars of annual fee
- monthly_fee: amount in dollars of monthly fee
- weekly_fee: amount in dollars of weekly fee

If a card has any fee type besides "Other", we can estimate the annual
fee by multiplying the monthly fee by 12 and the weekly fee by 52. If
a card has an "Other" fee, we can't do that, because it isn't
represented in a predictable way in the various related "Other fee"
columns, for example "Other Periodic Fee Name".

For this reason, if a card has an "Other" fee, it will show up as
"See details" (we will iterate on this). If a card has no fee, it will
show up as "None". If a card has a value that can be computed, we show
that dollar amount.
@chosak chosak force-pushed the tccp/account-fee-number branch from 5572c90 to 29c5ca3 Compare April 2, 2024 20:04
@chosak
Copy link
Member Author

chosak commented Apr 2, 2024

Numbers have been rounded in 29c5ca3.

@chosak chosak enabled auto-merge April 2, 2024 20:05
@chosak chosak disabled auto-merge April 2, 2024 20:05
@chosak chosak added this pull request to the merge queue Apr 2, 2024
Merged via the queue into main with commit b4121bb Apr 2, 2024
13 checks passed
@chosak chosak deleted the tccp/account-fee-number branch April 2, 2024 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants