CMU-CREATE-Lab / data-visualization-tools

EarthTime, and various data visualization libraries
Other
14 stars 5 forks source link

MapType=point layer does not display if it is earlier in the list of layers than MapType=polygon #246

Closed rsargent closed 2 years ago

rsargent commented 2 years ago

To reproduce, go to

https://earthtime.org/#csvlayers=11t8XP5yipm-8aceGU-wcr-qIjg-kFTASY1IZVoQ8M4Q.1706635433&waypoints=11t8XP5yipm-8aceGU-wcr-qIjg-kFTASY1IZVoQ8M4Q.0&theme=anne_test&story=anne_choropleth_test

and click on 3rd waypoint, observing green parcel dots do appear:

image

Click on 4th waypoint, observing green parcel dots no longer appear:

image

Both waypoints have same layers, just in different order. Note that the problem isn't related to the choropleth obscuring the green dots; the green dots disappear everywhere, including places they are not behind the choropleth.

pdille commented 2 years ago

Something first to note is that green dot layer (allegheny_county_oo_parcels_by_pct_black_hh_80_pct_plus_in_purchase_year) doesn't have data for 2022. You can see that in action here

Now the reason there is no timeline when the layers are in the order of the 4th waypoint is because the choropleth layer is defined to only span a single year and because the timeline that is shown is based on the last layer in the share link, the choropleth layer's timeline is used. And because start/end year is the same, no time line appears. Now because internally it has set the display year to 2022 (based on this 'hidden single year timeline'), going back to the first issue that the green dots don't have data for 2022 we end up no longer seeing them.

gabrielo commented 2 years ago

A possible solution is to not specify a start/end date for the choropleth. This would make it always on regardless of other layers' times and allow the time bounds associated with the dots to take precedence.

rsargent commented 2 years ago

Confirmed Paul and Gabriel, removing the dates from the choropleth did indeed fix this. Thanks both!