ImperfectJSON

Type: object

This page documents Amplified's internal data format for Advert Views: The Imperfect JSON.

The Imperfect JSON represents a single Advert View and all data associated with that AdView, including demographics, gaze, attentive seconds, channel context, brand name. All in one place, no more joins!

You can surf through this document to see what's availible by default in every ImperfectJSON.
But this Document is only a minimum specification, so pipeline projects may add extra properties at their own discretion.

Type: const Default: "https://imperfect-json.amplifiedintelligence.io/imperfect-schema.json"

Providing this value at the root of the schema informs code ediors of the structure of the file, enabling tooling like autocomplete and hover descriptions

Must be one of:

  • "https://imperfect-json.amplifiedintelligence.io/imperfect-schema.json"
Specific value: "https://imperfect-json.amplifiedintelligence.io/imperfect-schema.json"

Type: string

A unique identifier for this Advert View across all groups.

Type: array
No Additional Items

Each item of this array must be:

Type: object

The list of Projects that were used to generate this Imperfect JSON. Projects should be listed in the order which they were applied.

Type: string

A unique identifier for the repository that modified the file. Should follow the format amplifiedintelligence/[GIT_REPO_NAME]/[SUB_PROJECT]


Examples:

"amplifiedintelligence/groups-monorepo/group-data-recovery"
"amplifiedintelligence/attention-pipeline"
"amplifiedintelligence/output-scripts"

Type: string

A unique version string for the project, if your repository does not use semantic versioning, a short git commit hash should be used instead.


Examples:

"4f2b2bc5"
"1.0.2"

Type: object

A dictionary of metadata relating to the Respondent. Other fields than the keys below may be present.

Type: string

The Collection Group Id this Respondent belongs to. All respondents within a group will usually complete the same set of tasks, with multiple groups per project to represent variations.


Examples:

"K4DQ-2A"
"C9AU-25-1021-LINEARTV"
"C7AU-63-0122-CTV"
"REDC-64-0122-IRL-TWITTER-INFEEDVIDEO"

Type: string

A unique Id for this Respondent within the context of the current GroupId. RespondentIds are usually an incrementing number.


Examples:

"0"
"5"
"00005"

Type: string

A unique Id for each AppSession a respondent launches within the context of the current RespondentId. assignmentIds are usually an incrementing number, but then can also include other text.


Examples:

"0"
"1"
"2"


Type: object

A respondent generated for testing within Amplified.

Type: enum (of string) Default: "internalTest"

Must be one of:

  • "internalTest"
Type: object

A respondent sourced from an external provider I.E. Cint

Panel Providers usually provide an identifier of their own for each Respondent.
Usually these are just UUIDs. So we need to associate these IDs with the Panel
they came from.

Type: enum (of string) Default: "externalProvider"

Must be one of:

  • "externalProvider"


A unique identifier for the Panel Provider.

Type: enum (of string)

Must be one of:

  • "cint"
Type: enum (of string)

Must be one of:

  • "lucid"
Type: enum (of string)

Must be one of:

  • "gapfish"
Type: enum (of string)

Must be one of:

  • "amplified-qualtrics"

Examples:

"cint"
"lucid"
"gapfish"

Type: string

The Identifier issued to the Respondent by their external Panel Provider


Examples:

"04b7ab87-6712-41e6-9cb7-2282969a809c"
"cf29ca1a-a7d3-406f-a25b-df053ffac079"
"9fb2e9c1-3f6b-47dd-a582-8d617b72a4f8"

Type: object

Type: array
No Additional Items

Each item of this array must be:

Type: object

Type: string

A unique identifier for this person.


Example:

"27e109a45bebf5964de6d5d75814d24b31e0549d5fb1bbfb5fe296b45a046814"

Type: boolean

Were the gender & ageRange fields inferred using Machine Learning? If false, assume values were provided through a demographic survey answered by the respondent

Type: string

An ISO 3166 Alpha 2 country code, specifying which country this respondent lives in


Examples:

"AU"
"UK"
"US"
"DE"
"ES"

Type: enum (of string)

The Respondents Gender, if provided

Must be one of:

  • "male"
  • "female"
  • "other"

Type: object

The respondent's age.

Type: integer

Type: string

The respondent's ethnicity. (This field is a string as the survey answers are currently not standardised).

Type: string

The respondent's postcode. (This field is a string as postcode formats differ by region).

Type: object

Information about the Hardware and Software of the Device used to record this AdView.

Type: object

Type: string

The name of the App used to record this Advert View.


Example:

"attentionTRACE Research"


Type: enum (of string)

Must be one of:

  • "iOS"
Type: enum (of string)

Must be one of:

  • "Android"

Type: string

App Version String


Example:

"2.14.2"

Type: object

Apple iOS specific information about the device.

Type: string

iOS Version String


Examples:

