Vega lite trend indicator - kibana

I am new to vega and kibana, and I am trying hard to build an indicator which shows the average monthly change of a field called 'Rating'. So far I was able to get the overal average of Rating, but I can't figure out how to get the current and the previous values so I could make a difference between them. Ideally, if the monthly change goes up we would have a '+' or an upper triangle, and the opposite if it goes down. I can't share my data, but this is my code so far (where DATE is just a datetime field, and Rating are just scores):
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {
"values": [
{"DATE": "2021-01-01", "Rating": 10},
{"DATE": "2021-01-02", "Rating": 8},
{"DATE": "2021-01-03", "Rating": 5},
{"DATE": "2021-01-04", "Rating": 6},
{"DATE": "2021-01-05", "Rating": 9},
{"DATE": "2021-01-06", "Rating": 7},
{"DATE": "2021-01-07", "Rating": 10},
{"DATE": "2021-01-08", "Rating": 4},
{"DATE": "2021-02-01", "Rating": 2},
{"DATE": "2021-02-02", "Rating": 1},
{"DATE": "2021-02-03", "Rating": 3},
{"DATE": "2021_02-04", "Rating": 5},
{"DATE": "2021-02-05", "Rating": 8},
{"DATE": "2021-02-06", "Rating": 3},
{"DATE": "2021-03-01", "Rating": 2},
{"DATE": "2021-03-02", "Rating": 1},
{"DATE": "2021-03-03", "Rating": 3},
{"DATE": "2021_03-04", "Rating": 5},
{"DATE": "2021-03-05", "Rating": 8},
{"DATE": "2021-03-06", "Rating": 3}
]
},
"transform": [
{"calculate": "toDate(datum['DATE'])", "as":"date"},
{"timeUnit":"quarter", "field":"date", "as":"quarter_date"},
{"joinaggregate":[{"op":"average", "field":"Rating", "as":"mean_rating_100"}],"groupby":["quarter_date"]}],
"mark":{"type":"text","fontSize":30,"fontWeight":"bold","tooltip":true},
"encoding":{
"text":{
"field":"mean_rating_100","aggregate":"average", "format":".1f"}},
"config":{
"legend":{"disable":true},
"view":{"stroke":"transparent"}}
}
Any help will be more than welcome!
Thanks!
Updated code:
Vega Editor

The only requirement I understand in here is that you want to calculate the previous minus current rating value. You can use a window transform where you can get the previous data. Since you are new to Vega-lite, you can view the data in the bottom part, there is a data_viewer section which will allow you to check the fields of data that gets generated via transformations (Screenshot of data_viewer)
Below is the sample snippet of a previous minus current values and also the editor. You can try performing and get the mean rating on it.
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {
"values": [
{"DATE": "2021-01-01", "Rating": 10},
{"DATE": "2021-01-02", "Rating": 8},
{"DATE": "2021-01-03", "Rating": 5},
{"DATE": "2021-01-04", "Rating": 6},
{"DATE": "2021-01-05", "Rating": 9},
{"DATE": "2021-01-06", "Rating": 7},
{"DATE": "2021-01-07", "Rating": 10},
{"DATE": "2021-01-08", "Rating": 4},
{"DATE": "2021-02-01", "Rating": 2},
{"DATE": "2021-02-02", "Rating": 1},
{"DATE": "2021-02-03", "Rating": 3},
{"DATE": "2021-02-04", "Rating": 5},
{"DATE": "2021-02-05", "Rating": 8},
{"DATE": "2021-02-06", "Rating": 3},
{"DATE": "2021-03-01", "Rating": 4},
{"DATE": "2021-03-02", "Rating": 6},
{"DATE": "2021-03-03", "Rating": 3},
{"DATE": "2021-03-04", "Rating": 10},
{"DATE": "2021-03-05", "Rating": 8},
{"DATE": "2021-03-06", "Rating": 3}
]
},
"width": 400,
"height": 500,
"transform": [
{"timeUnit": "month", "as": "Month", "field": "DATE"},
{
"aggregate": [{"op": "mean", "field": "Rating", "as": "avg"}],
"groupby": ["Month"]
},
{
"window": [{"op": "lag", "field": "avg", "as": "lastAvg"}],
"frame": [1, 0]
},
{
"calculate": "isValid(datum.lastAvg) ? (datum.avg === datum.lastAvg ? \"/\" : (datum.avg > datum.lastAvg ? \"+\" : \"-\")) : \"/\"",
"as": "diff"
},
{"calculate": "datum.lastAvg-datum.avg", "as": "diff2"},
{"calculate": "datum.lastAvg>datum.avg", "as": "up"},
{"calculate": "datum.lastAvg<datum.avg", "as": "down"},
{
"calculate": "if(datum.up,'🠹',if(datum.down,'🠻','🢝'))",
"as": "symbol2"
},
{"calculate": "datum.symbol2 + ' ' + abs(datum.diff2)", "as": "test"},
{"calculate": "monthFormat(month(datum.Month))", "as": "dateInMonth"},
{"filter": {"field": "dateInMonth", "equal": "March"}}
],
"mark": {
"type": "text",
"fontSize": 30,
"fontWeight": "bold",
"tooltip": true
},
"encoding": {
"text": {"field": "test"},
"y": {
"field": "Month",
"type": "nominal",
"timeUnit": "yearmonth",
"axis": {"labels": false, "ticks": false}
},
"tooltip": [
{"field": "Month"},
{"field": "lastAvg"},
{"field": "avg"},
{"field": "diff"}
]
},
"config": {"legend": {"disable": true}, "view": {"stroke": "transparent"}}
}

