-
Notifications
You must be signed in to change notification settings - Fork 2
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
Are the proportional circles calculated using area or radius? #1
Comments
panorama-foreignborn/app/stores/scales.js Line 19 in 04f413a
|
d3.scales.sqrt()
should be more like
and labels/breaks added via ticks, see |
This scale behaves not continuously as a square root function, the input domain between 500k and 2m is mapped linearly to the output range:
|
When specifying >2 values in the domain, the scale becomes a |
changed to the following so it's both accurate and has the breakpoints to render four circles in the legend.
|
Polypowered wizardy. |
How are these breaks calculated? I get different values when applying the unit area ratios to a factor of 48. https://docs.google.com/spreadsheets/d/1rSxd3rfVgnQVxnDNdbTW2GBqNMbIc5OIBL9PbGpTrbk/edit#gid=0 resulting in
comparing the scales: http://codepen.io/mxfh/full/pggXoW/ grey: old implementation for reference with sqrt x-axis (makes sqrt-curve a straight line starting from origin, if it is one): |
Sorry @mxfh, I won't have time to think more deeply about those charts until January. |
To @almccon for consideration |
On twitter someone asks if we're calculating our circle sizes correctly: https://twitter.com/mxfh/status/676939990169952256
Compare Mexico and Central America in 2000: http://dsl.richmond.edu/panorama/foreignborn/#decade=2000
Mexico is 9,177,487, and Central America is 2.026,150.
If they were scaled linearly by radius, Mexico's circle would be 4.52 times wider.
However, on the map the circle is only 3 times wider (~300px vs ~100px).
So I think we're doing it right. The radius is calculated on this line: https://github.com/americanpanorama/panorama-foreignborn/blob/master/app/components/DisjointedWorldLayout.jsx#L501, but it's using a function defined here https://github.com/americanpanorama/panorama-foreignborn/blob/master/app/stores/scales.js#L19-L21 which shows that we're using a sqrt function. So I think we're good.
The text was updated successfully, but these errors were encountered: