Open angiehjort opened 2 years ago
change of specs for more uniform results:
.drilldown({dim: "geo", entity: "usa"}) // =>{country: ["usa"]}
(entity is a drilldown of itself if it is on the bottom level)
https://github.com/vizabi/core/commit/7e8ee65ffcb6c3e6e7a77f17f580dee6289d3145
suggested but possibly not optimal API, feel free to improve
suggested but possibly not optimal solution, feel free to improve
this is not always an essential operation, so don't do it if no component requests is
search entity domains and sets concepts for concept property
drill_up
. for example: in open-numbers -compatible datasets we havecountry.drill_up = "[""world_6region"", ""income_groups"", ""landlocked"", ""g77_and_oecd_countries"", ""main_religion_2008"", ""world_4region"", ""unicef_region"", ""un_sdg_ldc"", ""un_sdg_region""]"
build drillup and drilldown maps for each dim in parent.space which is an entity domain or set, in our case it will be just "geo" or "country". inside each dim a map for each entity, inside each entity a set of drilldowns
request and cache entity data that would allow filling the drillup and drilldown maps
Use JS maps to avoid searching in loops, probably use JS set to avoid duplicates in the output like in drilldowns for ["asia", "landlocked"]
ASYNC: the result depends on concept readiness and possibly also on conceptCatalog to assess if a random set of entities is a complete entity set. then it needs to do its own entity request probably, so it is also async. is it possible to connect it somehow with the existing entity request? should it wrap the result in a promise? or should it have an own readiness observable flag?