mapbox / osm-analysis-dashboard

OSM Analysis Dashboard
https://mapbox.github.io/osm-analysis-dashboard/
6 stars 4 forks source link

Overlapping tiles and color ramps #15

Open rasagy opened 7 years ago

rasagy commented 7 years ago

For Edited Objects, this area around Hayward label has tiles with value>2000 show up the same color as value=600, but a tile above with value=1815 shows up darker.

image

@jenningsanderson Any idea why this might be the case? Looking at the opacity, it seems to be that there might be multiple tiles in the same location (overlapping).

rasagy commented 7 years ago

A similar thing occurs around San Francisco for Total Users to Date: The dark tile has value=442, but the lighter tiles around it have values>1000.

image

jenningsanderson commented 7 years ago

@rasagy hmmm, that is weird, and unfortunately, I have seen this before. I think we need a fail-safe color for the highest values, otherwise it does some weird interpolation; so we may need to add more stops. That, or change the type for the data driven styling?

rasagy commented 7 years ago

@jenningsanderson Interesting. If the max stop value is lesser than the actual max values, then maybe that is causing the error. I’ll see if increasing the stop values to a bit higher might work. I’ll also re check the color scale and make sure it’s appropriate.

rasagy commented 7 years ago

@jenningsanderson It seems that there are many tiles on top of each other, thus making some tiles darker (less transparent):

readiness-many-tiles

Also in users in active quarter: image

…and in total users to date: image

Want to switch to the legend-array branch to check ☝️ and see why this might be happening? I’ve pushed the popup code to show no. of features below the mouse cursor on #16 PR.

rasagy commented 7 years ago

@jenningsanderson considering each tileset takes a while to generate, I’m guessing fixing this will take time (even if we figure out why it is happening).

For now, a quick fix is to remove the opacity in the tiles:

readiness-many-tiles-opaque

To test, just checkout the legend-array branch, and use the same quarter for both sides (left has opacity: 0.8, right has opacity: 1)

cc @batpad

jenningsanderson commented 7 years ago

@rasagy I think this is a great fix for now, I really like how it looks w/ the labels and full opacity 👍 .

I checked the script, it's running the --no-duplication flag which must mean that data is being written twice to geojson 😞 , meaning this will take longer to debug and I'd rather 🚀 something pretty for SOTM-Asia