I bet window transform would be helpful on comparison between continuous data. You may share some dummy data via Vega Editor if more help is needed=)
Based on the further trial from #MTMM, I further simplify the calculations. To get the last month record, I recommend aggregation of operation argmax instead of filter because it is a bit more dynamic (in case you don't know the filtering criteria, and also treasure every opportunity to try something new~)
2021-07-22 Vega Editor
2021-07-21 Vega Editor

Related

Vega lite add an Interactive Point Highlight

Could anyone helps me to add interactive highlight point on hover? I tried to add props from this example, but it did not work for me.
Here is my spec at Vega Lite Editor
The example is Vega-Lite but your spec is Vega. Try this - it gives a point and a tooltip for you.
{
"description": "Total Count line chart.",
"width": 1200,
"height": 450,
"padding": 5,
"signals": [{"name": "interpolate", "value": "linear"}],
"legends": [
{
"fill": "color",
"orient": "bottom",
"direction": "horizontal",
"symbolType": "square"
}
],
"data": [
{
"name": "table",
"values": [
{"x": 0, "y": 145, "c": "All"},
{"x": 1, "y": 153, "c": "All"},
{"x": 2, "y": 280, "c": "All"},
{"x": 3, "y": 150, "c": "All"},
{"x": 4, "y": 280, "c": "All"},
{"x": 5, "y": 140, "c": "All"},
{"x": 6, "y": 90, "c": "All"},
{"x": 0, "y": 30, "c": "Bulk carrier"},
{"x": 1, "y": 20, "c": "Bulk carrier"},
{"x": 2, "y": 90, "c": "Bulk carrier"},
{"x": 3, "y": 60, "c": "Bulk carrier"},
{"x": 4, "y": 50, "c": "Bulk carrier"},
{"x": 5, "y": 40, "c": "Bulk carrier"},
{"x": 6, "y": 10, "c": "Bulk carrier"},
{"x": 0, "y": 50, "c": "Tanker ship"},
{"x": 1, "y": 10, "c": "Tanker ship"},
{"x": 2, "y": 50, "c": "Tanker ship"},
{"x": 3, "y": 40, "c": "Tanker ship"},
{"x": 4, "y": 110, "c": "Tanker ship"},
{"x": 5, "y": 40, "c": "Tanker ship"},
{"x": 6, "y": 20, "c": "Tanker ship"},
{"x": 0, "y": 5, "c": "Dingy"},
{"x": 1, "y": 23, "c": "Dingy"},
{"x": 2, "y": 20, "c": "Dingy"},
{"x": 3, "y": 0, "c": "Dingy"},
{"x": 4, "y": 30, "c": "Dingy"},
{"x": 5, "y": 20, "c": "Dingy"},
{"x": 6, "y": 0, "c": "Dingy"},
{"x": 0, "y": 50, "c": "Carrier ship"},
{"x": 1, "y": 60, "c": "Carrier ship"},
{"x": 2, "y": 90, "c": "Carrier ship"},
{"x": 3, "y": 40, "c": "Carrier ship"},
{"x": 4, "y": 50, "c": "Carrier ship"},
{"x": 5, "y": 20, "c": "Carrier ship"},
{"x": 6, "y": 40, "c": "Carrier ship"},
{"x": 0, "y": 10, "c": "Other"},
{"x": 1, "y": 40, "c": "Other"},
{"x": 2, "y": 30, "c": "Other"},
{"x": 3, "y": 10, "c": "Other"},
{"x": 4, "y": 40, "c": "Other"},
{"x": 5, "y": 20, "c": "Other"},
{"x": 6, "y": 20, "c": "Other"}
]
}
],
"scales": [
{
"name": "x",
"type": "point",
"range": "width",
"domain": {"data": "table", "field": "x"}
},
{
"name": "y",
"type": "linear",
"range": "height",
"nice": true,
"zero": true,
"domain": {"data": "table", "field": "y"}
},
{
"name": "color",
"type": "ordinal",
"range": [
"#61c7f7",
"#BA20CE",
"#60cf85",
"#cd2c4f",
"#ceae39",
"#ffffff"
],
"domain": {"data": "table", "field": "c"}
}
],
"axes": [
{"orient": "bottom", "scale": "x"},
{"orient": "left", "scale": "y"}
],
"config": {
"style": {
"guide-label": {"fontSize": 14, "fill": "#cccccc", "fontWeight": 800}
},
"axis": {"grid": true, "gridColor": "#333333"}
},
"marks": [
{
"type": "group",
"from": {"facet": {"name": "series", "data": "table", "groupby": "c"}},
"marks": [
{
"type": "line",
"from": {"data": "series"},
"encode": {
"enter": {
"x": {"scale": "x", "field": "x"},
"y": {"scale": "y", "field": "y"},
"stroke": {"scale": "color", "field": "c"},
"strokeWidth": {"value": 2}
},
"update": {
"interpolate": {"signal": "interpolate"},
"strokeOpacity": {"value": 1}
},
"hover": {"strokeOpacity": {"value": 0.5}}
}
},
{
"type": "symbol",
"from": {"data": "series"},
"encode": {
"update": {
"x": {"scale": "x", "field": "x"},
"y": {"scale": "y", "field": "y"},
"fillOpacity": {"value": 0}
},
"hover": {"fillOpacity": {"value": 1},
"tooltip": {
"signal": "{'c':datum.c }"
}
}
}
}
]
}
]
}

