BarChart#

Following methods are provided:

class rug.barchart.BarChart(symbol=None)#
get_ratings()#

Returns ratings for past 4 months. Each months is a dict with status and it’s values where values are in absolute number (number of analyst) and percents (ratio).

Returns data in format:

[
    {
        "Strong Buy":{
            "value":"14",
            "percent":60.86956521739131
        },
        "Hold":{
            "value":"9",
            "percent":39.130434782608695
        }
    },
    {
        "Strong Buy":{
            "value":"15",
            "percent":65.21739130434783
        },
        "Hold":{
            "value":"8",
            "percent":34.78260869565217
        }
    },
    {
        "Strong Buy":{
            "value":"15",
            "percent":62.5
        },
        "Moderate Buy":{
            "value":"1",
            "percent":4.166666666666666
        },
        "Hold":{
            "value":"8",
            "percent":33.33333333333333
        }
    },
    {
        "Strong Buy":{
            "value":"17",
            "percent":73.91304347826086
        },
        "Moderate Buy":{
            "value":"1",
            "percent":4.3478260869565215
        },
        "Hold":{
            "value":"5",
            "percent":21.73913043478261
        }
    }
]
Raises:

SymbolNotFound – In case the page doesn’t exist/returns error code.

Returns:

List of each month data.

Return type:

list