Python/JSON script
Budget: $30 – $250 USD
I have a collection of files “_metadata.json”. One is attached here as example
_metadata.json contains a schema which is repeated with different values
The ID of each instance is its edition ("edition": 1)
For each "edition", there are "attributes" with "trait_type" (and "value" of each "trait_type")
I want a python script which accepts a _metadata.json, and for each "edition" it lists the "trait_type" and "value".
The script should count the instances of a "trait_type" "value" that are the same. As an example, we find for "trait_type": "CIRCLE STICKERS RUN IT BACK TURBO", there are n instances of "value": "Orange".
The script should give a weight to that "trait_type" for the "edition". If the "value" of that "trait_type" is in every "edition" it would have weight 1. If it only occurs 1 time in the entire _metadata.json it will have weight 0.000071746305065 (there are 13938 "edition" in this _metadata.json)
Finally, all weights should be added for all of the "trait_type" of every "edition", and the script should print a list in order of weight, the "edition" order of _metadata.json
_metadata.json contains a schema which is repeated with different values
The ID of each instance is its edition ("edition": 1)
For each "edition", there are "attributes" with "trait_type" (and "value" of each "trait_type")
I want a python script which accepts a _metadata.json, and for each "edition" it lists the "trait_type" and "value".
The script should count the instances of a "trait_type" "value" that are the same. As an example, we find for "trait_type": "CIRCLE STICKERS RUN IT BACK TURBO", there are n instances of "value": "Orange".
The script should give a weight to that "trait_type" for the "edition". If the "value" of that "trait_type" is in every "edition" it would have weight 1. If it only occurs 1 time in the entire _metadata.json it will have weight 0.000071746305065 (there are 13938 "edition" in this _metadata.json)
Finally, all weights should be added for all of the "trait_type" of every "edition", and the script should print a list in order of weight, the "edition" order of _metadata.json