fecgov / openFEC-web-app

DEPRECATED See https://github.com/18F/fec-cms for fec.gov's code
Other
43 stars 31 forks source link

Feature/remove old election maps #2145

Closed noahmanger closed 7 years ago

noahmanger commented 7 years ago

This change accounts for the fact that district maps before 2012 were different than the data we show, so it hides the district maps on both the election look up and individual house election pages when viewing a cycle before 2011-2012.

Lookup: image

Individual page: image

Before merging, I want to verify with @LindsayYoung that 2012 is the right cut-off to use.

Resolves https://github.com/18F/FEC/issues/4136

noahmanger commented 7 years ago

Also ping @jameshupp for your 👀 on the copy in that message that displays.

codecov-io commented 7 years ago

Codecov Report

Merging #2145 into develop will increase coverage by 0.13%. The diff coverage is 78.57%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2145      +/-   ##
===========================================
+ Coverage    53.81%   53.95%   +0.13%     
===========================================
  Files           52       52              
  Lines         3393     3405      +12     
  Branches       411      412       +1     
===========================================
+ Hits          1826     1837      +11     
- Misses        1535     1536       +1     
  Partials        32       32
Impacted Files Coverage Δ
openfecwebapp/constants.py 100% <100%> (ø) :arrow_up:
static/js/modules/election-lookup.js 66.95% <76.92%> (+0.18%) :arrow_up:
openfecwebapp/filters.py 67.12% <0%> (+2.73%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5948904...e78d964. Read the comment docs.

noahmanger commented 7 years ago

All ready for review. Because the latest redistricting happened this year, I set the cut-off date for 2017-2018 rather than 2012.

Also, much thanks to @jseppi for helping out getting the districts together. He also wrote a shell script that we can run to easily rebuild in the future.

jameshupp commented 7 years ago

Just so I'm clear: this means it's going to say 2017 or later for every state? Or it's going to be whatever the first election cycle since redistricting was for that particular state, whatever that year is?

noahmanger commented 7 years ago

It'll be hidden for all locations prior to the 2017-2018 cycle:

image

LindsayYoung commented 7 years ago

@jameshupp I took your question as a clarifying question and will merge this. If you have any additional questions or comments we can always make changes later.

Thanks!