Skip to content

Instantly share code, notes, and snippets.

@wylieconlon
Created January 13, 2021 16:02
Show Gist options
  • Save wylieconlon/e72b30da35615fc6c59b3a0eef779117 to your computer and use it in GitHub Desktop.
Save wylieconlon/e72b30da35615fc6c59b3a0eef779117 to your computer and use it in GitHub Desktop.
{
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"title": "Visu interessante",
"data": {
"format": {
"property": "aggregations.sube.buckets"
},
"values": {
"took": 29,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"skipped": 0,
"failed": 0
},
"hits": {
"total": 303746,
"max_score": null,
"hits": []
},
"aggregations": {
"sube": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 2348,
"buckets": [
{
"key": "beev",
"doc_count": 72215,
"transacoes_por_mcc": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 5694,
"buckets": [
{
"key": "GROCERY STORES AND SUPERMARKETS",
"doc_count": 9551
},
{
"key": "FAST FOOD RESTAURANTS",
"doc_count": 7154
},
{
"key": "EATING PLACES AND RESTAURANTS",
"doc_count": 3385
},
{
"key": "MISCELLANEOUS FOOD STORES - CONVENIENCE STORES AND SPECIALTY MARKETS",
"doc_count": 2639
},
{
"key": "BAKERIES",
"doc_count": 1720
},
{
"key": "SERVICE STATIONS (WITH OR WITHOUT ANCILLARY SERVICES)",
"doc_count": 1425
},
{
"key": "FINANCIAL INSTITUTIONS - AUTOMATED CASH DISBURSEMENTS",
"doc_count": 1381
},
{
"key": "WHOLESALE CLUBS",
"doc_count": 1181
},
{
"key": "DEPARTMENT STORES",
"doc_count": 1103
},
{
"key": "TAXICABS AND LIMOUSINES",
"doc_count": 874
}
]
}
},
{
"key": "li",
"doc_count": 52415,
"transacoes_por_mcc": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 4784,
"buckets": [
{
"key": "GROCERY STORES AND SUPERMARKETS",
"doc_count": 7036
},
{
"key": "FAST FOOD RESTAURANTS",
"doc_count": 4627
},
{
"key": "EATING PLACES AND RESTAURANTS",
"doc_count": 2220
},
{
"key": "BAKERIES",
"doc_count": 2050
},
{
"key": "MISCELLANEOUS FOOD STORES - CONVENIENCE STORES AND SPECIALTY MARKETS",
"doc_count": 1693
},
{
"key": "SERVICE STATIONS (WITH OR WITHOUT ANCILLARY SERVICES)",
"doc_count": 1354
},
{
"key": "WHOLESALE CLUBS",
"doc_count": 926
},
{
"key": "DEPARTMENT STORES",
"doc_count": 574
},
{
"key": "PROFESSIONAL SERVICES, NOT ELSEWHERE CLASSIFIED",
"doc_count": 474
},
{
"key": "CANDY, NUT, AND CONFECTIONERY STORES",
"doc_count": 469
}
]
}
},
{
"key": "sel",
"doc_count": 48417,
"transacoes_por_mcc": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 6660,
"buckets": [
{
"key": "SERVICE STATIONS (WITH OR WITHOUT ANCILLARY SERVICES)",
"doc_count": 4683
},
{
"key": "FINANCIAL INSTITUTIONS - AUTOMATED CASH DISBURSEMENTS",
"doc_count": 3234
},
{
"key": "GROCERY STORES AND SUPERMARKETS",
"doc_count": 2748
},
{
"key": "FAST FOOD RESTAURANTS",
"doc_count": 2214
},
{
"key": "MISCELLANEOUS FOOD STORES - CONVENIENCE STORES AND SPECIALTY MARKETS",
"doc_count": 947
},
{
"key": "EATING PLACES AND RESTAURANTS",
"doc_count": 890
},
{
"key": "BAKERIES",
"doc_count": 834
},
{
"key": "TAXICABS AND LIMOUSINES",
"doc_count": 820
},
{
"key": "DRUG STORES AND PHARMACIES",
"doc_count": 607
},
{
"key": "DEPARTMENT STORES",
"doc_count": 448
}
]
}
},
{
"key": "tramp",
"doc_count": 47850,
"transacoes_por_mcc": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 2372,
"buckets": [
{
"key": "COMPUTER NETWORK/INFORMATION SERVICES",
"doc_count": 12677
},
{
"key": "CABLE, SATELLITE, AND OTHER PAY TELEVISION AND RADIO SERVICES",
"doc_count": 2916
},
{
"key": "DIRECT MARKETING - COMBINATION CATALOG AND RETAIL MERCHANTS",
"doc_count": 1264
},
{
"key": "TAXICABS AND LIMOUSINES",
"doc_count": 1104
},
{
"key": "FAST FOOD RESTAURANTS",
"doc_count": 868
},
{
"key": "DEPARTMENT STORES",
"doc_count": 781
},
{
"key": "VIDEO GAME ARCADES AND ESTABLISHMENTS",
"doc_count": 745
},
{
"key": "Digital Goods—Games",
"doc_count": 410
},
{
"key": "UTILITIES - ELECTRIC, GAS, WATER, AND SANITARY",
"doc_count": 408
},
{
"key": "BOOK STORES",
"doc_count": 380
}
]
}
},
{
"key": "conta",
"doc_count": 42291,
"transacoes_por_mcc": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 6114,
"buckets": [
{
"key": "FAST FOOD RESTAURANTS",
"doc_count": 2626
},
{
"key": "GROCERY STORES AND SUPERMARKETS",
"doc_count": 2443
},
{
"key": "TAXICABS AND LIMOUSINES",
"doc_count": 2328
},
{
"key": "EATING PLACES AND RESTAURANTS",
"doc_count": 1436
},
{
"key": "SERVICE STATIONS (WITH OR WITHOUT ANCILLARY SERVICES)",
"doc_count": 1371
},
{
"key": "FINANCIAL INSTITUTIONS - AUTOMATED CASH DISBURSEMENTS",
"doc_count": 1341
},
{
"key": "BAKERIES",
"doc_count": 1067
},
{
"key": "MISCELLANEOUS FOOD STORES - CONVENIENCE STORES AND SPECIALTY MARKETS",
"doc_count": 1054
},
{
"key": "DRUG STORES AND PHARMACIES",
"doc_count": 741
},
{
"key": "DEPARTMENT STORES",
"doc_count": 598
}
]
}
},
{
"key": "vol",
"doc_count": 17343,
"transacoes_por_mcc": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 3672,
"buckets": [
{
"key": "MEMBERSHIP CLUBS (SPORTS, RECREATION, ATHLETIC), COUNTRY CLUBS, AND PRIVATE GOLF COURSES",
"doc_count": 993
},
{
"key": "GROCERY STORES AND SUPERMARKETS",
"doc_count": 780
},
{
"key": "MISCELLANEOUS AND SPECIALTY RETAIL STORES",
"doc_count": 494
},
{
"key": "JEWELRY, WATCH, CLOCK,, AND SILVERWARE STORES",
"doc_count": 482
},
{
"key": "NONDURABLE GOODS, NOT ELSEWHERE CLASSIFIED",
"doc_count": 482
},
{
"key": "MEN S, WOMEN S, AND CHILDREN S UNIFORMS AND COMMERCIAL CLOTHING",
"doc_count": 473
},
{
"key": "TAXICABS AND LIMOUSINES",
"doc_count": 349
},
{
"key": "WHOLESALE CLUBS",
"doc_count": 330
},
{
"key": "FAST FOOD RESTAURANTS",
"doc_count": 309
},
{
"key": "COMPUTER NETWORK/INFORMATION SERVICES",
"doc_count": 307
}
]
}
},
{
"key": "brasi",
"doc_count": 6031,
"transacoes_por_mcc": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 1107,
"buckets": [
{
"key": "FAST FOOD RESTAURANTS",
"doc_count": 395
},
{
"key": "EATING PLACES AND RESTAURANTS",
"doc_count": 366
},
{
"key": "GROCERY STORES AND SUPERMARKETS",
"doc_count": 317
},
{
"key": "FINANCIAL INSTITUTIONS - AUTOMATED CASH DISBURSEMENTS",
"doc_count": 184
},
{
"key": "MISCELLANEOUS FOOD STORES - CONVENIENCE STORES AND SPECIALTY MARKETS",
"doc_count": 153
},
{
"key": "BAKERIES",
"doc_count": 122
},
{
"key": "SERVICE STATIONS (WITH OR WITHOUT ANCILLARY SERVICES)",
"doc_count": 112
},
{
"key": "DRUG STORES AND PHARMACIES",
"doc_count": 92
},
{
"key": "MISCELLANEOUS PERSONAL SERVICES, NOT ELSEWHERE CLASSIFIED",
"doc_count": 85
},
{
"key": "DIRECT MARKETING - COMBINATION CATALOG AND RETAIL MERCHANTS",
"doc_count": 82
}
]
}
},
{
"key": "asa",
"doc_count": 5525,
"transacoes_por_mcc": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 1110,
"buckets": [
{
"key": "GROCERY STORES AND SUPERMARKETS",
"doc_count": 287
},
{
"key": "FAST FOOD RESTAURANTS",
"doc_count": 274
},
{
"key": "FINANCIAL INSTITUTIONS - AUTOMATED CASH DISBURSEMENTS",
"doc_count": 223
},
{
"key": "SERVICE STATIONS (WITH OR WITHOUT ANCILLARY SERVICES)",
"doc_count": 197
},
{
"key": "TAXICABS AND LIMOUSINES",
"doc_count": 143
},
{
"key": "WHOLESALE CLUBS",
"doc_count": 133
},
{
"key": "EATING PLACES AND RESTAURANTS",
"doc_count": 116
},
{
"key": "MISCELLANEOUS FOOD STORES - CONVENIENCE STORES AND SPECIALTY MARKETS",
"doc_count": 112
},
{
"key": "COMPUTER NETWORK/INFORMATION SERVICES",
"doc_count": 99
},
{
"key": "BAKERIES",
"doc_count": 68
}
]
}
},
{
"key": "super",
"doc_count": 5313,
"transacoes_por_mcc": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 808,
"buckets": [
{
"key": "FINANCIAL INSTITUTIONS - AUTOMATED CASH DISBURSEMENTS",
"doc_count": 734
},
{
"key": "COMPUTER NETWORK/INFORMATION SERVICES",
"doc_count": 316
},
{
"key": "DIRECT MARKETING - COMBINATION CATALOG AND RETAIL MERCHANTS",
"doc_count": 222
},
{
"key": "FAST FOOD RESTAURANTS",
"doc_count": 98
},
{
"key": "SERVICE STATIONS (WITH OR WITHOUT ANCILLARY SERVICES)",
"doc_count": 96
},
{
"key": "GROCERY STORES AND SUPERMARKETS",
"doc_count": 87
},
{
"key": "PROFESSIONAL SERVICES, NOT ELSEWHERE CLASSIFIED",
"doc_count": 83
},
{
"key": "CABLE, SATELLITE, AND OTHER PAY TELEVISION AND RADIO SERVICES",
"doc_count": 68
},
{
"key": "ADVERTISING SERVICES",
"doc_count": 62
},
{
"key": "MISCELLANEOUS FOOD STORES - CONVENIENCE STORES AND SPECIALTY MARKETS",
"doc_count": 59
}
]
}
},
{
"key": "glo",
"doc_count": 3991,
"transacoes_por_mcc": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 408,
"buckets": [
{
"key": "FAST FOOD RESTAURANTS",
"doc_count": 181
},
{
"key": "COMPUTER PROGRAMMING, DATA PROCESSING, AND INTEGRATED SYSTEMS DESIGN SERVICES",
"doc_count": 175
},
{
"key": "DEPARTMENT STORES",
"doc_count": 109
},
{
"key": "GROCERY STORES AND SUPERMARKETS",
"doc_count": 84
},
{
"key": "DIRECT MARKETING - COMBINATION CATALOG AND RETAIL MERCHANTS",
"doc_count": 66
},
{
"key": "BAKERIES",
"doc_count": 60
},
{
"key": "MISCELLANEOUS FOOD STORES - CONVENIENCE STORES AND SPECIALTY MARKETS",
"doc_count": 58
},
{
"key": "TAXICABS AND LIMOUSINES",
"doc_count": 42
},
{
"key": "UTILITIES - ELECTRIC, GAS, WATER, AND SANITARY",
"doc_count": 39
},
{
"key": "COMPUTER NETWORK/INFORMATION SERVICES",
"doc_count": 33
}
]
}
}
]
}
}
}
},
"transform": [{
"flatten": ["transacoes_por_mcc.buckets"],
"as": ["transacoes"]
}],
"facet": {
"row": {"field": "key"}
},
"spec": {
"mark": "bar",
"encoding": {
"x": {
"field": "transacoes.key",
"type": "nominal",
"sort": "-y",
"axis": {
"title": false
}
},
"y": {
"field": "transacoes.doc_count",
"type": "quantitative",
"axis": {
"title": "Quantidade de MCC"
}
}
}
},
"config": {
"range": {
"category": {
"scheme": "elastic"
}
},
"mark": {
"color": "#54B399"
},
"title": {
"color": "#d4dae5"
},
"style": {
"guide-label": {
"fill": "#98a2b3"
},
"guide-title": {
"fill": "#d4dae5"
},
"group-title": {
"fill": "#d4dae5"
},
"group-subtitle": {
"fill": "#d4dae5"
}
},
"axis": {
"tickColor": "#343741",
"domainColor": "#343741",
"gridColor": "#343741"
},
"background": "transparent"
},
"width": "container",
"height": "container",
"autosize": {
"type": "fit",
"contains": "padding"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment