I’m doing some music analysis, part of it is examining the genres’ scene in certain countries. I’m looking to create a treemap view to see an overview of the size of each country’s scene based on the number of prominent local bands.
I’ve only started exploring Agents, so I’m not quite sure what are the limits or possibilities for Agents.
All bands have a filled attribute, $Country. But I need to sort them out without creating a new agent every time I introduce a band from a new country. So I’m looking into a possibility to create an Agent with a query that looks at $Country, and creates a new agent based on its child.
General idea:
Create an agent called “aCountries”
“aCountries” query looks at $Country.
If $Country is not empty, look at the children of “aCountry”.
If the instance of $Country is not present, create a child agent under “aCountry” with $Name=(“Country”); query: $Country=(“Country”).
Else, file the alias under the available child.
An example to better illustrate:
I have an agent “aCountries”. At the moment it has a child agent, “USA”; query: $Country=(“USA”). All notes with $Country=USA are the children of this agent (grandchildren of “aCountries”).
Now, I’ve added a new band from Sweden, so “aCountries” sees that $Country is not empty, but it doesn’t have a child agent named “Sweden”. It creates an agent as its child; $Name=(“Sweden”); query: $Country=(“Sweden”).
I’m not quite sure what my AgentAction or Query for “aCountries” should be. I’m particularly held out by the condition.