"13.1.2"
"15.0"

Type: string

iOS Device String


Examples:

"iPod9,1"
"iPhone11,2"

Type: object

Android specific information about the device.

Type: string

Android Version String


Examples:

"1"
"10"

Type: string

Android Device String


Example:

"Google MBOX"

Type: object

Information about the devices Time Zone


Examples:

{
    "region": "Australia/Adelaide",
    "offset": "+1030"
}
{
    "region": "Etc/UTC",
    "offset": "+0000"
}
{
    "region": "America/Los_Angeles",
    "offset": "+1030"
}

Type: string

An IANA Time Zone Name.

Type: string

An offset from UTC time for the time zone in the format +/-HHMM.

Type: object

Width and Height of the screen when in the "top" interface orientation

Type: integer

Type: integer

Type: object

The BaseModel provided by Pydantic does not allow for extra properties on the object, this is the opposite behaviour to what we want.

Type: object

Metadata fields relating to the advert such as viewId, Format & Type, Brand Name, Aspect Ratio ect.

This is not an exhaustive list of all fields. Other fields may be availible but these are guaranteed.

Type: string

The unique identifier for this Advert View


Example:

"311aa2ae-15d9-47e2-813d-170eebc5f980"

Type: string

The brand that is displayed in this Advertisment, if it exists

Type: string

The aspect ratio of the Advertisment content


Examples:

"1x1, 4x5"
"16x9"

Type: enum (of string)

An enumeration.

Must be one of:

  • "linear_tv_advert"
  • "linear_tv_pre_advert_block"
  • "linear_tv_post_advert_block"
  • "linear_tv_programming"
  • "bvod_advert"
  • "bvod_pre_advert_block"
  • "bvod_post_advert_block"
  • "bvod_programming"
  • "bvod_advert_tv"
  • "bvod_midroll_tv"
  • "bvod_postroll_tv"
  • "bvod_pre_advert_block_tv"
  • "bvod_post_advert_block_tv"
  • "bvod_programming_tv"
  • "facebook_newsfeed_intercept_static"
  • "facebook_newsfeed_intercept_video"
  • "facebook_newsfeed_inthewild_static"
  • "facebook_newsfeed_inthewild_video"
  • "facebook_newsfeed_inthewild_carousel"
  • "facebook_story_intercept_static"
  • "facebook_story_intercept_video"
  • "facebook_midroll_inthewild_video"
  • "instagram_newsfeed_intercept_static"
  • "instagram_newsfeed_intercept_video"
  • "instagram_newsfeed_inthewild_static"
  • "instagram_newsfeed_inthewild_video"
  • "instagram_newsfeed_inthewild_carousel_static"
  • "instagram_newsfeed_inthewild_carousel_video"
  • "instagram_story_intercept_static"
  • "instagram_story_intercept_video"
  • "twitter_newsfeed_intercept_static"
  • "twitter_newsfeed_intercept_video"
  • "twitter_newsfeed_inthewild_static"
  • "twitter_newsfeed_inthewild_video"
  • "twitter_newsfeed_inthewild_carousel_static"
  • "twitter_newsfeed_inthewild_carousel_video"
  • "youtube_preroll_intercept_video"
  • "youtube_preroll_inthewild_video"
  • "youtube_preroll2nd_intercept_video"
  • "youtube_preroll2nd_inthewild_video"
  • "youtube_midroll_inthewild_video"
  • "youtube_postroll_inthewild_video"
  • "teads_inread_video_intercept"
  • "teads_inread_cinemagraph_intercept"
  • "gam_mrec_inTheWild"
  • "snapchat_story_content_video"
  • "snapchat_midroll_inthewild_video"
  • "tiktok_story_intercept_static"
  • "tiktok_story_intercept_video"
  • "generalweb_video"
  • "generalweb_static"
  • "generalweb_rich-media"

Type: enum (of string)

An enumeration.

Must be one of:

  • "video"
  • "static"
  • "rich-media"

Type: enum (of string)

An enumeration.

Must be one of:

  • "facebook"
  • "youtube"
  • "instagram"
  • "snapchat"
  • "twitter"
  • "tiktok"
  • "general-web"
  • "bvod"
  • "bvod-tv"
  • "linear-tv"

Type: number

The length of the media in seconds

Type: string

Type: object

Pretty much everything we write to the ImperfectCSV for each AdView

Type: integer

Type: array
No Additional Items

Each item of this array must be:

Type: object

The ImperfectCSV calculated second by second columns, this object holds all the values for a given second

Type: enum (of string)

An enumeration.

Must be one of:

  • "pre-morning"
  • "morning"
  • "afternoon"
  • "evening"

Type: enum (of string)

An enumeration.

Must be one of:

  • "portrait"
  • "landscape"

Type: enum (of string)

An enumeration.

