def __init__(self) -> None: self.name = "Time-based playback details (view percentage)" self.dimensions = Dimensions( ZeroOrMore("subscribedStatus", "youtubeProduct"), ZeroOrOne("day", "month"), ) self.filters = Filters( ZeroOrOne("country", "province", "continent", "subContinent"), ZeroOrOne("video", "group"), ZeroOrMore("subscribedStatus", "youtubeProduct"), ) self.metrics = Metrics(*data.VIEW_PERCENTAGE_PLAYBACK_DETAIL_METRICS) self.sort_options = SortOptions(*self.metrics.values)
def __init__(self) -> None: self.name = "Viewer demographics" self.dimensions = Dimensions( OneOrMore("ageGroup", "gender"), ZeroOrMore("liveOrOnDemand", "subscribedStatus"), ) self.filters = Filters( ZeroOrOne("country", "province", "continent", "subContinent"), ZeroOrOne("video", "group"), ZeroOrMore("liveOrOnDemand", "subscribedStatus"), ) self.metrics = Metrics("viewerPercentage") self.sort_options = SortOptions(*self.metrics.values)
def __init__(self) -> None: self.name = "Traffic sources" self.dimensions = Dimensions( Required("insightTrafficSourceType"), ZeroOrMore("day", "liveOrOnDemand", "subscribedStatus"), ) self.filters = Filters( ZeroOrOne("country", "province", "continent", "subContinent"), ZeroOrOne("video", "group"), ZeroOrMore("liveOrOnDemand", "subscribedStatus"), ) self.metrics = Metrics(*data.LOCATION_AND_TRAFFIC_METRICS) self.sort_options = SortOptions(*self.metrics.values)
def __init__(self) -> None: self.name = "Geography-based playback details (view percentage, US)" self.dimensions = Dimensions( Required("province"), ZeroOrMore("subscribedStatus", "youtubeProduct"), ) self.filters = Filters( Required("country==US"), ZeroOrOne("video", "group"), ZeroOrMore("subscribedStatus", "youtubeProduct"), ) self.metrics = Metrics(*data.VIEW_PERCENTAGE_PLAYBACK_DETAIL_METRICS) self.sort_options = SortOptions(*self.metrics.values)
def __init__(self) -> None: self.name = "Geography-based playback details (live)" self.dimensions = Dimensions( Required("country"), ZeroOrMore("liveOrOnDemand", "subscribedStatus", "youtubeProduct"), ) self.filters = Filters( ZeroOrOne("continent", "subContinent"), ZeroOrOne("video", "group"), ZeroOrMore("liveOrOnDemand", "subscribedStatus", "youtubeProduct"), ) self.metrics = Metrics(*data.LIVE_PLAYBACK_DETAIL_METRICS) self.sort_options = SortOptions(*self.metrics.values)
def __init__(self) -> None: self.name = "Geography-based activity for playlists (US)" self.dimensions = Dimensions( Required("province"), ZeroOrMore("subscribedStatus", "youtubeProduct"), ) self.filters = Filters( Required("isCurated==1", "country==US"), ZeroOrOne("playlist", "group"), ZeroOrMore("subscribedStatus", "youtubeProduct"), ) self.metrics = Metrics(*data.ALL_PLAYLIST_METRICS) self.sort_options = SortOptions(*self.metrics.values)
def __init__(self) -> None: self.name = "Time-based activity for playlists" self.dimensions = Dimensions( ExactlyOne("day", "month"), ZeroOrMore("subscribedStatus", "youtubeProduct"), ) self.filters = Filters( Required("isCurated==1"), ZeroOrOne("country", "province", "continent", "subContinent"), ZeroOrOne("playlist", "group"), ZeroOrMore("subscribedStatus", "youtubeProduct"), ) self.metrics = Metrics(*data.ALL_PLAYLIST_METRICS) self.sort_options = SortOptions(*self.metrics.values)
def __init__(self) -> None: self.name = "Device types and operating systems for playlists" self.dimensions = Dimensions( Required("deviceType", "operatingSystem"), ZeroOrMore("day", "subscribedStatus", "youtubeProduct"), ) self.filters = Filters( Required("isCurated==1"), ZeroOrOne("country", "province", "continent", "subContinent"), ZeroOrOne("playlist", "group"), ZeroOrMore("subscribedStatus", "youtubeProduct"), ) self.metrics = Metrics(*data.LOCATION_AND_TRAFFIC_PLAYLIST_METRICS) self.sort_options = SortOptions(*self.metrics.values)
def __init__(self) -> None: self.name = "Audience retention" self.dimensions = Dimensions(Required("elapsedVideoTimeRatio")) self.filters = Filters( Required("video"), ZeroOrMore("audienceType", "subscribedStatus", "youtubeProduct"), ) self.metrics = Metrics("audienceWatchRatio", "relativeRetentionPerformance") self.sort_options = SortOptions(*self.metrics.values)
def __init__(self) -> None: self.name = "Operating systems" self.dimensions = Dimensions( Required("operatingSystem"), ZeroOrMore("day", "liveOrOnDemand", "subscribedStatus", "youtubeProduct"), ) self.filters = Filters( ZeroOrOne("country", "province", "continent", "subContinent"), ZeroOrOne("video", "group"), ZeroOrMore( "deviceType", "liveOrOnDemand", "subscribedStatus", "youtubeProduct", ), ) self.metrics = Metrics(*data.LOCATION_AND_TRAFFIC_METRICS) self.sort_options = SortOptions(*self.metrics.values)
def __init__(self) -> None: self.name = "User activity by subscribed status (US)" self.dimensions = Dimensions(Optional("subscribedStatus"), ZeroOrOne("day", "month")) self.filters = Filters( ZeroOrOne("video", "group"), ZeroOrMore("province", "subscribedStatus"), ) self.metrics = Metrics(*data.LESSER_SUBSCRIPTION_METRICS) self.sort_options = SortOptions(*self.metrics.values)
def __init__(self) -> None: self.name = "Top videos by playback detail" self.dimensions = Dimensions(Required("video")) self.filters = Filters( ZeroOrOne("country", "province", "continent", "subContinent"), ZeroOrMore("liveOrOnDemand", "subscribedStatus", "youtubeProduct"), ) self.metrics = Metrics(*data.VIEW_PERCENTAGE_PLAYBACK_DETAIL_METRICS) self.sort_options = SortOptions(*data.TOP_VIDEOS_SORT_OPTIONS, descending_only=True) self.max_results = 200
def __init__(self) -> None: self.name = "Top playlists" self.dimensions = Dimensions(Required("playlist")) self.filters = Filters( Required("isCurated==1"), ZeroOrOne("country", "province", "continent", "subContinent"), ZeroOrMore("playlist", "subscribedStatus", "youtubeProduct"), ) self.metrics = Metrics(*data.ALL_PLAYLIST_METRICS) self.sort_options = SortOptions(*data.TOP_VIDEOS_SORT_OPTIONS) self.max_results = 200
def __init__(self) -> None: self.name = "Traffic sources (detailed)" self.dimensions = Dimensions(Required("insightTrafficSourceDetail"), ) self.filters = Filters( Required("insightTrafficSourceType"), ZeroOrOne("country", "province", "continent", "subContinent"), ZeroOrOne("video", "group"), ZeroOrMore("liveOrOnDemand", "subscribedStatus"), ) self.metrics = Metrics(*data.LOCATION_AND_TRAFFIC_METRICS) self.sort_options = SortOptions( *data.LOCATION_AND_TRAFFIC_SORT_OPTIONS, descending_only=True) self.max_results = 25
def __init__(self) -> None: self.name = "Viewer demographics for playlists" self.dimensions = Dimensions( OneOrMore("ageGroup", "gender"), Optional("subscribedStatus"), ) self.filters = Filters( Required("isCurated==1"), ZeroOrOne("country", "province", "continent", "subContinent"), ZeroOrOne("playlist", "group"), ZeroOrMore("subscribedStatus"), ) self.metrics = Metrics("viewerPercentage") self.sort_options = SortOptions(*self.metrics.values)
def __init__(self) -> None: self.name = "Traffic sources for playlists" self.dimensions = Dimensions( Required("insightTrafficSourceType"), ZeroOrMore("day", "subscribedStatus"), ) self.filters = Filters( Required("isCurated==1"), ZeroOrOne("country", "province", "continent", "subContinent"), ZeroOrOne("playlist", "group"), Optional("subscribedStatus"), ) self.metrics = Metrics(*data.LOCATION_AND_TRAFFIC_PLAYLIST_METRICS) self.sort_options = SortOptions(*self.metrics.values)
def dimensions_zero_or_more() -> Dimensions: return Dimensions(ZeroOrMore("day", "month"))
def filters_zero_or_more() -> Filters: return Filters(ZeroOrMore("country", "video"))