type: string
default: 'none'

we can compute node radii by a metadata attribute by setting the sizeBy parameter to that attribute’s name.

categorical metadata attributes can’t be used to compute node sizes.

showing:

from webweb import Web

# Instantiate webweb object
web = Web([[0, 1], [1, 2], [2, 3], [3, 4], [4, 5]], display={
    'metadata' : {
        'happiness' : {
            'values' : [5, 10, 7, 8, 1, 3],
        }

    }
})

# use the 'happiness' attribute to size nodes
web.display.sizeBy = 'happiness'

# show the visualization
web.show()
{
    "display": {
        "metadata": {
            "happiness": {
                "values": [
                    5,
                    10,
                    7,
                    8,
                    1,
                    3
                ]
            }
        },
        "sizeBy": "happiness"
    },
    "networks": {
        "webweb": {
            "layers": [
                {
                    "edgeList": [
                        [
                            0,
                            1
                        ],
                        [
                            1,
                            2
                        ],
                        [
                            2,
                            3
                        ],
                        [
                            3,
                            4
                        ],
                        [
                            4,
                            5
                        ]
                    ],
                    "metadata": null,
                    "nodes": null
                }
            ]
        }
    },
    "title": "webweb"
}