eventregistry - v11.0.0
    Preparing search index...

    Class GetCountsEx

    GetCountsEx Obtain information about how frequently a concept or category is mentioned in the articles on particular dates Similar to GetCounts, but the output is more friendly for a larger set of provided uris/ids at once Usage example: q = GetCountsEx(type = "category") q.queryById(range(10)) # return trends of first 10 categories ret = er.execQuery(q) Return object: { "categoryInfo": [ { "id": 0, "label": "Root", "uri": "http://www.dmoz.org" }, { "id": 1, "label": "Recreation", "uri": "http://www.dmoz.org/Recreation" }, ... ], "counts": [ { "0": 23, "1": 42, "2": 52, "3": 32, "4": 21, "5": 65, "6": 32, "7": 654, "8": 1, "9": 34, "date": "2015-05-07" }, ... ] }

    concept/category uri or a list of uris

    Object which contains a host of optional parameters

    Hierarchy

    • CountsBase
      • GetCountsEx
    Index
    params: Record<string, unknown> = {}
    • get path(): string

      Returns string

    • Add a value to an array of values for a property.

      Parameters

      • key: string
      • val: unknown

      Returns void

    • Remove the value of a property key (if existing).

      Parameters

      • key: string

      Returns void

    • Return the parameters.

      Returns Record<string, unknown>

    • Do we have in the query property named 'key'?

      Parameters

      • key: string

      Returns boolean

    • Set a property value that represents date. Value can be string in YYYY-MM-DD format or a Date object.

      Parameters

      • propName: string
      • val: string | Date

      Returns void

    • Parse the value "value" and use it to set the property propName and the operator with name propOperName

      Parameters

      • value: string | QueryItems | unknown[] | undefined

        String, QueryItems or an array.

      • propName: string

        Values to be set using property name propName.

      • propOperName: string | undefined

        Property to set containing the "and" or "or". Relevant only if multiple items are provided in "value". Can be None if only one value is possible.

      • defaultOperName: string

        Which operator should be used in case "value" is an array. If an array, we will print also a warning to suggest use of QueryItems.

      Returns void

    • Set a value of a property in the query.

      Parameters

      • key: string
      • value: unknown

      Returns void

    • Set value in query params if the 'val' is different from 'defVal'.

      Parameters

      • propName: string
      • val: unknown
      • defVal: unknown

      Returns void

    • Encode datetime into UTC ISO format which can be sent to ER.

      Parameters

      • val: string | Date
      • Optionalformat: string

      Returns string