Get map guide
How to draw one type of map
GET/v1
What the map shows, the steps to draw it, the fixed values as data, an example answer with made-up brands, a reference drawing (JavaScript, any map answer to an SVG) and a picture of that drawing. Ask a Signal's own map with POST …/map. A variant is the same type drawn from another kind of metric: position_di is a brand_position from a Double Index metric.
Authenticate with an API key in X-Api-Key, or a bearer token in Authorization: Bearer <token>.
Parameters#
Query parameters#
typestring · requiredThe map to draw.
One of
brand_position,demand_space_sizes,brand_profile.themestring · default "light"The colours of
rules.labelsandexample.One of
light,dark.variantstring · nullable · always "position_di"position_di(withbrand_positiononly): the map from aposition_dimetric, with guide rings, faded brands outside the norm and "k of m" markets.
Example request#
curl "https://api.odysseysignal.app/v1/maps/guide?type=brand_position" \
-H "X-Api-Key: $ODYSSEY_API_KEY"Response 200#
application/json.
typestring · requiredOne of
brand_position,demand_space_sizes,brand_profile.variantstring · nullable · always "position_di"titlestring · requiredsummarystring · requiredaskobject · requiredShow 3 fieldsHide fields
methodstring · default "POST"pathstringDefault: /v1/signals/{signal_id}/datasources/{datasource_id}/datasets/{dataset_id}/map
bodyobject · required
stepsarray of string · requirednotesarray of string · requiredrulesobject · requiredThe fixed values a map answer is drawn with, as data.
Show 16 fieldsHide fields
orientationstringDefault: Bearing 0° is straight up and bearings run clockwise. A point is drawn at (cx + rho·R·sin(bearing), cy − rho·R·cos(bearing)) for a map of radius R; rho 1 is the outer circle.
sector_coloursarray of stringsector_colour_beyondstring · default "#B0B0B0"A sector past the eighth.
own_brand_colourstring · default "#09B945"profile_coloursmap of array of stringA competitor's line in a brand profile, in turn, per theme.
themesmap of objectShow 8 fieldsHide fields
dotstring · requiredghoststring · requiredtextstring · requiredsector_fillstring · requiredsector_alphanumber · requiredsector_strokestring · requireddriverstring · requiredaveragestring · required
reference_radius_pxnumber · default 300The map radius every px value here is meant at.
dot_pxnumber · default 12A dot's diameter.
own_dot_pxnumber · default 18driver_dot_px[number, number] · at least 2 items · at most 2 items · default [8,20]A driver's smallest and largest dot; its area follows its share of the largest driver's.
boundary_scalenumber · default 1.5A boundary marker's size, times the dot.
label_flip_rnumber · default 1.4Past this radius a label moves to the side towards the centre (
label_sideon each point says which).sizes_rhonumber · default 0.6profile_averagenumber · default 100profile_floor_maxnumber · default 200A profile's scale reaches at least this far (
profile_scaleon the answer says how far it did).labelsobjectShow 8 fieldsHide fields
font_pxinteger · default 9colourstring · requiredoffset_pxstring · default "dot radius + 2"sidestringDefault: `label_side` on each point: in the top half of the map a point further out than r 1.4 is labelled below, any other above; the bottom half the other way round.
collisionstringDefault: Keep a label next to its dot. When it would cover another label, a dot or a size, try its other side, then right and left of the dot, a little further out at each round; never hide one. A label that ended up more than about 12 px from its dot gets a thin line to it.
sizesstringDefault: A size is written bold at 16 px, as a whole percentage (rounded), centred on its point.
boundary_fillstring · default "#22293C"boundarystringDefault: A `boundary` marker is a hollow ring 1.5× the dot, filled with `boundary_fill` (the map ground), with a 2 px edge in the layer's colour and, inside it, a chevron in that colour pointing outwards: nothing of it reaches past the ring. `hint` is its tooltip.
exampleobject · requiredAn answer with made-up brands and figures, as
POST …/mapgives it.Show 9 fieldsHide fields
typestring · requiredOne of
brand_position,demand_space_sizes,brand_profile.themestring · requiredOne of
light,dark.frameobject · requiredShow 7 fieldsHide fields
orientationstringDefault: Bearing 0° is straight up and bearings run clockwise. A point is drawn at (cx + rho·R·sin(bearing), cy − rho·R·cos(bearing)) for a map of radius R; rho 1 is the outer circle.
outer_circlenumber · default 1ringsarray of numberreference_radius_pxnumber · default 300Every px value in the answer (dots, fonts, offsets) is meant for a map of this radius; scale them with yours.
sectorsarray of objects · requiredShow 10 fieldsHide fields
idinteger · requiredlabelstring · requireddescriptionstring · nullablestart_degnumber · requiredend_degnumber · requiredmid_degnumber · requiredcolourstring · requiredfillstring · requiredfill_alphanumber · requiredstrokestring · required
sector_labelsstringDefault: Each sector's label along its arc, 12 px outside the outer circle, bold 13 px, in `labels.colour` (the theme's text colour), never in the sector's colour.
ribbonobject · nullableA band from
innertoouterof the radius in each sector'scolour. Absent: draw no sector colour at all.Show 2 fieldsHide fields
innernumber · default 0.95outernumber · default 1
radialobject · nullableHow a radius became
draw.rho: the values the answer was computed with.Show 8 fieldsHide fields
scalestring · requiredOne of
linear,log,sigmoid.map_limitnumber · requiredlog_knumber · nullablesigmoid_midpointnumber · nullablesigmoid_steepnessnumber · nullableformulastring · requiredmap_limit_autoboolean · nullableringsarray of number · nullable
profile_scaleobject · nullableShow 4 fieldsHide fields
minnumber · requiredmaxnumber · requiredaveragenumber · default 100formulastringDefault: rho = (value − min) / (max − min); the average is the competitors' 100.
layersarray of objects · requiredShow 7 fieldsHide fields
kindstring · requiredOne of
brands,drivers,sizes,profile,average.labelstring · requiredcolourstring · requiredmetricstring · nullableline_pxnumber · nullabledash[number, number] · nullable · at least 2 items · at most 2 itemspointsarray of objects · requiredShow 21 fieldsHide fields
idinteger or string · requiredlabelstring · requiredtypestring · requiredOne of
brand,ghost,driver,size,profile,average.demand_spaceinteger · nullablevaluenumber or object · nullableShow 2 fieldsHide fields
xnumber · requiredynumber · required
polarobject · nullableThe same point in polar form, as the map draws it.
Derived from
x/y, so it is context rather than a measurement:ris the distance from the centre,thetathe angle from the x-axis counter-clockwise andphithe angle from the top clockwise — the one the demand spaces are cut by — all in radians.radius_trueandoutside_mapcome only from a method that keeps the map's edge as a boundary rather than a position (position2): a brand beyond the edge is drawn on it,ris then the edge, andradius_truehow far out it really is. Absent, not null, otherwise.Show 5 fieldsHide fields
rnumber · nullablethetanumber · nullablephinumber · nullableradius_truenumber · nullableoutside_mapboolean · nullable
drawobject · requiredShow 2 fieldsHide fields
rhonumber · requiredbearing_degnumber · required
outside_mapboolean · default falseradius_truenumber · nullablehintstring · nullablesizenumber · nullablebaseinteger · nullableown_brandboolean · default falsecolourstring · nullabledot_pxnumber · nullablemarkerstring · default "dot"One of
dot,boundary,text,vertex.label_sidestring · nullableOne of
above,below.marketsinteger · nullablemarkets_totalinteger · nullablein_netboolean · nullablelow_baseboolean · nullable
labelsobject · requiredShow 8 fieldsHide fields
font_pxinteger · default 9colourstring · requiredoffset_pxstring · default "dot radius + 2"sidestringDefault: `label_side` on each point: in the top half of the map a point further out than r 1.4 is labelled below, any other above; the bottom half the other way round.
collisionstringDefault: Keep a label next to its dot. When it would cover another label, a dot or a size, try its other side, then right and left of the dot, a little further out at each round; never hide one. A label that ended up more than about 12 px from its dot gets a thin line to it.
sizesstringDefault: A size is written bold at 16 px, as a whole percentage (rounded), centred on its point.
boundary_fillstring · default "#22293C"boundarystringDefault: A `boundary` marker is a hollow ring 1.5× the dot, filled with `boundary_fill` (the map ground), with a 2 px edge in the layer's colour and, inside it, a chevron in that colour pointing outwards: nothing of it reaches past the ring. `hint` is its tooltip.
legendarray of objects · requiredShow 4 fieldsHide fields
labelstring · requiredcolourstring · requiredmarkerstring · requiredOne of
dot,line,text.dash[number, number] · nullable · at least 2 items · at most 2 items
metaobject · requiredShow 6 fieldsHide fields
figures_rulestringHow the figures may be used: as given, never as the input to a new one. The same text on every answer.
Default: Use only the figures in this answer, exactly as given, each with its label, metric, market and period. Never compute a new figure from them: no ratio, no share of a share (such as consideration among those aware), no conversion rate, no difference or change between two figures (give both and say which is higher), no sum, no average, no index. Never estimate, round differently or fill a gap: a figure that is not in an answer is not available, so say so. Every claim, explanation and conclusion must rest on the answers; do not invent reasons the data does not give. Before presenting, check every figure again against the answer it came from and correct or drop any that does not match.
periodobject · nullableThe window the answer covers, every field resolved.
Echoed because a question may leave any of it open and the defaults depend on the Signal and the DataSet, so a client presenting the figures does not have to work them out again.
Show 7 fieldsHide fields
granularitystring · requiredOne of
month,quarter,halfyear,year.lastinteger · requiredendingstring · required · nullableThe period counted back from, as a period id at
granularity: the one asked for, or the latest with data.rollinginteger · requiredMoving-average window in periods; 1 means no smoothing.
complete_onlyboolean · requiredFalse when a last period that has not finished is included.
pooledboolean · default falsePresent, and true, only when the window spans several periods and each figure covers all of it as one span (the portal's "whole period pooled"), so no row names a period: unsmoothed, and not broken down by period. Group by
periodfor a figure per period.last_completeboolean · nullableWhether the last period the answer holds (
ending) had finished by the latest data the Signal may read: false means its figures cover only the months so far. Left out when the waves are not dated.
warningsarray of stringquery_idsarray of stringapplied_filtersarray of objectsShow 4 fieldsHide fields
dimensionstring · requiredlabelstring · requiredoriginstring · requiredrequestwhen the question named these members;signal_defaultwhen it left the filter open and the Signal's default filled it in (its standard market, its default competitors: see the DataSet'sdefaults);defaultwhen it left the filter open and the answer covers every member available to it.One of
request,signal_default,default.membersarray of objects · requiredShow 4 fieldsHide fields
idstring or integer or boolean · requiredlabelstring · required · nullableNull when this DataSet has no such member; the answer then carries a warning saying so.
rolestring · nullableOn a brand:
focuswhen the question named it infocus,standard_brandwhen it is the Signal's standard brand, added because the question named no focus. Absent otherwise.One of
focus,standard_brand.has_rowsboolean · default truePresent, and false, only when the rows break the answer down by this dimension and none of them is this member: the answer has no data for it, and a warning names it.
environmentstring · nullableThe data environment the answer was read in,
prodortest: the one Odyssey set on the Signal, or the one an Odyssey person picked for this call.
reference_drawingobject · requiredShow 3 fieldsHide fields
languagestring · default "javascript"usagestringDefault: drawMap(map, size) returns an SVG string of `size` px for any answer of `POST …/map`, every type and both themes. Use it as it is, or as the reference for your own drawing.
codestring · required
imageobject · requiredShow 3 fieldsHide fields
pngstring · requiredsvgstring · requiredaltstring · required
Errors#
Errors are application/problem+json (RFC 9457): type, title, status, detail and, for some, more fields that say how to fix the call. The type is https://api.odysseysignal.app/problems/<code>.
| Status | Code | When |
|---|---|---|
| 400 | invalid-request | The request is not valid for this DataSet; detail says why. |
| 401 | unauthorized | No credential, or one that is not accepted. |
| 403 | forbidden | The credential is valid but does not cover what was asked. |
| 404 | not-found | Nothing there, or nothing this credential may read. |
| 422 | validation-failed | The request does not match the contract; errors lists each field. |
| 429 | rate_limited | Too many requests, or the monthly quota is used up. |
| 503 | unavailable | A service behind the API did not answer; try again. |