Skip to content

Instantly share code, notes, and snippets.

@harazdovskiy
Created December 13, 2022 22:27
Show Gist options
  • Save harazdovskiy/d789d11775f53e5ff2dc12293902f7d7 to your computer and use it in GitHub Desktop.
Save harazdovskiy/d789d11775f53e5ff2dc12293902f7d7 to your computer and use it in GitHub Desktop.
{
"took": 22,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 4675,
"relation": "eq"
},
"max_score": null,
"hits": []
},
"aggregations": {
"country": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": [
{
"key": "Asia",
"doc_count": 1220,
"chart": {
"buckets": [
{
"key_as_string": "2022-11-28T00:00:00.000Z",
"key": 1669593600000,
"doc_count": 159,
"sales": {
"value": 11236.015625
}
},
{
"key_as_string": "2022-12-05T00:00:00.000Z",
"key": 1670198400000,
"doc_count": 280,
"sales": {
"value": 23688.4296875
},
"derivative": {
"value": 12452.4140625
}
},
{
"key_as_string": "2022-12-12T00:00:00.000Z",
"key": 1670803200000,
"doc_count": 252,
"sales": {
"value": 19076.01171875
},
"derivative": {
"value": -4612.41796875
}
},
{
"key_as_string": "2022-12-19T00:00:00.000Z",
"key": 1671408000000,
"doc_count": 283,
"sales": {
"value": 21178.5
},
"derivative": {
"value": 2102.48828125
}
},
{
"key_as_string": "2022-12-26T00:00:00.000Z",
"key": 1672012800000,
"doc_count": 246,
"sales": {
"value": 19999.21875
},
"derivative": {
"value": -1179.28125
}
}
]
}
},
{
"key": "North America",
"doc_count": 1206,
"chart": {
"buckets": [
{
"key_as_string": "2022-11-28T00:00:00.000Z",
"key": 1669593600000,
"doc_count": 157,
"sales": {
"value": 11774.9609375
}
},
{
"key_as_string": "2022-12-05T00:00:00.000Z",
"key": 1670198400000,
"doc_count": 275,
"sales": {
"value": 20785.44140625
},
"derivative": {
"value": 9010.48046875
}
},
{
"key_as_string": "2022-12-12T00:00:00.000Z",
"key": 1670803200000,
"doc_count": 271,
"sales": {
"value": 20295.34765625
},
"derivative": {
"value": -490.09375
}
},
{
"key_as_string": "2022-12-19T00:00:00.000Z",
"key": 1671408000000,
"doc_count": 262,
"sales": {
"value": 20754.96875
},
"derivative": {
"value": 459.62109375
}
},
{
"key_as_string": "2022-12-26T00:00:00.000Z",
"key": 1672012800000,
"doc_count": 241,
"sales": {
"value": 18249.84375
},
"derivative": {
"value": -2505.125
}
}
]
}
},
{
"key": "Europe",
"doc_count": 1172,
"chart": {
"buckets": [
{
"key_as_string": "2022-11-28T00:00:00.000Z",
"key": 1669593600000,
"doc_count": 141,
"sales": {
"value": 9556.625
}
},
{
"key_as_string": "2022-12-05T00:00:00.000Z",
"key": 1670198400000,
"doc_count": 255,
"sales": {
"value": 18573
},
"derivative": {
"value": 9016.375
}
},
{
"key_as_string": "2022-12-12T00:00:00.000Z",
"key": 1670803200000,
"doc_count": 276,
"sales": {
"value": 20669.796875
},
"derivative": {
"value": 2096.796875
}
},
{
"key_as_string": "2022-12-19T00:00:00.000Z",
"key": 1671408000000,
"doc_count": 288,
"sales": {
"value": 20540.015625
},
"derivative": {
"value": -129.78125
}
},
{
"key_as_string": "2022-12-26T00:00:00.000Z",
"key": 1672012800000,
"doc_count": 212,
"sales": {
"value": 14499.546875
},
"derivative": {
"value": -6040.46875
}
}
]
}
},
{
"key": "Africa",
"doc_count": 899,
"chart": {
"buckets": [
{
"key_as_string": "2022-11-28T00:00:00.000Z",
"key": 1669593600000,
"doc_count": 95,
"sales": {
"value": 6916.46875
}
},
{
"key_as_string": "2022-12-05T00:00:00.000Z",
"key": 1670198400000,
"doc_count": 208,
"sales": {
"value": 14266.171875
},
"derivative": {
"value": 7349.703125
}
},
{
"key_as_string": "2022-12-12T00:00:00.000Z",
"key": 1670803200000,
"doc_count": 205,
"sales": {
"value": 15303.9609375
},
"derivative": {
"value": 1037.7890625
}
},
{
"key_as_string": "2022-12-19T00:00:00.000Z",
"key": 1671408000000,
"doc_count": 201,
"sales": {
"value": 16171.53125
},
"derivative": {
"value": 867.5703125
}
},
{
"key_as_string": "2022-12-26T00:00:00.000Z",
"key": 1672012800000,
"doc_count": 190,
"sales": {
"value": 15194.15625
},
"derivative": {
"value": -977.375
}
}
]
}
},
{
"key": "South America",
"doc_count": 178,
"chart": {
"buckets": [
{
"key_as_string": "2022-11-28T00:00:00.000Z",
"key": 1669593600000,
"doc_count": 30,
"sales": {
"value": 1971.46875
}
},
{
"key_as_string": "2022-12-05T00:00:00.000Z",
"key": 1670198400000,
"doc_count": 30,
"sales": {
"value": 2135.5625
},
"derivative": {
"value": 164.09375
}
},
{
"key_as_string": "2022-12-12T00:00:00.000Z",
"key": 1670803200000,
"doc_count": 44,
"sales": {
"value": 2863.3125
},
"derivative": {
"value": 727.75
}
},
{
"key_as_string": "2022-12-19T00:00:00.000Z",
"key": 1671408000000,
"doc_count": 39,
"sales": {
"value": 2632.28125
},
"derivative": {
"value": -231.03125
}
},
{
"key_as_string": "2022-12-26T00:00:00.000Z",
"key": 1672012800000,
"doc_count": 35,
"sales": {
"value": 2551.4921875
},
"derivative": {
"value": -80.7890625
}
}
]
}
}
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment