AbRUPT
Hochschule RheinMain

Automated Reasoning for Web Usability Problems

RESTful Webservice for analysis of visual complexity of websites

POST-request with following options are supported

example: http://[host]:[port]/api/v1/complexity?visitors=Color,Vicram

The html to be analyzed needs to be send in the POST body.

returns:JSON-Object

The returned data is in JSON format. It is an object with the selected visitors from above as attributes:

example output for default visitor list:

{
"adblock": [
		"the matched URLs "
],
"vicram": {
		"complexity": float
},
"vizweb": {
        "numberOfLeaves":     integer: number of leav nodes,
        "textArea": float:    text area ratio,
        "visualComplexity":   float: the visual complexit score,
        "numberOfTextGroups": int: number of text groups,
        "hue":                float:  hue from HSV-colorspace,
        "numberOfImageAreas": int: number of areas containing images,
        "horizontalSymmetry": float; symetry of the image ( 1 is symetric),
        "horizontalBalance":  float: the balance of the image,
        "colorfulness":       float: how colorful is the image,
        "nontextArea":        ratio of areas without text
},
"differenceMatrix": {
	"matrix": [
		[
			0,
            359.11558028022,
            256.92605940231,
            228.68755978409,
            166.76030702778,
            210.02142747825,
            244.78153525133
        ],
        [...] // etc.
    ],
	"palette": [
		[
			21, // red
			24, // gree
			25  // blue
		],
        [...]          // etc
    ]
},
"contrast":{
	"1": {
        "A_tag_With_Low_Contrast": int number of A tags with low contrast,
        "TextNodes_With_Low_Contrast": int text nodes with low contrast,
        "paragrahps_with_too_long_lines": int number of paragraphs which exceed the line limit
        }
    },
"ratios": {
	"pageSize": {
		"pageWidth_in_pixel": int the width of the page,
		"pageHeight_in_pixel": int the height of the page,
		"pageSize_in_pixel_squared": int total area of the page
    },
    "img_Tag": {
		"img_Area_in_pixel_squared": int area covered with images,
		"img_document_tag_ratio": float documentArea / tagArea,
		"img_document_tag_percentage": float the image ratio in percent
		}
	}
}

Additionally there is a browser mode available (mainly for debug mode)

GET-requests with following options are supported

example: http://[host]:[port]/api/v1/complexity?url={urlencodedURL}&visitors=Color,Vicram

The returned data is in HTML format