mapbox / mapbox/osm-analysis-dashboard
Define stops for properties and stop colours
- Dominant language
- JavaScript
- Stars
- 6
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
Is there a way for the javascript to figure out optimum stop values for colour changes for each property dynamically on the fly on the front-end, or should we statically define these in a constant?
How complex does this need to be? Do we have different stops for different property values as well as for different years? Or just define stops based on property and they remain constant through years.
Proposal for data structure to define details per property value that can be filtered on:
```
{
'editCount': {
'label': 'Total Edit Count',
'stops': [0, 100, 500, 1500, 2500, 8000, 15000]
},
'editedBuildings': {
'label': 'Total Buildings Edited',
'stops': [0, 80, 250, 500, 1000, 5000, 10000]
}
}
```
I'm assuming we'd use a constant colour scale for each - if we want different properties to have different colours, ^ would change a bit.
Also, do we need to have stops per zoom level? In that case, the complexity of this will increase slightly.
Once we have this in place, I see a lot of other things on the front-end flowing from how we define the above data structure.
cc @jenningsanderson @ramyaragupathy @rasagy @tridip1931
Contributor guide
Research direction
No files, tests, or entry points are named. First resolve whether colour stops should be dynamic or constant, and whether they vary by property, year, or zoom level; done means an agreed data structure and colour-scale rules for the front end.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100