Hey people! Was trying to get some “aggregate” data on artist, because Im making a guess game on artists using the API, more specifically number of member of a group and “gender” of a group (all male, all female, mixed) and I’m struggling with something I feel should be simpler.
First of all is the very definition of “member of group” can be so complicated, e.g The Beatles, we all know its the fab 4, but if we query “member of band” relations of Beatles it returns 8+ people?!? I know "ackchyually " Tommy Moore was a “member of band” for a month in the early 60s, but how do am I supposed to filter the artist-rels list of a group to something more reasonable? Does such “the most common formation” flag exists? What would you guys recommend to achieve something related to that?
Yes, I recognise it can get messy, Pink Floyd is theoretically still running and is now made of 2 members, even though the average joe still associate “Pink Floyd” with 5 people. If the group is still running its clear cut not asking about those
But even if manage filtered the list of members, when I query the API for an artist’s astist-rels the rels artists it doesn’t have their gender! Am I missing a parameter? Am I supposed to N+1 and machine gun the api for the detail endpoint of each member of band? Make a huge lucene query with OR id: ... for the query endpoint?!
Does such “the most common formation” flag exists? What would you guys recommend to achieve something related to that?
Not directly, but there are a number of attributes on the “member of band” relationship which could be useful for that depending on what heuristic you think is best. You can also compare the start and end dates of the membership relationships with the start and end dates of the band itself (if that information exists).
But even if manage filtered the list of members, when I query the API for an artist’s astist-rels the rels artists it doesn’t have their gender! Am I missing a parameter? Am I supposed to N+1 and machine gun the api for the detail endpoint of each member of band? Make a huge lucene query with OR id: … for the query endpoint?!
You’re right that we don’t return the gender for artists inside relationships, so unfortunately you’ll have to perform separate queries. Batching the artist MBIDs into a single search query is definitely one option there. If you’re not tied to the API, you can also set up a mirror database and query all of the information you need directly with SQL.
You can also compare the start and end dates of the membership relationships with the start and end dates of the band itself (if that information exists).
Yes the information should exist exactly because I try to correlate the artist to only “popular” (e.g top 200 listen brainz). But well, guess I’ll just try to use some end date heuristic and hope for the best, the relation attributes don’t really help, instruments attributes for me are meaningless, original member definition is too strict also (Ringo is not and original member for example), and even the date is not clean cut, apparently Lenon left 1 year before the end of the Beatles dunno, maybe allow some 1 year rule before band end, (Lenon rule haha)?
Point is I’ll just have to make an best guess band end formula and hope for the best, dealing with exceptions as I go… Kinda sucks but
you can also set up a mirror database and query all of the information you need directly with SQL.
I did that on my PC and I did a big CSV dump with all the data I needed, but its static, I wanted have live data thats why the API I cant really host a mirror