#firebase/firestore: Firestore (8.2.2): Connection WebChannel transport errored (HOW TO FIX THIS?) I cant find any solutions its been 1 week already

my Code for firestore
my Code for firestore SET
I have tried:
firebase.firestore().settings({ experimentalForceLongPolling: true,merge:true });
firebase.firestore().settings({ experimentalForceLongPolling: true });
firebase.firestore().settings({ experimentalAutoDetectLongPolling:true});
Nothing works ... still getting the error.
This is the ERROR:
WARN [2022-07-07T23:56:51.946Z] #firebase/firestore: Firestore (8.2.2): Connection WebChannel transport errored: {"a": {"C": null, "K": [Circular], "a":
{"A": 0, "B": [U], "C": true, "F": 45000, "G": false, "I": true, "J": -1, "K": "qWV1iUI-i7uAv4TY0w-d_A", "Ka": 5000, "Ma": false, "Na": false, "Oa": false,
"P": 0, "Pa": 2, "Qa": undefined, "R": [Object], "S": 0, "T": 65073, "Ta": 1, "U": true, "Ua": 10000, "V": 4, "X": false, "Y": [Object], "a": null, "b": [zd], "c": [bc], "f": [Z], "fa": false, "g": [Array], "ga": undefined, "h": null, "ha": "https://firestore.googleapis.com/google.firestore.v1.Firestore/Write/channel", "i": null, "ia": "", "j": null, "ja": 8, "l": null, "m": null, "ma": 12, "na": [U], "o": 3, "oa": 600000, "pa": "Gw6V9oY7XHlRiEFuqqRCs5zpnZf9pAwBw2sVbO1PSVM", "qa": -1, "ra": [Ed], "s": null, "u": 0, "v": "gsessionid"}, "b": {"database": "projects/banana-ee2ef/databases/(default)"}, "c": {"a": [Object], "b": 4, "src": [Circular]}, "f": {"a": [Circular]}, "i": undefined, "j": false, "l": true, "m": true, "o": "https://firestore.googleapis.com/google.firestore.v1.Firestore/Write/channel"}, "defaultPrevented": false, "status": 1, "target": {"C": null, "K": [Circular], "a": {"A": 0, "B": [U], "C": true, "F": 45000, "G": false, "I": true, "J": -1, "K": "qWV1iUI-i7uAv4TY0w-d_A", "Ka": 5000, "Ma": false, "Na": false, "Oa": false, "P": 0, "Pa": 2, "Qa": undefined, "R": [Object], "S": 0, "T": 65073, "Ta": 1, "U": true, "Ua": 10000, "V": 4, "X": false, "Y": [Object], "a": null, "b": [zd], "c": [bc], "f": [Z], "fa": false, "g": [Array], "ga": undefined, "h": null, "ha": "https://firestore.googleapis.com/google.firestore.v1.Firestore/Write/channel", "i": null, "ia": "", "j": null, "ja": 8, "l": null, "m": null, "ma": 12, "na": [U], "o": 3, "oa": 600000, "pa": "Gw6V9oY7XHlRiEFuqqRCs5zpnZf9pAwBw2sVbO1PSVM", "qa": -1, "ra": [Ed], "s": null, "u": 0, "v": "gsessionid"}, "b": {"database": "projects/banana-ee2ef/databases/(default)"}, "c": {"a": [Object], "b": 4, "src": [Circular]}, "f": {"a": [Circular]}, "i": undefined, "j": false, "l": true, "m": true, "o": "https://firestore.googleapis.com/google.firestore.v1.Firestore/Write/channel"}, "type": "c"}
There's a similar error discussed here but it's related configuration of the local emulator. Are you using the emulator?
Are you only having problems with the 'set' method with this particular collection and/or document?
Note, that the Firestore reference should be the db reference obtained from the below method.
const db = firebase.firestore();.
It's not really clear how you are setting up the database. Could you share that code here too?
And just a minor comment. You can simplify your code like below:
{
userId,
email,
password,
username,
}
See https://attacomsian.com/blog/javascript-object-property-shorthand

