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

Fix number display for data points in sidebar #29

Closed
nickmcclellan opened this issue Jan 24, 2014 · 3 comments
Closed

Fix number display for data points in sidebar #29

nickmcclellan opened this issue Jan 24, 2014 · 3 comments

Comments

@nickmcclellan
Copy link
Contributor

Right now, selecting neighborhoods will display data from our CSV but it is not adding commas to figures in the thousands or correcting percentages to display as percentages and not decimals. For these relevant data points, we'd like to transform the display of these numerals.

@akilism
Copy link
Contributor

akilism commented Jan 29, 2014

I took a look at this but i'm not sure I fully understand the data. I can add the commas in easy enough and get a quick and dirty solution for the percentages...but there are vaules that I don't get, like fractional population counts. Sometimes total population is like 1230.023?

@nickmcclellan
Copy link
Contributor Author

Thanks for the help Akil! So the reason a population count would have trailing decimal points like that is because that number was computed by spatially joining smaller geometries into the neighborhood cluster. It is an estimation of what the population count for that neighborhood would be if the smaller geometries were combined. In some cases, the neighborhood cuts through one of these smaller geometries, resulting in decimal estimations. For counts, it's fine to just round this to the nearest whole number.

Our favored longterm procedure for updating data, however, will have our script hitting the Census API for updated numbers and crosswalking them to the neighborhood level, resulting in decimal points on occasion. It would be ideal for the visualization to parse these out instead of editing the CSV, but if we want to make the number translation in the CSV, I can talk to our data folks about having our Census script make the adjustment for us. I figured transforming in the visualization.js would be ideal, hence the issue.

Thanks for taking a look at this!

akilism added a commit that referenced this issue Jan 30, 2014
… sidebar #29

https://github.com/nickmcclellan/dcaction/issues/29
Numbers are whole.
Percentages become percents.
Dollar amounts display as dollars.
@akilism
Copy link
Contributor

akilism commented Jan 30, 2014

Fixed in commit: nickmcclellan@d0afc64

@akilism akilism closed this as completed Jan 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants