Skip to content

Conversation

@Abbe98
Copy link
Member

@Abbe98 Abbe98 commented Sep 6, 2024

This PR replaces the COFOG based topics with ones specific to Govdirectory powered by field of work (P101). The goal is include a greater number of agencies on our topic pages and enable us to create and curate topics that match our user needs.

How it works

Under the hood there is now a series of topic queries education, environmental-protection, etc which are simply returning a list field of work values expected to be sorted under said topic.

When Snowman then renders topic pages it will compare each field of work value on agencies and check if that is included on the current topic's list and if so include it on the page. This means that one agency can appear on multiply topics.

Notes

The topics queries currently only lists values rather than doing actual queries, we could utilize subclasses to generate these if we find that useful or expand on the work done by @Ainali in #270.

Thanks again to @Ainali we can list the current field of work values used on Govdirectory items, which is super useful for curating topics: https://w.wiki/Et3k

Given the broad work of municipalities and similar agencies this work might make efforts around hierarchy more urgent.

TODOs

  • More topics!
  • sort out final TODO: s
  • update documentation to reflect changes to country queries

@Abbe98 Abbe98 marked this pull request as draft September 6, 2024 13:34
@Abbe98 Abbe98 force-pushed the topics-20 branch 2 times, most recently from 32da163 to e012e5c Compare July 29, 2025 15:04
@Ainali
Copy link
Member

Ainali commented Jul 31, 2025

This is already really cool! Do we want to go live with this subset or do we want to have queries that replace all the top level COFOG categories before we merge it?

@Abbe98
Copy link
Member Author

Abbe98 commented Jul 31, 2025

I don't think a 1:1 is necessary, but maybe we could add a few more so that others can feel invited to improve the data on Wikidata?

@Ainali
Copy link
Member

Ainali commented Jul 31, 2025

That makes sense! Should we aim for 6 or 7 before merging? (COFOG had 10 topics.)

@RVA2869
Copy link
Collaborator

RVA2869 commented Aug 1, 2025

A suggestion for a new topic: Diplomacy (pretty straightforward as to what this topic should include)

@RVA2869
Copy link
Collaborator

RVA2869 commented Aug 1, 2025

That makes sense! Should we aim for 6 or 7 before merging? (COFOG had 10 topics.)

I would aim for an even number of topics 😉

@Abbe98
Copy link
Member Author

Abbe98 commented Oct 10, 2025

Current topics:

  • health
  • environmental-protection
  • defense
  • education

My suggestions moving this forward:

@Ainali
Copy link
Member

Ainali commented Oct 10, 2025

Hmm, I think we should stick to the 10 topics of the top level of COFOG even if we are not using that specifically (because someone has already thought very hard to get a complete set of groups together).

So law/justice could be widened to Public order and safety.
Culture goes well into Recreation, culture, and religion.
Patents/copyright is probably under Economic affairs and Privacy likely under Public order and safety.

@Abbe98
Copy link
Member Author

Abbe98 commented Oct 10, 2025

@Ainali I try to think more around use cases(activism, lobbying etc). In this new structure one agency can be in multiply categorizations so I wouldn't worry to much about overlap.

@Ainali
Copy link
Member

Ainali commented Oct 10, 2025

I think we should stick to the 10 topics of the top level of COFOG

I'll backpedal on my own statement. First, I think the idea of Diplomacy is good. Second, we might want one for Regional or local agencies too. That is the bulk of our orgs, and for the Swedish COFOG data, neither those nor embassies were assigned any value. And giving them a special category would likely make General Public Services more useful and less overcrowded.
That would make 12 topics then.

@Ainali
Copy link
Member

Ainali commented Oct 10, 2025

@Ainali I try to think more around use cases(activism, lobbying etc). In this new structure one agency can be in multiply categorizations so I wouldn't worry to much about overlap.

I see your point, but if we make it so fine-grained, we may end up with 20-30 topics to get everyone to fit in some topic, which will make it difficult both to design and navigate.

@Abbe98
Copy link
Member Author

Abbe98 commented Oct 10, 2025

First, I think the idea of Diplomacy is good. Second, we might want one for Regional or local agencies too. That is the bulk of our orgs, and for the Swedish COFOG data, neither those nor embassies were assigned any value. And giving them a special category would likely make General Public Services more useful and less overcrowded.

I like this very much, although it might be tricky to get regional and local agencies into one category using field of work.

@Ainali I try to think more around use cases(activism, lobbying etc). In this new structure one agency can be in multiply categorizations so I wouldn't worry to much about overlap.

I see your point, but if we make it so fine-grained, we may end up with 20-30 topics to get everyone to fit in some topic, which will make it difficult both to design and navigate.

I'm more worried about the categories becoming very large and hard to navigate rather than us having many categories, the category list could be curated by hand if we end seeing issues.

@Ainali
Copy link
Member

Ainali commented Oct 10, 2025

I'm more worried about the categories becoming very large and hard to navigate rather than us having many categories, the category list could be curated by hand if we end seeing issues.

That's a fair point. So perhaps some more topics would be good.

But, I think we should have a target for the complete list of topics settled and consider it fairly stable and adjust our queries later if needed rather than changing the topics (and thereby URLs) in the future.

@Abbe98
Copy link
Member Author

Abbe98 commented Oct 10, 2025

But, I think we should have a target for the complete list of topics settled and consider it fairly stable and adjust our queries later if needed rather than changing the topics (and thereby URLs) in the future.

That's a good point. Could it even make sense to launch this with as few topics as possible so that we have more to go on when we do introduce new topics? Maybe even remove ones in the current PR.

@Ainali
Copy link
Member

Ainali commented Oct 11, 2025

I think I meant the opposite. That we should know of all the topics that we want before we launch it. That is not saying that we need functional queries for all of them, just that it would be good to know what the names of the topics should be (which will also help in scoping the queries when making them).
So no new topics will be introduced later, but we might refine (or create) the queries supporting them.

@Ainali
Copy link
Member

Ainali commented Oct 17, 2025

Just saving the query we talked about in the call today: https://w.wiki/Fics
This is the second level of COFOG that could be a base for something like 50-70 subcategories under the exisiting ten. There are a few odd ones I think we could ignore, and then we could add a few more that would make sense from the activism/lobbyism use cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants