Datawheel / data-explorer

MIT License
0 stars 0 forks source link

Disable selecting more than one hierarchy from the same dimension. #56

Closed walbuc closed 1 month ago

walbuc commented 1 month ago

After our meeting with @hermosillajelmy we know that it shouldn't be possible to select more that one hierarchy of the same dimension. Now we allow the user to do it, the request fails and we show an error message.

This is not very common but we should handle this in the frontend. The previous did not provide a feature for this. Example Data Saudi.

https://data-explorer.datawheel.us/?cube=households_electricity&drilldowns%5B0%5D=Category.Electricity+sources.Electricity+sources&locale=en&measures%5B%5D

There is another scenario where we can not select more than one level of the same hierarchy. Example: Continent, Country. This works but it could lead to not trusted data as @hermosillajelmy informed.

Maybe the way to do it should be use the new version of &parents=A.B.

We are waiting on @hermosillajelmy debug about this one because could be something that the server may handle.

hermosillajelmy commented 1 month ago

@walbuc regarding the levels within the same hierarchy, I checked with different queries and they are showing me the correct result so it should not be a problem in pytesseract. If in the future we want to make it compatible with tesseract rust this would be a limitation.