owned this note
owned this note
Published
Linked with GitHub
# Anata Metadata Notes
###### tags: `anata`
[toc]
We may need to supplement the metadata prior to generation. Not every Anata has traits for Eyes for example, can either pick a default or inspect each Anata that has missing traits.
:::success
**Update:** See [Anata Ingestion Notes](/JX-goHt7RX6t5uixgZF2NA) for more on how we're handling eyes.
:::


https://opensea.io/assets/ethereum/0xf729f878f95548bc7f14b127c96089cf121505f8/1
```json!
{
"description": "Anata NFT is a brand new form of NFT identity. It's the first NFT you can literally be. Anatas use your webcam or phone camera to mimic your movements exactly. When you speak, your Anata speaks. When you blink, your Anata blinks. Move your head back and forth, raise your eyebrows, squint your eyes — it's all reflected immediately by your Anata. Each Anata is bundled with a set of emotes so you can be extremely expressive. Fire eyes, anger, peace signs, shame, heart eyes, and more.",
"type": "live2d",
"project": "anata",
"name": "1",
"image": "https://arweave.net/cz9lS2Pi4jLa3DLtf2_nhNn0DWwtihd6u8lcnr9Xco4/1.png",
"animation_url": "https://arweave.net/iCNUMyKGcOowz4vtJ6KMMCvseWT-bM4oMPl1Gpi166A/M_SET0170.mp4",
"model_url": "https://arweave.net/rhNYuVOZ4DoGmjDWc3fp4vTObr2ghH5q0p0Cd88f5q8/M_SET0170.zip",
"attributes": [
{
"trait_type": "Body",
"value": "Masculine"
},
{
"trait_type": "Clothing",
"value": "Ragnarok 777 T Shirt"
},
{
"trait_type": "Hair",
"value": "Mid Red/Black"
},
{
"trait_type": "Type",
"value": "Ragnarok"
},
{
"trait_type": "Glasses",
"value": "Modern Shades"
},
{
"trait_type": "Neck",
"value": "Silver Links Chain"
},
{
"trait_type": "Brace",
"value": "Strobe Light Brace"
},
{
"trait_type": "Set",
"value": "Ragnarok"
}
],
"animation_preview_url": "https://arweave.net/MJrr0JFrSMf9rQyUnbtHZVQ5g6RehULRI6QcO0tBrFg/M_SET0170.png",
"pfp_url": "https://arweave.net/cz9lS2Pi4jLa3DLtf2_nhNn0DWwtihd6u8lcnr9Xco4/1.png"
}
```
### CSV of attributes
- https://github.com/M3-org/anata/blob/main/metadata/csv/master_traits.csv Master CSV
`jq -r '.attributes | map([.value] | join(",")) | @csv'`
"Masculine","Ragnarok 777 T Shirt","Mid Red/Black","Ragnarok","Modern Shades","Silver Links Chain","Strobe Light Brace","Ragnarok"
This script creates a master CSV file from ALL the metadata for all 2,000 current json
```python!
import csv
import json
import os
# List of attribute types
attribute_types = [
"Body", "Brace", "Clips and Kanzashi", "Clothing", "Earring",
"Eyes", "Face Other", "Glasses", "Hair", "Hair Accessory Other",
"Halos", "Hats", "Head", "Head Accessory Other", "Masks",
"Neck", "Ribbons and Bows", "Set", "Sigil", "Special Other",
"Tail", "Tattoo", "Type", "Weapon", "Weapon Brace", "Wings"
]
# Define the field names for CSV
field_names = [
"File", "Description", "Type", "Project", "Name", "Image",
"Animation_URL", "Model_URL", "Animation_Preview_URL", "PFP_URL"
]
field_names.extend(attribute_types)
# Open the master CSV file in write mode with Unix-style line endings
with open('master.csv', 'w', newline='', encoding='utf-8') as csvfile:
writer = csv.writer(csvfile, delimiter=',', quotechar='"', quoting=csv.QUOTE_MINIMAL)
writer.writerow(field_names)
# Loop through all JSON files in the directory
for filename in os.listdir('.'):
if filename.endswith('.json'):
with open(filename) as json_file:
data = json.load(json_file)
# Extract values from the JSON data
file = filename
description = data.get('description', '')
type = data.get('type', '')
project = data.get('project', '')
name = data.get('name', '')
image = data.get('image', '')
animation_url = data.get('animation_url', '')
model_url = data.get('model_url', '')
# Extract attribute values
attributes = {attribute: None for attribute in attribute_types}
for attribute in data.get('attributes', []):
trait_type = attribute.get('trait_type', '')
value = attribute.get('value', '')
if trait_type in attributes:
attributes[trait_type] = value
# Extract additional fields
animation_preview_url = data.get('animation_preview_url', '')
pfp_url = data.get('pfp_url', '')
# Write the row to the CSV file
row = [file, description, type, project, name, image,
animation_url, model_url, animation_preview_url, pfp_url]
row.extend(attributes.values())
writer.writerow(row)
print("Modified script completed successfully.")
```
---
## Male Traits
These are located in `metadata/stats` folder in the [Github](https://github.com/M3-org/anata)
| Category | Total Traits | Unique Traits |
| -------- | ------------ | ------------- |
| Body | 1000 | 1 |
| Brace | 374 | 114 |
| Clips and Kanzashi | 19 | 8 |
| Clothing | 1000 | 303 |
| Earring | 197 | 61 |
| Eyes | 25 | 15 |
| Face Other | 140 | 47 |
| Glasses | 219 | 64 |
| Hair | 1000 | 121 |
| Hair Accessory Other | 4 | 2 |
| Halos | 129 | 28 |
| Hats | 17 | 11 |
| Head | 449 | 89 |
| Head Accessory Other | 66 | 42 |
| Masks | 47 | 15 |
| Neck | 208 | 61 |
| Ribbons and Bows | 1 | 1 |
| Set | 173 | 97 |
| Sigil | 435 | 95 |
| Special Other | 228 | 86 |
| Tail | 82 | 19 |
| Tattoo | 233 | 108 |
| Type | 1000 | 35 |
| Weapon | 516 | 100 |
| Weapon Brace | 104 | 30 |
| Wings | 126 | 47 |
## Female Traits
| Category | Total Traits | Unique Traits |
| -------- | ------------ | ------------- |
| Body | 1000 | 1 |
| Brace | 252 | 115 |
| Clips and Kanzashi | 69 | 21 |
| Clothing | 1000 | 297 |
| Earring | 359 | 53 |
| Eyes | 17 | 13 |
| Face Other | 128 | 34 |
| Glasses | 399 | 59 |
| Hair | 1000 | 296 |
| Hair Accessory Other | 31 | 9 |
| Halos | 68 | 18 |
| Hats | 21 | 11 |
| Head | 360 | 87 |
| Head Accessory Other | 180 | 82 |
| Masks | 60 | 14 |
| Neck | 304 | 68 |
| Ribbons and Bows | 42 | 22 |
| Set | 276 | 77 |
| Sigil | 358 | 121 |
| Special Other | 219 | 83 |
| Tail | 152 | 19 |
| Tattoo | 221 | 86 |
| Type | 1000 | 28 |
| Weapon | 560 | 80 |
| Weapon Brace | 92 | 22 |
| Wings | 151 | 45 |