You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have hundreds of census tracts here: https://github.com/seattleflu/augur-build/blob/master/config/lat_longs.tsv#L49. I'd like a coloring that places nearby census tracts with similar colors, the way that we do things for, say, Zika: https://nextstrain.org/zika. For Zika, I did this color scale by hand. This is obviously impossible for the hundreds of census tracts. Instead, we'd like to automate this. My suggested algorithm:
Load a mapping of census tract to lat/long
Perform PCA on these lat/long values to orient the majority of variation to PC1 with PC2 orthologonal
If you rank order PC1 you can slot the first X census tracts to #511EA8, the second X census tracts to #4928B4, etc... where X is chosen to equally distribute census tracts along the 36 elements of the color ramp.
This should end up as a Python script that takes a lat_longs.tsv and also a label (like region, country or location) and produces a colors.tsv output.
No hurry on this. I've wanted a script like this for a while as it would be generally useful in Nextstrain. And I think it could be a good programming challenge.
The text was updated successfully, but these errors were encountered:
@miparedes ---
We have hundreds of census tracts here: https://github.com/seattleflu/augur-build/blob/master/config/lat_longs.tsv#L49. I'd like a coloring that places nearby census tracts with similar colors, the way that we do things for, say, Zika: https://nextstrain.org/zika. For Zika, I did this color scale by hand. This is obviously impossible for the hundreds of census tracts. Instead, we'd like to automate this. My suggested algorithm:
#511EA8
, the second X census tracts to#4928B4
, etc... where X is chosen to equally distribute census tracts along the 36 elements of the color ramp.This should end up as a Python script that takes a
lat_longs.tsv
and also a label (likeregion
,country
orlocation
) and produces acolors.tsv
output.No hurry on this. I've wanted a script like this for a while as it would be generally useful in Nextstrain. And I think it could be a good programming challenge.
The text was updated successfully, but these errors were encountered: