Add fallback for head of an institution
As discussed in #89 the data modeling on Wikidata is not totally settled yet. Besides the position, it could also be directly added on the agency with director / manager (P1037), chief executive officer (P169) or chair (P488) depending on the type. Add a fallback to the organization query so that we can capture those too.
If our current way to get the leader yields no result, we should display one of the others, and if there are several, prioritize them in the pick order P488, P169, P1037.
Hi, is this issue still open? If yes, please provide me with the details so that I can solve
Hi! 👋 I’ve gone through the context in #89 and this issue, and I understand the need to improve the fallback logic to fetch the head of an institution using properties P488 > P169 > P1037 in that order. I’ve already explored the relevant SPARQL queries and the current organization data-fetching logic in the codebase. I’d love to implement this fallback mechanism and test it properly. Kindly assign me this issue. Thank you!
Maybe include Secretary-General (P3975) as well.
Thank you for the suggestion, @RVA2869.
I’ll include the fallback for Secretary-General (P3975) along with the existing ones (P488, P169, and P1037) in the prioritized order.
Hi @RVA2869, I’ve implemented the fallback logic as discussed in #98 and created PR #542. Could you please review it. Thank you!
Hi all! 👋
Great work implementing the fallback logic with the properties P488, P169, P1037, and P3975!
If it’s helpful, I’d be happy to:
- Test the functionality using real institutions where only one of these properties exists.
- Help update documentation so future contributors understand the fallback order.
- Suggest a user-friendly message in the UI when no leader data is available. Let me know where I can contribute.