Must be one of:

  • "notSkippable"
  • "skippableNotSkipped"
  • "skippableAndSkipped"

Type: array
No Additional Items

Each item of this array must be:

Type: object

All the metadata recorded along with each single Frame

Type: integer

The frames index within the Advert View

Type: string

A UTC ISO 8601 timestamp of when the frame was captured

Same definition as startTimestamp

Type: number

How much time has passed in seconds since the advert initially appeared on sceen


Examples:

0.6
1.2
2.4

Type: integer

How much time has passed in seconds since the advert initially appeared on sceen. This value is rounded down to the nearest second to assist with grouping data by seconds


Examples:

0
1
2

Type: object

Metadata detailing where to find the camera image captured with this frame.

All camera frames are saved to a video file, offaisionally when the system is under strain
they can be skipped entirely.

Type: string

Path to the video file containing this frame, relative to respondent.dataPath.

Type: integer

The index of the frame within the above video file.

Type: boolean

Is there a corrsponding frame in the video file? Or was this video frame dropped?


Type: object

A catch all dictionary for the shapes of interest in a mobile advert.
Including Screen, Viewport, Header & Footer (Occluding) & Advert shapes.

All ROIs are relative to the top left of the device screen.

Type: object

A rectange which represents the entire screen. Any coordinate outside of this rectangle should be considered off screen.

Type: array

A list of points that create the boundary of the polygon. The final point should equal the first in order to create a fully enclosed shape

No Additional Items

Each item of this array must be:

Type: object

An object that contains a point in a 2D coordinate system

Type: object

An object that contains the location and dimensions of a rectangle.

Type: number

The y-coordinate of the top side of the rectangle.

Type: number

The x-coordinate of the left side of the rectangle.

Type: object

A rectange which represents the viewport, the viewport is the window within the screen where the Application renders it's content I.E. Web Browser or Video Player window

Same definition as SCREEN_RECT

Type: object

A rectange which represents the advert container, many adverts also include extra space surrounding their content on social media sites to include elements like profile pictures, brand headers, a post description, comments ect.

Same definition as SCREEN_RECT

Type: object

A rectangle which represents the advert media/content. This is usually the video or image within the advert, if it is distinguishable from the container.

Same definition as SCREEN_RECT

Type: array Default: []

A series of shapes that occlude all other elements on the screen. Any portion
of the advert that intercects with one of these shapes should not be considered visible.
Occluding rects are represented as a list, as there can be more than one occluding rect on the
screen. I.E. Header & Footer

No Additional Items

Each item of this array must be:

Type: object

A simple polygon representing an area in a 2D coordinate system.

A rectangular outline of this shape is also provided for convenience.

Same definition as SCREEN_RECT
Type: object

With all of our collections so far. Adverts displayed on TVs have been full screen. Since we don't do pixel
level gaze estimation, none of the Mobile Region Of Interest

There is the potential for this dictionary to be used in future for other requirements. So it is left empty for now.

Type: object

The state of the Video content within an advert for a given framme.

Type: object

Describes the readiness state of the media, based off: [https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/readyState] (https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/readyState)

Type: enum (of string)

No information is available about the media resource

Must be one of:

  • "HAVE_NOTHING"
Type: enum (of string)

Enough of the media resource has been retrieved that the metadata attributes are initialized. Seeking will no longer raise an exception.

Must be one of:

  • "HAVE_METADATA"
Type: enum (of string)

Data is available for the current playback position, but not enough to actually play more than one frame.

Must be one of:

  • "HAVE_CURRENT_DATA"
Type: enum (of string)

Data for the current playback position as well as for at least a little bit of time into the future is available (in other words, at least two frames of video, for example).

Must be one of:

  • "HAVE_FUTURE_DATA"
Type: enum (of string)

Enough data is available—and the download rate is high enough—that the media can be played through to the end without interruption.

Must be one of:

  • "HAVE_ENOUGH_DATA"

Type: boolean

Was the Video playing when the frame was captured.

Type: boolean

Is the video player in fullscreen mode.

Type: number

How much of the video has played in seconds

Type: number

The length of the video in seconds

Type: number

Video player volume between 0 and 1, 0 if muted

Value must be greater or equal to 0 and lesser or equal to 1

Type: object

Type: object


Type: enum (of string)

Must be one of:

  • "top"
Type: enum (of string)

Must be one of:

  • "left"
Type: enum (of string)

Must be one of:

  • "right"
Type: enum (of string)

Must be one of:

  • "bottom"

Type: object

The BaseModel provided by Pydantic does not allow for extra properties on the object, this is the opposite behaviour to what we want.

Type: number

Value must be greater or equal to 0 and lesser or equal to 100

Type: integer

Value must be greater or equal to 0

Type: number

Value must be greater or equal to 0 and lesser or equal to 100

Type: number

Value must be greater or equal to 0 and lesser or equal to 100