Coder Social home page Coder Social logo

cfinst / cfinst.github.io Goto Github PK

View Code? Open in Web Editor NEW
11.0 4.0 0.0 34.58 MB

Campaign Finance Institute data exploration and download tool.

Home Page: https://cfinst.github.io

License: GNU General Public License v3.0

CSS 38.66% HTML 13.06% JavaScript 40.37% Shell 4.93% SCSS 2.98%
campaign-finance campaign-finance-institute visualization

cfinst.github.io's People

Contributors

bglavin avatar curran avatar seemantk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cfinst.github.io's Issues

Download button(s)

complete tables as CSV for now
maybe later filtered based on "what's visible now"

Interface with the database of information

Transition from using a static database dump to a live database.

Note: This issue is directly from the Statement of Work, and may need to be broken up into smaller issues.

Use ranges for colors

The numeric fields can be represented using colors that reflect which range they fall into.

For this, we'll need to:

  • Detect whether or not the current field is numeric.
  • If it is, then use https://github.com/d3/d3-scale/blob/master/README.md#quantize-scales to produce colors based on a computed set of ranges. We can start by using equal-intervals and see if that works well. The ranges should be "nice", so I think we can use the scales in conjunction with scale.nice and scale.ticks to generate the ranges.

Explore and create visualization methods

  • Fulfill the visual goals (what users should be able to see).
  • Help users answer questions (such as given above).

Note: This issue is directly from the Statement of Work, and may need to be broken up into smaller issues.

Stylistic and aesthetic adjustments

Colors, fonts, layouts and finishing touches.

Note: This issue is directly from the Statement of Work, and may need to be broken up into smaller issues.

Grant CFI folks repository access

I would love to be able to send links to issues and pull requests to the CFI folks. In order for them to be able to access those links, they need to create GitHub accounts and be granted access to this repository.

Restore "Download Currently Shown Data"

This button seems to be broken now, in all sections except "Other Restrictions". Odd.. It almost seems like an issue with the code that is adding the event listener to the button.

Linked Highlighting

I'd be curious to experiment with adding a linked hover interaction. This would make it easier to correlate between the two views. I envision we could try the following:

  • Hovering on a state in the map highlights the corresponding column in the grid.
  • Hovering over a cell in the grid would cause its current column and corresponding state in the map to highlight.

image

One way to do the highlighting would be using an outline around the state and column. Something similar is implemented in this example http://curran.github.io/model/examples/d3LinkedChoropleth/

Create/Explore navigational methods

Using the data hierarchy expressed in the initial spec from CFI, we will construct a navigational interface to allow exploration of the dataset in digestible chunks.

Note: This issue is directly from the Statement of Work, and may need to be broken up into smaller issues.

Investigate Color Mismatches

In "Other Restrinctions", the colors for "Yes" and "Changed mid-cycle" seem to have gotten mixed up between the legend and the viz.

Revert back to textarea for descriptions

Undo commit c6ba380 "Swap textarea for Bootstrap well for .field-description"

This is to restore the thought-out behavior introduced by @seemantk and inadvertently clobbered by me.

The rationale is to have a fixed height box, so the interface is not jumping around when you switch fields. Also, the asterisk makes the "Additional notes" appear below the fold.

Tooltips on Map

This seems like low hanging fruit that would be a big win.

Final Stakeholder review and Go-Live

The website will be deployed and released

Note: This issue is directly from the Statement of Work, and may need to be broken up into smaller issues.

Improve the contrast/color perception

During the call today, both Michael and Ronda observed that the lack of color contrast between the circular grid cells compromised the overall usability of the viz. Thus, #46 addresses changing the cells to rectangular, and this one is for the color pallette

Data Download Page

Create a new page dedicated to providing various data download links. To start, this could link to all of the raw CSV files. There should also be some way to navigate from the limits visualization page into the data download page, maybe a link that says "more download options".

Party as a Donor

Add "Party" as a donor option in contribution limits section (using Brendan's instructions per email).

@seemantk I feel like you'd have a better idea of how to go about this, as it requires modification of the handling of fields for the contribution limits section.

Add year indicator to map

Add an indication of which year is being displayed on the map. This could be a simple text element on the top, or in some other location, just saying the year.

States alphabetized on resize

I just noticed that after sorting by a year, resizing the page causes the states to sort alphabetically. This looks to be an unintended consequence of the way the resize propagates to rendering.

Black colors

I unfortunately introduced a bug in #88 where if you load the contributions tab, then change the recipient to "Party", we get some black colors. I have no idea why.

image

@seemantk Maybe you could find the source, I had trouble narrowing it down.

Add CC License for data

Add a statement to the project saying that:
the code is released under the GPL3 license, and
the data is released under Creative Commons Attribution 4.0 International license

Download visible data button

Create a button that will download the currently visible data, for the current configuration of the visualization only, as CSV.

Add prohibited and unlimited to current view download

Now there is a "Download Currently Shown Data" button that downloads CSV data for the currently selected field only. Here's a sample of the CSV output:

State,Year,IndividualToCandLimit_H_Max
"LA",1996,"5000"
"WV",1996,"2000"
"SD",1996,"500"
"NM",1996,""
"NV",1996,"2000"
"VT",1996,"2000"
"AK",1996,"2000"
"HI",1996,"2000"
"KS",1996,"1000"
"SC",1996,"3500"
"OK",1996,"5000"
"MN",1996,"600"
"AL",1996,""
"ID",1996,""
"PA",1996,""
"NE",1996,""

The information about unlimited vs. prohibited is missing.

This issue is about adding the missing information about prohibited and unlimited. The empty strings should be replaced by "No limit" or "Prohibited" (or something similar).

Document dataset generation

Document in the README the command that can be used to generate the CSV files from the original MDB files. This will facilitate the workflow for updating the data whenever we receive a new database dump.

Make the download buttons work reliably in Firefox and Chrome

Currently the "Current View" download button only works in Chrome, not firefox.

The "Download Entire Limits Data" button no longer works at all in Chrome. This may have something to do with the introduction of encodeURIComponent() in #77 . Possibly the DataURL is too long?

Restore data-driven values to legends

Now that the legends are no longer data-driven (instead are driven purely from the configuration), we need to go through each field of each section and make sure the legend items present match up with the values that are present in the data.

As one instance, in Public Financing, there are values "Mixed" and "none", which are not accounted for in the legend. This may be part of the issue with the mismatched colors - new data values are causing the colors in the legend to loop around. One thing we could do to help fix this is pad the color range with random colors, just so we will easily know when this is happening.

Maybe the best solution here would be to use the configurations as a starting point for the legends, then fill in the legends with more colors automatically if more values are discovered in the data.

Add year selection interface below map

This issue is about implementing an interface idea we discussed recently, where there would be a user interface element below the map for selecting the year. This would obviate the need for the year label on top of the map.

Possible solutions we discussed included

  • Drop-down menu
  • Group of buttons, one for each year
    image
  • Slider with tick marks and tick labels

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.