Why does using vertical orientation for my layered line plot not do anything?

If I change horizontal to vertical here, the axes don't switch:
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"layer": [{
"data": {"values": [
{"x": 0.5, "y": 0},
{"x": 1, "y": 1},
{"x": 2, "y": 2}]},
"mark": {"type": "line", "orient": "horizontal"},
"encoding": {
"x": {"field": "x", "type": "quantitative"},
"y": {"field": "y", "type": "quantitative"},
"color": {"datum": "a"}}
}, {
"data": {"values": [
{"x": 1, "y": 0},
{"x": 2, "y": 1},
{"x": 2.5, "y": 2}]},
"mark": {"type": "line", "orient": "horizontal"},
"encoding": {
"x": {"field": "x", "type": "quantitative"},
"y": {"field": "y", "type": "quantitative"},
"color": {"datum": "b"}}
}
]
}
Why is that? How to get the x-axis and y-axis to switch places?
It's also necessary to switch the "x" and "y" properties of "encoding":
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"layer": [{
"data": {"values": [
{"x": 0.5, "y": 0},
{"x": 1, "y": 1},
{"x": 2, "y": 2}]},
"mark": {"type": "line", "orient": "vertical"},
"encoding": {
"x": {"field": "y", "type": "quantitative"},
"y": {"field": "x", "type": "quantitative"},
"color": {"datum": "a"}}
}, {
"data": {"values": [
{"x": 1, "y": 0},
{"x": 2, "y": 1},
{"x": 2.5, "y": 2}]},
"mark": {"type": "line", "orient": "vertical"},
"encoding": {
"x": {"field": "y", "type": "quantitative"},
"y": {"field": "x", "type": "quantitative"},
"color": {"datum": "b"}}
}
]
}

Vega-lite heat map text properties

Good time of day!
all text - https://github.com/vega/vega-lite/issues/5697
When building data in a block, I would like to change the font size and position of the text in the block. Used the documentation -https://vega.github.io/vega-lite/docs/title.html, but it does not work.
block:
{
"mark": "text"
"encoding": {
"text": {"field": "z", "type": "quantitative"}
"color": {"value": "black"}
"fontSize": 40
}
Changing the position will allow for the addition of a second text:
full code:
{
"$schema": "https://vega.github.io/schema/vega-lite/v2.4.3.json",
"config": {"view": {"height": 300, "width": 400}},
"data": {
"values": [
{"x": 0, "y": 0, "z": 0},
{"x": 1, "y": 0, "z": 1},
{"x": 2, "y": 0, "z": 4},
#{"x": 3, "y": 0, "z": 9},
{"x": 4, "y": 0, "z": 16},
#{"x": 5, "y": 0, "z": 25},
{"x": 0, "y": 1, "z": 1},
{"x": 1, "y": 1, "z": 2},
{"x": 2, "y": 1, "z": 5},
{"x": 3, "y": 1, "z": 10},
#{"x": 4, "y": 1, "z": 17},
{"x": 5, "y": 1, "z": 26}]
},
"encoding": {
"x": {"field": "x", "type": "ordinal", title: "X"}
"y": {"field": "y", "type": "ordinal", title: "Y"}
}
"layer": [
{
"mark": "rect"
from: {data: "values"}
"encoding": {
"color": {
"field": "z"
"scale": {"scheme": "redyellowgreen"}
"type": "quantitative"
}
}
}
{
"mark": "text"
"encoding": {
"text": {"field": "z", "type": "quantitative"}
"color": {"value": "black"}
"fontSize": 40
}
}
]
}
2 I'd like a temperature map without spaces. It is possible if create a variable to count all x by "groupby":[y]
Help me please.
There is no fontSize encoding, but you can set a fontSize mark property:
{
"mark": {"type": "text", "fontSize": 40},
"encoding": {
"text": {"field": "z", "type": "quantitative"},
"color": {"value": "black"}
}
}
To offset text vertically, you can use the dy mark property, which specifies a number of pixels by which to vertically offset the text:
{
"mark": {"type": "text", "fontSize": 20, "dy": -20},
"encoding": {
"text": {"value": "text"},
"color": {"value": "black"}
}
}
As for computing new x values to fill-in spaces, you can do this with a Window Transform.
Here is a modified version of your example that puts all of this together (view in vega editor):
{
"$schema": "https://vega.github.io/schema/vega-lite/v2.4.3.json",
"config": {"view": {"height": 300, "width": 400}},
"data": {
"values": [
{"x": 0, "y": 0, "z": 0},
{"x": 1, "y": 0, "z": 1},
{"x": 2, "y": 0, "z": 4},
{"x": 4, "y": 0, "z": 16},
{"x": 0, "y": 1, "z": 1},
{"x": 1, "y": 1, "z": 2},
{"x": 2, "y": 1, "z": 5},
{"x": 3, "y": 1, "z": 10},
{"x": 5, "y": 1, "z": 26}
]
},
"transform": [
{"window": [{"op": "count", "field": "x", "as": "x2"}], "groupby": ["y"]}
],
"encoding": {
"x": {"field": "x2", "type": "ordinal", "title": "X"},
"y": {"field": "y", "type": "ordinal", "title": "Y"}
},
"layer": [
{
"mark": "rect",
"encoding": {
"color": {
"field": "z",
"scale": {"scheme": "redyellowgreen"},
"type": "quantitative"
}
}
},
{
"mark": {"type": "text", "fontSize": 20, "dy": -20},
"encoding": {
"text": {"value": "text"},
"color": {"value": "black"}
}
},
{
"mark": {"type": "text", "fontSize": 40, "dy": 20},
"encoding": {
"text": {"field": "z", "type": "quantitative"},
"color": {"value": "black"}
}
}
]
}

Google Places API - Places Details Request 404

Have a weird problem with Google Maps Api. I make an autocomplete request to the Google Api Places like this.
https://maps.googleapis.com/maps/api/place/autocomplete/json?sensor=true&language=en&types=geocode&components=country:ua&input=Kiev,%20Dn&radius=30000&location=50.431698,30.503237&key={key}
The result gives me 5 addresses. Here is the JSON response:
{
"predictions": [{
"description": "Dniprovs'kyi district, Kiev, Kyiv city, Ukraine",
"id": "023b6f6008f0b58208c7c1360c15966d591ebbf5",
"matched_substrings": [{
"length": 2,
"offset": 0
},
{
"length": 4,
"offset": 23
}
],
"place_id": "ChIJ-2Pud7La1EARRomoyKV9Nvg",
"reference": "CoQBcQAAAM61hA62d_nNjn2xs7ooCbeAFvnHn9tlTWYxqxotYheKHD6-XVLEcTvnkRss16cMRVXF-9Wk3EmvrRm_R4_Tnvwyd1XVno0TWSk30OBb8b7n_f9rZjOgir0LIFDVDgVJY0cWmx5WHG2rxxtW_qz1r37-tw39WA6g6Qfv0yGf8-H2EhB1B8ZaolsxZ6IKgSp49aJHGhTSd8BUIKFeJ4Rbvh5cjqytLN8mBQ",
"terms":
[
{
"offset": 0,
"value": "Dniprovs'kyi district"
},
{
"offset": 23,
"value": "Kiev"
},
{
"offset": 29,
"value": "Kyiv city"
},
{
"offset": 40,
"value": "Ukraine"
}
],
"types":
[
"sublocality_level_1",
"sublocality",
"political",
"geocode"
]
},
{
"description": "Dniprovs'ka embankment, Kiev, Kyiv city, Ukraine",
"id": "584f6c97be66f9dfd62c318ce83f6534004a6c8a",
"matched_substrings":
[{
"length": 2,
"offset": 0
},
{
"length": 4,
"offset": 24
}
],
"place_id": "EjBEbmlwcm92cydrYSBlbWJhbmttZW50LCBLaWV2LCBLeWl2IGNpdHksIFVrcmFpbmU",
"reference": "CmReAAAAtDXrk0vEFiKYHNPPhPXYBoQOJ38NGGjbUf7mTRH8-_cqtiIkTDDsZXzuUSATgr_uiflldtH4nUrhW0rsFmUtrkQIUz6CZCGRQTUdAJh83zagGLcuVEs1xchGY1A2izTOEhCaI_oBksWVRhO_CRaYvgSzGhQr0eOrWKZV1GJoHpGbvrtO6QZ_Ug",
"terms":
[{
"offset": 0,
"value": "Dniprovs'ka embankment"
},
{
"offset": 24,
"value": "Kiev"
},
{
"offset": 30,
"value": "Kyiv city"
},
{
"offset": 41,
"value": "Ukraine"
}
],
"types":
[
"route",
"geocode"
]
},
{
"description": "Dnepr, Kiev, Kyiv city, Ukraine",
"id": "a3c4a39941ac4c54c2b176849696118af448a090",
"matched_substrings": [{
"length": 2,
"offset": 0
},
{
"length": 4,
"offset": 7
}
],
"place_id": "ChIJjcChbKPP1EARTXya5VgHmOk",
"reference": "CmRYAAAAZuPj8SP1flByvXUVAcO3eeYb-das4IJeBPxo_usffK_Oq2mZFPZdPwhyCmyCfrCECX5ZwssyGQdaEWCCkSkyKbDCq3ZPxbEqYlyGXDFGNJ4DqGn7mXVoEHwMKKb5DG3sEhBaeZXXm9Fh-zh_Ajl0paRKGhSy1Z9s4Uv1AU609L0sztasqQU6rg",
"terms":
[
{
"offset": 0,
"value": "Dnepr"
},
{
"offset": 7,
"value": "Kiev"
},
{
"offset": 13,
"value": "Kyiv city"
},
{
"offset": 24,
"value": "Ukraine"
}
],
"types":
[
"subway_station",
"train_station",
"transit_station",
"establishment",
"geocode"
]
},
{
"description": "Dnepr, Parkova Road, Kiev, Kyiv city, Ukraine",
"id": "973dc14397b70d5be6d2ddd3c5bc2a6e2de04b59",
"matched_substrings":
[{
"length": 2,
"offset": 0
},
{
"length": 4,
"offset": 21
}
],
"place_id": "ChIJQ_49j7LP1EARLXp2vRI8pws",
"reference": "CnRlAAAAiR50_V3AfqkhvGnoHhc4n6QjXkm-aWerLtLHEhxD6cJmGuirRktoafooAdbbGOzh97TSk1MklDfBs0fyrQgRnVjkDzzjioCspJ1La6gh8I8BUC0LTpABJOlkjrvz5wpC0HhXgYm4EbHqwZZY2aBYdBIQVqbAYC42ALmzxEqWXL5H9RoU4g-MKNF34R3Y9c_-5Z7lxf9n1vY",
"terms":
[{
"offset": 0,
"value": "Dnepr"
},
{
"offset": 7,
"value": "Parkova Road"
},
{
"offset": 21,
"value": "Kiev"
},
{
"offset": 27,
"value": "Kyiv city"
},
{
"offset": 38,
"value": "Ukraine"
}
],
"types":
[
"establishment",
"geocode"
]
},
{
"description": "Dnipro, Kiev, Kyiv city, Ukraine",
"id": "9e94078fbf056913f1bf0e3de90b04fc261d21b0",
"matched_substrings":
[{
"length": 2,
"offset": 0
},
{
"length": 4,
"offset": 8
}
],
"place_id": "ChIJMe5dbqPP1EARSnZi_bKNY0A",
"reference": "CmRYAAAAbkjesqoz4jiN86mZU5KG_hNatcXIc5GJMHvSzmIKgedGz5hmlVl_QKqyO1vupXGBLOi-wx64i0e_15mgNQbwjzGBabLTDuAC0H73PD9Dz3w0C4hMqHhsNjJmRsKLYTFMEhCvwWcBT_EWiCU5Fmr32bn2GhRKADBuv9Qq52rH2Ru5-0EdDPWlGw",
"terms":
[{
"offset": 0,
"value": "Dnipro"
},
{
"offset": 8,
"value": "Kiev"
},
{
"offset": 14,
"value": "Kyiv city"
},
{
"offset": 25,
"value": "Ukraine"
}
],
"types":
[
"bus_station",
"transit_station",
"establishment",
"geocode"
]
}
],
"status": "OK"
}
After this I try to get the place details for each address. Everything works fine for 4 of the addresses, but for the address "Dniprovs'ka embankment, Kiev, Kyiv city, Ukraine" with placeid
EjBEbmlwcm92cydrYSBlbWJhbmttZW50LCBLaWV2LCBLeWl2IGNpdHksIFVrcmFpbmU
the Google Places API responses
404: request:
https://maps.googleapis.com/maps/api/place/details/json?placeid=EjBEbmlwcm92cydrYSBlbWJhbmttZW50LCBLaWV2LCBLeWl2IGNpdHksIFVrcmFpbmU&key={key}
, response: {"html_attributions": [ ],"status": "NOT_FOUND"}
What am I doing wrong?
Thanks for help.

Resources