Skip to content

Instantly share code, notes, and snippets.

@theadam
Last active January 26, 2017 15:44
Show Gist options
  • Save theadam/1218cb7b52827b5de0be884aee6c431b to your computer and use it in GitHub Desktop.
Save theadam/1218cb7b52827b5de0be884aee6c431b to your computer and use it in GitHub Desktop.
esnextbin sketch
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ESNextbin Sketch</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" />
<script>
window.data = [
['Contoso Florida', 'Proseware LCD17W E202 Black', 'Proseware, Inc.', 'Economy', 'Monitors', 4, 509.55],
['Contoso New Jersey', 'Adventure Works CRT15 E101 Black', 'Adventure Works', 'Economy', 'Monitors', 4, 351],
['Contoso New Jersey', 'Adventure Works CRT15 E101 Black', 'Adventure Works', 'Deluxe', 'Monitors', 0, 0],
['Contoso Japan', 'WWI Projector 480p LCD12 Silver', 'Wide World Importers', 'Regular', 'Projectors & Screens', 9, 2038.1],
['Contoso Quebec', 'Proseware Screen 80in E1010 Black', 'Proseware, Inc.', 'Economy', 'Projectors & Screens', 4, 419.65],
['Contoso North America Online Store', 'Adventure Works LCD15 E100 White', 'Adventure Works', 'Economy', 'Monitors', 4, 381.15],
['Contoso Massachusetts', 'WWI CRT17 E106 Black', 'Wide World Importers', 'Economy', 'Monitors', 4, 391.05],
['Contoso Iran', 'WWI Projector 480p LCD12 Silver', 'Wide World Importers', 'Regular', 'Projectors & Screens', 9, 2038.1],
['Contoso Denmark', 'WWI Screen 85in E1010 White', 'Wide World Importers', 'Economy', 'Projectors & Screens', 4, 549.05],
['Contoso South Carolina', 'Proseware Screen 80in E1010 Silver', 'Proseware, Inc.', 'Economy', 'Projectors & Screens', 4, 425.1],
['Contoso Colorado', 'Contoso Projector 480p M481 White', 'Contoso, Ltd', 'Regular', 'Projectors & Screens', 9, 4416.15],
['Contoso Slovenia', 'Contoso Screen 85in E085 White', 'Contoso, Ltd', 'Economy', 'Projectors & Screens', 4, 542.1],
['Contoso Thailand', 'Proseware Projector 1080p LCD86 Silver', 'Proseware, Inc.', 'Deluxe', 'Projectors & Screens', 9, 20655],
['Contoso Shanghai', 'Contoso Screen 80in E080 White', 'Contoso, Ltd', 'Economy', 'Projectors & Screens', 4, 419.65],
['Contoso Alberta', 'Proseware Projector 480p LCD12 White', 'Proseware, Inc.', 'Regular', 'Projectors & Screens', 9, 2061],
['Contoso Australia', 'Proseware Screen 85in E1010 Silver', 'Proseware, Inc.', 'Economy', 'Projectors & Screens', 4, 542.1],
['Contoso Scotland', 'Proseware Scan Jet Digital Flat Bed Scanner M300 Grey', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1076.9],
['Contoso Virginia', 'Proseware Mobile Receipt and Document Scanner M200 Grey', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1026.6],
['Contoso Beijing', 'Proseware Laser Jet All in one X300 White', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1927.2],
['Contoso Alberta', 'Proseware Projector 480p LCD12 Black', 'Proseware, Inc.', 'Regular', 'Projectors & Screens', 9, 2026.65],
['Contoso Beijing', 'Proseware Ink Jet Instant PDF Sheet-Fed Scanner M300 Grey', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1440],
['Contoso Poland', 'Proseware Scan Jet Digital Flat Bed Scanner M300 Grey', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1082.95],
['Contoso Canada', 'Proseware Projector 1080p DLP86 Black', 'Proseware, Inc.', 'Deluxe', 'Projectors & Screens', 9, 21991.2],
['Contoso Syria', 'Proseware Wireless Photo All-in-One Printer M390 Grey', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1654.4],
['Contoso Poland', 'Proseware 23ppm Laser Printer with Wireless and Wired Network Interfaces M680 Black', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1734.6],
['Contoso the Netherlands', 'WWI Desktop PC1.80 E1800 White', 'Wide World Importers', 'Economy', 'Desktops', 12, 2724.315],
['Contoso Quebec', 'Adventure Works Laptop15 M1500 Black', 'Adventure Works', 'Regular', 'Laptops', 9, 6151.2],
['Contoso the Netherlands', 'Adventure Works Desktop PC1.80 ED182 Silver', 'Adventure Works', 'Regular', 'Desktops', 27, 13472.305],
['Contoso Malta', 'Adventure Works Desktop PC1.60 ED160 Brown', 'Adventure Works', 'Economy', 'Desktops', 12, 3212.405],
['Contoso Iran', 'WWI Desktop PC1.80 E1802 White', 'Wide World Importers', 'Economy', 'Desktops', 12, 3598.8],
['Contoso South Carolina', 'Adventure Works Desktop PC1.80 ED182 Silver', 'Adventure Works', 'Regular', 'Desktops', 27, 13472.305],
['Contoso Maryland', 'Fabrikam Laptop19W M9800 Black', 'Fabrikam, Inc.', 'Regular', 'Laptops', 9, 10671.1],
['Contoso Europe', 'Fabrikam Laptop13.3 M3000 Red', 'Fabrikam, Inc.', 'Regular', 'Laptops', 9, 3382],
['Contoso Connecticut', 'WWI Laptop16 M0160 Black', 'Wide World Importers', 'Regular', 'Laptops', 9, 5331.1],
['Contoso Maryland', 'Fabrikam Laptop16W M6080 Black', 'Fabrikam, Inc.', 'Regular', 'Laptops', 9, 8654.65],
['Contoso Switzerland', 'Fabrikam Laptop15 M5000 White', 'Fabrikam, Inc.', 'Regular', 'Laptops', 9, 6256.05],
['Contoso South Korea', 'Fabrikam Laptop19 M9000 Black', 'Fabrikam, Inc.', 'Regular', 'Laptops', 9, 9836.05],
['Contoso Virginia', 'Adventure Works Desktop PC1.80 ED180 Black', 'Adventure Works', 'Regular', 'Desktops', 27, 9944.55],
['Contoso Quebec', 'Proseware LCD17 E200 White', 'Proseware, Inc.', 'Economy', 'Monitors', 4, 386.1],
['Contoso Alaska', 'WWI Desktop PC1.60 E1600 Black', 'Wide World Importers', 'Economy', 'Desktops', 12, 2595.41],
['Contoso Canada', 'Adventure Works Desktop PC1.80 ED180 White', 'Adventure Works', 'Regular', 'Desktops', 27, 9963],
['Contoso North America Online Store', 'WWI Desktop PC1.60 E1600 Black', 'Wide World Importers', 'Economy', 'Desktops', 12, 2606.4075],
['Contoso Guangdong', 'Adventure Works Desktop PC1.60 ED160 White', 'Adventure Works', 'Economy', 'Desktops', 12, 3185.41],
['Contoso North America Online Store', 'Adventure Works LCD17W E203 Black', 'Adventure Works', 'Economy', 'Monitors', 4, 516],
['Contoso Alaska', 'Adventure Works LCD15 E100 Black', 'Adventure Works', 'Economy', 'Monitors', 4, 381.15],
['Contoso Thailand', 'Adventure Works Desktop PC1.80 ED180 White', 'Adventure Works', 'Regular', 'Desktops', 27, 9963],
['Contoso New Jersey', 'Adventure Works CRT19 E10 Black', 'Adventure Works', 'Economy', 'Monitors', 4, 269.1],
['Contoso Malta', 'Proseware LCD17 E200 Black', 'Proseware, Inc.', 'Economy', 'Monitors', 4, 381.15],
['Contoso New York', 'Proseware CRT17 E104 Black', 'Proseware, Inc.', 'Economy', 'Monitors', 4, 224.2],
['Contoso Florida', 'Adventure Works Desktop PC1.80 ED180 White', 'Adventure Works', 'Regular', 'Desktops', 27, 9889.2],
['Contoso Scotland', 'The Phone Company Touch Screen Phones - CRT M11 Gold', 'The Phone Company', 'Economy', 'Touch Screen Phones ', 4, 718.2],
['Contoso Maine', 'Contoso Touch Screen Phones Capacitive M908 Black', 'Contoso, Ltd', 'Regular', 'Touch Screen Phones ', 9, 2756.6],
['Contoso Virginia', 'The Phone Company Touch Screen Phones Capacitive M908 Gold', 'The Phone Company', 'Regular', 'Touch Screen Phones ', 9, 2725.8],
['Contoso Malta', 'The Phone Company Sharp Touch Screen Phones M910 Grey', 'The Phone Company', 'Regular', 'Touch Screen Phones ', 9, 2678.9],
['Contoso the Netherlands', 'Contoso Private Automatic Branch Exchange M65 Black', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 343.112],
['Contoso Guangdong', 'Contoso Sharp Touch Screen Phones M910 Black', 'Contoso, Ltd', 'Regular', 'Touch Screen Phones ', 9, 2663.85],
['Contoso the Netherlands', 'The Phone Company Touch Screen Phones Capacitive M908 Grey', 'The Phone Company', 'Regular', 'Touch Screen Phones ', 9, 2710.4],
['Contoso Alaska', 'The Phone Company Touch Screen Phones - LCD M12 Gold', 'The Phone Company', 'Economy', 'Touch Screen Phones ', 4, 800],
['Contoso Slovenia', 'The Phone Company Touch Screen Phones SAW/On-wall M806 Grey', 'The Phone Company', 'Regular', 'Touch Screen Phones ', 9, 2637],
['Contoso Connecticut', 'Contoso Private Automatic Branch Exchange M65 Black', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 343.112],
['Contoso Malta', 'The Phone Company Touch Screen Phones Infrared M901 Gold', 'The Phone Company', 'Regular', 'Touch Screen Phones ', 18, 5340],
['Contoso Massachusetts', 'Contoso Private Automatic Branch Exchange M65 Black', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 345.0615],
['Contoso Connecticut', 'The Phone Company PDA Phone 3.7 inches M340 Silver', 'The Phone Company', 'Deluxe', 'Smart phones & PDAs ', 9, 2953.5],
['Contoso New Jersey', 'The Phone Company PDA Palm 4.7 inch L850 Black', 'The Phone Company', 'Deluxe', 'Smart phones & PDAs ', 9, 3562.1],
['Contoso Catalog Store', 'The Phone Company PDA Wifi 4.7-inch L290 Black', 'The Phone Company', 'Deluxe', 'Smart phones & PDAs ', 9, 3382],
['Contoso the Netherlands', 'The Phone Company PDA Phone 3.5 inches M320 White', 'The Phone Company', 'Regular', 'Smart phones & PDAs ', 9, 2661.1],
['Contoso Catalog Store', 'The Phone Company Sharp Touch Screen Phones M910 Black', 'The Phone Company', 'Regular', 'Touch Screen Phones ', 9, 2693.95],
['Contoso Connecticut', 'The Phone Company PDA Phone Unlocked 3.5 inches M530 Black', 'The Phone Company', 'Regular', 'Smart phones & PDAs ', 9, 2412],
['Contoso Scotland', 'The Phone Company PDA Phone Unlocked 3.5 inches M530 Silver', 'The Phone Company', 'Regular', 'Smart phones & PDAs ', 9, 2398.6],
['Contoso New Jersey', 'The Phone Company PDA Wifi 4.7-inch L290 White', 'The Phone Company', 'Deluxe', 'Smart phones & PDAs ', 9, 3344],
['Contoso Denmark', 'The Phone Company PDA Phone Unlocked 3.5 inches M530 Black', 'The Phone Company', 'Regular', 'Smart phones & PDAs ', 9, 2412],
['Contoso Quebec', 'The Phone Company PDA Phone Unlocked 3.7 inches M510 White', 'The Phone Company', 'Regular', 'Smart phones & PDAs ', 9, 2094.4],
['Contoso the Netherlands', 'The Phone Company Smart phones 6-LINE SCREEN M21 Gold', 'The Phone Company', 'Regular', 'Smart phones & PDAs ', 9, 2070],
['Contoso Guangdong', 'The Phone Company Smart phones without camera E100 White', 'The Phone Company', 'Economy', 'Smart phones & PDAs ', 4, 496.65],
['Contoso Poland', 'Cigarette Lighter Adapter for Contoso Phones E110 Black', 'Contoso, Ltd', 'Economy', 'Cell phones Accessories', 80, 1997.9505],
['Contoso Shanghai', 'The Phone Company Smart phones without camera E100 Gold', 'The Phone Company', 'Economy', 'Smart phones & PDAs ', 4, 490.2],
['Contoso Massachusetts', 'Cigarette Lighter Adapter for Contoso Phones E110 Red', 'Contoso, Ltd', 'Economy', 'Cell phones Accessories', 80, 1999.2]]; [
['Contoso Catalog Store', 'The Phone Company Smart phones Unlocked International M800 Grey', 'The Phone Company', 'Deluxe', 'Smart phones & PDAs ', 9, 2728],
['Contoso New Jersey', 'The Phone Company Smart phones 160x160 M26 Black', 'The Phone Company', 'Regular', 'Smart phones & PDAs ', 9, 1840.8],
['Contoso Denmark', 'The Phone Company Smart phones Expert M400 White', 'The Phone Company', 'Regular', 'Smart phones & PDAs ', 9, 2655],
['Contoso the Netherlands', 'The Phone Company Smart phones 160x160 M26 Grey', 'The Phone Company', 'Regular', 'Smart phones & PDAs ', 9, 1840.8],
['Contoso Texas', 'Contoso Mini Battery Charger Kit E320 Black', 'Contoso, Ltd', 'Economy', 'Cameras & Camcorders Accessories', 4, 96.2115],
['Contoso Slovenia', 'Contoso USB Cable M250 White', 'Contoso, Ltd', 'Regular', 'Cameras & Camcorders Accessories', 9, 222.5],
['Contoso New York', 'Contoso USB Cable M250 White', 'Contoso, Ltd', 'Regular', 'Cameras & Camcorders Accessories', 9, 223.75],
['Contoso Turkmenistan', 'Contoso Digital Camera/Camcorder USB Cable E324 Purple', 'Contoso, Ltd', 'Economy', 'Cameras & Camcorders Accessories', 4, 107.8],
['Contoso Iran', 'Contoso Rechargeable Li-Ion Battery Pack E300 White', 'Contoso, Ltd', 'Economy', 'Cameras & Camcorders Accessories', 4, 197.4605],
['Contoso New York', 'Contoso Digital Camera/Camcorder USB Cable E324 Black', 'Contoso, Ltd', 'Economy', 'Cameras & Camcorders Accessories', 4, 112],
['Contoso Slovenia', 'Contoso Mini Battery Charger Kit E320 White', 'Contoso, Ltd', 'Economy', 'Cameras & Camcorders Accessories', 4, 98.7105],
['Contoso Turkmenistan', 'Contoso USB Cable M250 Yellow', 'Contoso, Ltd', 'Regular', 'Cameras & Camcorders Accessories', 9, 221.25],
['Contoso Catalog Store', 'Contoso Mini Battery Charger Kit E320 Black', 'Contoso, Ltd', 'Economy', 'Cameras & Camcorders Accessories', 4, 98.7105],
['Contoso South Carolina', 'Contoso Mini Battery Charger Kit E320 Black', 'Contoso, Ltd', 'Economy', 'Cameras & Camcorders Accessories', 4, 99.96],
['Contoso Canada', 'Contoso USB Cable M250 White', 'Contoso, Ltd', 'Regular', 'Cameras & Camcorders Accessories', 9, 222.5],
['Contoso Wisconsin', 'Contoso Phone for MSN E200 White', 'Contoso, Ltd', 'Economy', 'Home & Office Phones', 4, 60.8],
['Contoso New York', 'Contoso 2-Line Corded Cordless Telephone M202 White', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 258.011],
['Contoso North America Online Store', 'Contoso Travel Charger for S-Series Battery E302 Black', 'Contoso, Ltd', 'Economy', 'Cameras & Camcorders Accessories', 4, 227.962],
['Contoso Beijing', 'Contoso Expandable 4-Handset Cordless Phone System M206 White', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 387.7185],
['Contoso Denmark', 'Contoso Multi-Use Terminal Cable E308 White', 'Contoso, Ltd', 'Economy', 'Cameras & Camcorders Accessories', 4, 147.96],
['Contoso Texas', 'Contoso Multi-Use Terminal Cable E308 Black', 'Contoso, Ltd', 'Economy', 'Cameras & Camcorders Accessories', 4, 140.562],
['Contoso Japan', 'Contoso Travel Charger for S-Series Battery E302 Black', 'Contoso, Ltd', 'Economy', 'Cameras & Camcorders Accessories', 4, 233.961],
['Contoso New Jersey', 'Contoso Phone for MSN E200 Black', 'Contoso, Ltd', 'Economy', 'Home & Office Phones', 4, 64],
['Contoso Massachusetts', 'Contoso 2-Line Speakerphone M109 Grey', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 316.712],
['Contoso Denmark', 'Contoso Bedroom Phone with AM/FM Stereo and Call Waiting Caller ID M600 White', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 186.9],
['Contoso Connecticut', 'Contoso Travel Charger for S-Series Battery E302 Black', 'Contoso, Ltd', 'Economy', 'Cameras & Camcorders Accessories', 4, 230.9615],
['Contoso Russia', 'Contoso 2-Line Speakerphone M109 White', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 318.5115],
['Contoso Alberta', 'Contoso 4-Line Expandable Cordless Phone System M900 White', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 198],
['Contoso Scotland', 'Contoso Waterproof Accessory Handset and Charging Cradle M609 Black', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 204.611],
['Contoso Turkmenistan', 'Contoso Expandable 4-Handset Cordless Phone System M206 Black', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 389.909],
['Contoso Malta', 'Contoso KSU-less key system M38 White', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 238.8615],
['Contoso Colorado', 'Contoso Hybrid system M60 Grey', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 259.4605],
['Contoso Syria', 'Contoso Electronic Private Automatic Branch Exchange M90 Black', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 357.9105],
['Contoso Turkmenistan', 'Contoso Behind Centrex X15 White', 'Contoso, Ltd', 'Deluxe', 'Home & Office Phones', 9, 442.4115],
['Contoso Slovenia', 'Contoso Single-line phones E10 Grey', 'Contoso, Ltd', 'Economy', 'Home & Office Phones', 4, 37.962],
['Contoso Shanghai', 'Contoso KSU-less key system M38 Grey', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 241.5605],
['Contoso Wisconsin', 'Contoso Multi-line phones M30 White', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 203.4615],
['Contoso Maine', 'Contoso Dual Handset Cordless Phone System E20 Grey', 'Contoso, Ltd', 'Economy', 'Home & Office Phones', 4, 51.3105],
['Contoso Alaska', 'Contoso In front of Centrex L15 Black', 'Contoso, Ltd', 'Deluxe', 'Home & Office Phones', 9, 418.211],
['Contoso Australia', 'Contoso behind Centrex X15 Grey', 'Contoso, Ltd', 'Deluxe', 'Home & Office Phones', 9, 442.4115],
['Contoso Canada', 'Contoso 3 Handset Cordless Phone System E30 Black', 'Contoso, Ltd', 'Economy', 'Home & Office Phones', 4, 64.562],
['Contoso Quebec', 'Contoso In front of Centrex L15 Grey', 'Contoso, Ltd', 'Deluxe', 'Home & Office Phones', 9, 420.5605],
['Contoso Thailand', 'Contoso 2-Line Speakerphone M109 Black', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 322.1105],
['Contoso Poland', 'Contoso DVD 14-Inch Player Portable L100 Black', 'Contoso, Ltd', 'Deluxe', 'Movie DVD', 9, 2300.9115],
['Contoso Maine', 'Contoso In-Line Coupler E180 White', 'Contoso, Ltd', 'Economy', 'Cell phones Accessories', 80, 267.4975],
['Contoso Maine', 'Contoso DVD 38 DVD Storage Binder E25 Silver', 'Contoso, Ltd', 'Economy', 'Movie DVD', 4, 38.4615],
['Contoso Scotland', 'Contoso DVD 14-Inch Player Portable L100 White', 'Contoso, Ltd', 'Deluxe', 'Movie DVD', 9, 2300.9115],
['Contoso Colorado', 'SV DVD 12-Inch Player Portable M400 Silver', 'Southridge Video', 'Regular', 'Movie DVD', 9, 1610.9105],
['Contoso South Carolina', 'Contoso DVD 7-Inch Player Portable E200 White', 'Contoso, Ltd', 'Economy', 'Movie DVD', 4, 439.96],
['Contoso Connecticut', 'Contoso DVD 9-Inch Player Portable M300 White', 'Contoso, Ltd', 'Regular', 'Movie DVD', 9, 1439.91],
['Contoso Guangdong', 'Contoso DVD 58 DVD Storage Binder M55 Red', 'Contoso, Ltd', 'Regular', 'Movie DVD', 9, 122.9265],
['Contoso Connecticut', 'Contoso DVD 14-Inch Player Portable L100 Black', 'Contoso, Ltd', 'Deluxe', 'Movie DVD', 9, 2339.91],
['Contoso Slovenia', 'Contoso DVD 7-Inch Player Portable E200 Silver', 'Contoso, Ltd', 'Economy', 'Movie DVD', 4, 439.96],
['Contoso Colorado', 'Contoso DVD 48 DVD Storage Binder M50 Red', 'Contoso, Ltd', 'Regular', 'Movie DVD', 9, 160.111],
['Contoso Beijing', 'Contoso DVD 60 DVD Storage Binder L20 Red', 'Contoso, Ltd', 'Deluxe', 'Movie DVD', 18, 407.442],
['Contoso Texas', 'Contoso DVD 55DVD Storage Binder M56 Silver', 'Contoso, Ltd', 'Regular', 'Movie DVD', 9, 113.307],
['Contoso Canada', 'Contoso Rubberized Snap-On Cover Hard Case Cell Phone Protector E160 Silver', 'Contoso, Ltd', 'Economy', 'Cell phones Accessories', 160, 757.926],
['Contoso Thailand', 'SV DVD 15-Inch Player Portable L200 Black', 'Southridge Video', 'Deluxe', 'Movie DVD', 9, 2551.912],
['Contoso Scotland', 'Proseware Ink Jet Instant PDF Sheet-Fed Scanner M300 Black', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1440],
['Contoso Turkmenistan', 'Proseware Slim-Design Fax Machine with Answering System X180 Black', 'Proseware, Inc.', 'Deluxe', 'Printers, Scanners & Fax', 9, 2112.2],
['Contoso Shanghai', 'Proseware Office Jet All-in-One Printer M500 Black', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1450.7],
['Contoso Romania', 'Proseware Color Ink Jet Fax, Copier, Phone M250 Black', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1415.1],
['Contoso the Netherlands', 'Contoso USB 2.0 Dock Station docking station M800 Black', 'Contoso, Ltd', 'Regular', 'Computers Accessories', 9, 269.1],
['Contoso Romania', 'Contoso Car power adapter M90 White', 'Contoso, Ltd', 'Regular', 'Computers Accessories', 9, 177.555],
['Contoso Quebec', 'Contoso Car power adapter M90 Black', 'Contoso, Ltd', 'Regular', 'Computers Accessories', 9, 175.56],
['Contoso Florida', 'Contoso Education Essentials Bundle M300 White', 'Contoso, Ltd', 'Regular', 'Computers Accessories', 9, 83.6],
['Contoso New York', 'Contoso Enhanced Capacity Battery M800 Black', 'Contoso, Ltd', 'Regular', 'Computers Accessories', 9, 245.52],
['Contoso Iran', 'Contoso Optical Wheel OEM PS/2 Mouse E60 Black', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 8, 102.05],
['Contoso Massachusetts', 'Contoso Optical Wheel OEM PS/2 Mouse E60 Black', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 50.7],
['Contoso Australia', 'Contoso Optical Wheel OEM PS/2 Mouse E60 Black', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 51.35],
['Contoso New York', 'Contoso Notebook Peripheral Kit M69 Grey', 'Contoso, Ltd', 'Regular', 'Computers Accessories', 9, 148.5],
['Contoso Virginia', 'Contoso Power Inverter - DC to AC power inverter E900 Grey', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 36.1],
['Contoso Malta', 'SV 80GB USB2.0 Portable Hard Disk E500 Blue', 'Southridge Video', 'Economy', 'Computers Accessories', 4, 392.7],
['Contoso Wisconsin', 'Contoso Home/Office Laptop Power Adapter E300 Grey', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 96.9],
['Contoso New Jersey', 'Contoso Battery charger - bike E200 Black', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 77.61],
['Contoso Iran', 'Contoso Education Supplies Bundle E200 Grey', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 51.3],
['Contoso Massachusetts', 'Contoso Education Essentials Bundle M300 Grey', 'Contoso, Ltd', 'Regular', 'Computers Accessories', 9, 85.025],
['Contoso Russia', 'Contoso Desktop Alternative Bundle E200 White', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 44.275],
['Contoso Turkmenistan', 'Contoso Desktop Alternative Bundle E200 White', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 43.7],
['Contoso Romania', 'Contoso Battery charger - bike E200 White', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 75.62],
['Contoso Alaska', 'Contoso USB Optical Mouse E200 White', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 62],
['Contoso Scotland', 'Contoso Optical Wheel OEM PS/2 Mouse E60 Grey', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 51.35],
['Contoso Connecticut', 'Contoso Wireless Laser Mouse M55 Silver', 'Contoso, Ltd', 'Regular', 'Computers Accessories', 9, 629.91],
['Contoso South Carolina', 'Contoso Digital camera accessory kit M200 White', 'Contoso, Ltd', 'Regular', 'Computers Accessories', 9, 215.1],
['Contoso Iran', 'Contoso USB Data Link - direct connect adapter E600 White', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 65.065],
['Contoso Malta', 'SV 2GB Laptop memory E800 White', 'Southridge Video', 'Economy', 'Computers Accessories', 4, 211.75],
['Contoso Texas', 'Contoso USB Data Link - direct connect adapter E600 Grey', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 65.065],
['Contoso Guangdong', 'Contoso Enhanced Capacity Battery M800 Grey', 'Contoso, Ltd', 'Regular', 'Computers Accessories', 9, 248.31],
['Contoso Connecticut', 'SV 512MB Laptop memory E800 Black', 'Southridge Video', 'Economy', 'Computers Accessories', 4, 129.162],
['Contoso Iran', 'Contoso Enhanced Capacity Battery M800 White', 'Contoso, Ltd', 'Regular', 'Computers Accessories', 9, 245.52],
['Contoso Massachusetts', 'SV 512MB Laptop memory E800 Silver', 'Southridge Video', 'Economy', 'Computers Accessories', 4, 135.96],
['Contoso Catalog Store', 'Contoso 90W AC/DC Power Adapter E300 Grey', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 45.815],
['Contoso Connecticut', 'SV PCI Network Adapter E904 Silver', 'Southridge Video', 'Economy', 'Computers Accessories', 4, 167.96],
['Contoso Denmark', 'Contoso SLR Camera X143 Silver', 'Contoso, Ltd', 'Deluxe', 'Digital SLR Cameras', 9, 5717.1],
['Contoso Scotland', 'Contoso SLR Camera 35" X358 Silver', 'Contoso, Ltd', 'Regular', 'Digital SLR Cameras', 9, 5026.8],
['Contoso Maine', 'A. Datum SLR Camera X142 Orange', 'A. Datum Corporation', 'Regular', 'Digital SLR Cameras', 9, 3800.3],
['Contoso Alaska', 'Proseware Ink Jet All in one M300 Black', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1495.65],
['Contoso Guangdong', 'Proseware Ink Jet Fax Machine E100 White', 'Proseware, Inc.', 'Economy', 'Printers, Scanners & Fax', 4, 308.1],
['Contoso Syria', 'Proseware Color Ink Jet Fax, Copier, Phone M250 Green', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1431],
['Contoso Alberta', 'Proseware Office Jet All-in-One Printer M500 White', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1442.55],
['Contoso Poland', 'Proseware Office Jet Wireless All-in-One Inkjet Printer M600 White', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1691],
['Contoso Colorado', 'Proseware Ink Jet Fax Machine E100 Black', 'Proseware, Inc.', 'Economy', 'Printers, Scanners & Fax', 4, 300.3],
['Contoso Colorado', 'Proseware Laser Jet All in one X300 Black', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1938.15],
['Contoso Maine', 'Proseware Ink Jet Wireless All-In-One Printer M400 Green', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1141.65],
['Contoso New Jersey', 'Proseware Ink Jet Fax Machine E100 Grey', 'Proseware, Inc.', 'Economy', 'Printers, Scanners & Fax', 4, 308.1],
['Contoso Alberta', 'Proseware Laser Jet Printer E100 Black', 'Proseware, Inc.', 'Economy', 'Printers, Scanners & Fax', 4, 316],
['Contoso Massachusetts', 'Proseware All-In-One Photo Printer M200 Black', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1210.4],
['Contoso Syria', 'Proseware Slim-Design Fax Machine with Answering System X180 White', 'Proseware, Inc.', 'Deluxe', 'Printers, Scanners & Fax', 9, 2076.8],
['Contoso Slovenia', 'SV 8xDVD E100 Black', 'Southridge Video', 'Economy', 'VCD & DVD', 4, 265.65],
['Contoso Virginia', 'Contoso Home Theater System 2.1 Channel E1220 Brown', 'Contoso, Ltd', 'Economy', 'Home Theater System', 4, 766.15],
['Contoso Shanghai', 'SV 16xDVD M320 Silver', 'Southridge Video', 'Regular', 'VCD & DVD', 9, 1071],
['Contoso Texas', 'SV 8xDVD E130 Silver', 'Southridge Video', 'Economy', 'VCD & DVD', 4, 224.755],
['Contoso the Netherlands', 'SV 8xDVD E100 Silver', 'Southridge Video', 'Economy', 'VCD & DVD', 4, 276],
['Contoso Denmark', 'Contoso Home Theater System 5.1 Channel M1530 Black', 'Contoso, Ltd', 'Regular', 'Home Theater System', 9, 3571.05],
['Contoso Australia', 'SV 8xDVD E140 Silver', 'Southridge Video', 'Economy', 'VCD & DVD', 4, 260.7],
['Contoso Beijing', 'SV 16xDVD M320 Silver', 'Southridge Video', 'Regular', 'VCD & DVD', 9, 1071],
['Contoso Quebec', 'Contoso Home Theater System 2.1 Channel E1220 Brown', 'Contoso, Ltd', 'Economy', 'Home Theater System', 4, 786.05],
['Contoso Catalog Store', 'SV 16xDVD M320 Silver', 'Southridge Video', 'Regular', 'VCD & DVD', 9, 1053.15],
['Contoso North America Online Store', 'Litware Home Theater System 2.1 Channel E210 Brown', 'Litware, Inc.', 'Economy', 'Home Theater System', 4, 1136.2],
['Contoso Quebec', 'Litware Home Theater System 2.1 Channel E212 Silver', 'Litware, Inc.', 'Economy', 'Home Theater System', 4, 1139.62],
['Contoso North America Online Store', 'Contoso Home Theater System 4.1 Channel M1410 White', 'Contoso, Ltd', 'Regular', 'Home Theater System', 9, 2944.55],
['Contoso New York', 'Litware Home Theater System 2.1 Channel E212 Silver', 'Litware, Inc.', 'Economy', 'Home Theater System', 4, 1154.615],
['Contoso Romania', 'Contoso Home Theater System 5.1 Channel M1500 White', 'Contoso, Ltd', 'Regular', 'Home Theater System', 9, 3775.2],
['Contoso North America Online Store', 'Contoso Home Theater System 5.1 Channel M1500 Brown', 'Contoso, Ltd', 'Regular', 'Home Theater System', 9, 3775.2],
['Contoso Scotland', 'Contoso Home Theater System 2.1 Channel M1210 Black', 'Contoso, Ltd', 'Regular', 'Home Theater System', 9, 2961],
['Contoso Virginia', 'Contoso Home Theater System 7.1 Channel M1700 White', 'Contoso, Ltd', 'Regular', 'Home Theater System', 9, 7956.55],
['Contoso Malta', 'SV Car Video LCD7W M7080 Silver', 'Southridge Video', 'Regular', 'Car Video', 9, 4400],
['Contoso Florida', 'SV Car Video TFT7 M7001 Silver', 'Southridge Video', 'Regular', 'Car Video', 9, 2781],
['Contoso Virginia', 'SV Car Video TFT6.2W E6281 Silver', 'Southridge Video', 'Economy', 'Car Video', 4, 997.15],
['Contoso South Carolina', 'SV Car Video TFT7 M7000 Black', 'Southridge Video', 'Regular', 'Car Video', 9, 2676.05],
['Contoso Quebec', 'SV Car Video TFT6.2W E6280 Brown', 'Southridge Video', 'Economy', 'Car Video', 4, 1060.2],
['Contoso Virginia', 'SV Car Video AM/FM E1001 Silver', 'Southridge Video', 'Economy', 'Car Video', 4, 832.2],
['Contoso the Netherlands', 'SV Car Video LCD7W M7080 Black', 'Southridge Video', 'Regular', 'Car Video', 9, 4450],
['Contoso Alberta', 'SV Car Video LCD7W M7081 Brown', 'Southridge Video', 'Regular', 'Car Video', 9, 4416.15],
['Contoso New Jersey', 'SV Car Video TFT6.2W E6282 Brown', 'Southridge Video', 'Economy', 'Car Video', 4, 1022.2],
['Contoso Poland', 'SV Car Video AM/FM E1000 Brown', 'Southridge Video', 'Economy', 'Car Video', 4, 756.2],
['Contoso Colorado', 'SV Car Video TFT7 M7001 Brown', 'Southridge Video', 'Regular', 'Car Video', 9, 2781],
['Contoso Denmark', 'SV Car Video LCD7W M7081 Brown', 'Southridge Video', 'Regular', 'Car Video', 9, 4441.1],
['Contoso Shanghai', 'SV Car Video TFT6.2W E6281 Silver', 'Southridge Video', 'Economy', 'Car Video', 4, 1010.1],
['Contoso UK', 'Adventure Works Laptop16 M1601 Red', 'Adventure Works', 'Regular', 'Laptops', 9, 5331.1],
['Contoso China', 'Adventure Works Laptop19W X1980 Blue', 'Adventure Works', 'Deluxe', 'Laptops', 9, 11626.05],
['Contoso Syria', 'Adventure Works Laptop19W X1980 White', 'Adventure Works', 'Deluxe', 'Laptops', 9, 11691],
['Contoso Romania', 'Adventure Works Laptop8.9 E0890 Red', 'Adventure Works', 'Economy', 'Laptops', 4, 1271.4],
['Contoso Greece', 'Proseware Laptop12 M210 Black', 'Proseware, Inc.', 'Regular', 'Laptops', 9, 3446.55],
['Contoso North America Online Store', 'Proseware Laptop15 M510 Black', 'Proseware, Inc.', 'Regular', 'Laptops', 9, 6256.05],
['Contoso Guangdong', 'Contoso 8GB Clock & Radio MP3 Player X850 Black', 'Contoso, Ltd', 'Deluxe', 'MP4&MP3', 9, 2648.1855],
['Contoso Catalog Store', 'Contoso 512MB MP3 Player E51 Silver', 'Contoso, Ltd', 'Economy', 'MP4&MP3', 4, 50.661],
['Contoso Florida', 'Contoso 2G MP3 Player E200 Black', 'Contoso, Ltd', 'Economy', 'MP4&MP3', 4, 83.0445],
['Contoso Wisconsin', 'Contoso 512MB MP3 Player E51 Blue', 'Contoso, Ltd', 'Economy', 'MP4&MP3', 4, 50.661],
['Contoso Poland', 'Contoso 8GB Clock & Radio MP3 Player X850 Silver', 'Contoso, Ltd', 'Deluxe', 'MP4&MP3', 9, 2663.147],
['Contoso Russia', 'WWI 1GB Pulse Smart pen E50 Silver', 'Wide World Importers', 'Economy', 'Recording Pen', 4, 592.3025],
['Contoso Thailand', 'Contoso 2G MP3 Player E200 Blue', 'Contoso, Ltd', 'Economy', 'MP4&MP3', 4, 83.0445],
['Contoso New Jersey', 'Adventure Works 42" LCD HDTV M55 Black', 'Adventure Works', 'Regular', 'Televisions', 9, 6757.0635],
['Contoso Florida', 'Adventure Works 19" Portable LCD HDTV M110 Black', 'Adventure Works', 'Regular', 'Televisions', 9, 2505.9105],
['Contoso Slovenia', 'NT Bluetooth Stereo Headphones E52 Black', 'Northwind Traders', 'Economy', 'Bluetooth Headphones', 4, 102.76],
['Contoso Slovenia', 'Adventure Works 19" Portable LCD HDTV M110 White', 'Adventure Works', 'Regular', 'Televisions', 9, 2491.911],
['Contoso Russia', 'Adventure Works 19" Color Digital TV E35 Brown', 'Adventure Works', 'Economy', 'Televisions', 4, 552.09],
['Contoso Catalog Store', 'Adventure Works 19" Portable LCD HDTV M110 Black', 'Adventure Works', 'Regular', 'Televisions', 9, 2463.912],
['Contoso Connecticut', 'Adventure Works 19" Color Digital TV E35 Black', 'Adventure Works', 'Economy', 'Televisions', 4, 573.6],
['Contoso Quebec', 'Adventure Works 19" Color Digital TV E35 Black', 'Adventure Works', 'Economy', 'Televisions', 4, 566.43],
['Contoso Maine', 'A. Datum Consumer Digital Camera M300 Black', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 1642.05],
['Contoso Thailand', 'A. Datum Full Frame Digital Camera X300 Azure', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 2032.8],
['Contoso New York', 'A. Datum Compact Digital Camera M200 Azure', 'A. Datum Corporation', 'Economy', 'Digital Cameras', 4, 503.1],
['Contoso Poland', 'A. Datum Point Shoot Digital Camera M500 Green', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 1752.3],
['Contoso Texas', 'A. Datum Consumer Digital Camera E100 Azure', 'A. Datum Corporation', 'Deluxe', 'Digital Cameras', 9, 2486.85],
['Contoso Catalog Store', 'A. Datum Full Frame Digital Camera X300 Azure', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 2079],
['Contoso New York', 'A. Datum Consumer Digital Camera M300 Black', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 1660.5],
['Contoso Maine', 'A. Datum Consumer Digital Camera M300 Green', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 1623.6],
['Contoso Scotland', 'A. Datum All in One Digital Camera M200 Black', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 1654.4],
['Contoso Colorado', 'A. Datum Full Frame Digital Camera X300 Pink', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 2067.45],
['Contoso Alberta', 'A. Datum Ultra Compact Digital Camera M190 Black', 'A. Datum Corporation', 'Economy', 'Digital Cameras', 4, 643.5],
['Contoso Massachusetts', 'A. Datum Point n\' Shoot Digital Camera M500 Azure', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 1762.2],
['Contoso Texas', 'A. Datum Full Frame Digital Camera X300 Black', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 2055.9],
['Contoso Florida', 'A. Datum SLR-like Digital Camera M400 Black', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 1762.255],
['Contoso Denmark', 'Fabrikam SLR Camera X147 Grey', 'Fabrikam, Inc.', 'Deluxe', 'Digital SLR Cameras', 9, 5805],
['Contoso Turkmenistan', 'A. Datum Interchangeable lens Non-SLR Digital Camera X250 Pink', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 2371.8],
['Contoso Scotland', 'Fabrikam SLR Camera X146 Black', 'Fabrikam, Inc.', 'Regular', 'Digital SLR Cameras', 9, 5598.1],
['Contoso Canada', 'Fabrikam SLR Camera M150 Green', 'Fabrikam, Inc.', 'Regular', 'Digital SLR Cameras', 9, 3527.1],
['Contoso Romania', 'A. Datum Slim Digital Camera M180 Pink', 'A. Datum Corporation', 'Economy', 'Digital Cameras', 4, 592],
['Contoso Colorado', 'Fabrikam SLR Camera X146 Black', 'Fabrikam, Inc.', 'Regular', 'Digital SLR Cameras', 9, 5661],
['Contoso Canada', 'A. Datum Interchangeable lens Non-SLR Digital Camera X250 Pink', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 2371.8],
['Contoso Maine', 'Fabrikam SLR Camera 35" X358 Grey', 'Fabrikam, Inc.', 'Regular', 'Digital SLR Cameras', 9, 3882.18],
['Contoso Canada', 'Contoso SLR Camera X146 Orange', 'Contoso, Ltd', 'Regular', 'Digital SLR Cameras', 9, 3778.95],
['Contoso Colorado', 'Fabrikam SLR Camera 35" M358 Black', 'Fabrikam, Inc.', 'Economy', 'Digital SLR Cameras', 4, 1262.8],
['Contoso Wisconsin', 'Contoso SLR Camera X146 Orange', 'Contoso, Ltd', 'Regular', 'Digital SLR Cameras', 9, 3821.65],
['Contoso Russia', 'Fabrikam SLR Camera X146 Black', 'Fabrikam, Inc.', 'Regular', 'Digital SLR Cameras', 9, 5629.55],
['Contoso Poland', 'Fabrikam SLR Camera M147 Grey', 'Fabrikam, Inc.', 'Regular', 'Digital SLR Cameras', 9, 2955.9],
['Contoso Russia', 'Contoso SLR Camera M145 Blue', 'Contoso, Ltd', 'Regular', 'Digital SLR Cameras', 9, 3052.7],
['Contoso Alaska', 'Fabrikam SLR Camera M150 Orange', 'Fabrikam, Inc.', 'Regular', 'Digital SLR Cameras', 9, 3527.1],
['Contoso Connecticut', 'A. Datum SLR Camera X136 Silver', 'A. Datum Corporation', 'Regular', 'Digital SLR Cameras', 9, 3778.95],
['Contoso New York', 'A. Datum SLR Camera M140 Pink', 'A. Datum Corporation', 'Economy', 'Digital SLR Cameras', 4, 1248],
['Contoso Texas', 'Contoso SLR Camera 35" X358 Silver Grey', 'Contoso, Ltd', 'Regular', 'Digital SLR Cameras', 9, 5026.8],
['Contoso Syria', 'A. Datum SLR Camera 35" X358 Blue', 'A. Datum Corporation', 'Regular', 'Digital SLR Cameras', 9, 5233.2],
['Contoso Colorado', 'Contoso SLR Camera 35" M358 Grey', 'Contoso, Ltd', 'Regular', 'Digital SLR Cameras', 9, 3150.4],
['Contoso Alberta', 'Contoso SLR Camera 35" X358 Silver Grey', 'Contoso, Ltd', 'Regular', 'Digital SLR Cameras', 9, 5026.8],
['Contoso Romania', 'Fabrikam SLR Camera 35" M358 Silver Grey', 'Fabrikam, Inc.', 'Economy', 'Digital SLR Cameras', 4, 1262.8],
['Contoso Japan', 'A. Datum SLR Camera X136 Silver', 'A. Datum Corporation', 'Regular', 'Digital SLR Cameras', 9, 3821.65],
['Contoso Virginia', 'A. Datum SLR Camera X137 Grey', 'A. Datum Corporation', 'Regular', 'Digital SLR Cameras', 9, 5517.6],
['Contoso New York', 'Fabrikam SLR Camera M148 Silver Grey', 'Fabrikam, Inc.', 'Regular', 'Digital SLR Cameras', 9, 2954.8],
['Contoso Canada', 'A. Datum SLR Camera 35" M358 Silver Grey', 'A. Datum Corporation', 'Regular', 'Digital SLR Cameras', 9, 3008.2],
['Contoso Alaska', 'Contoso DVD 38 DVD Storage Binder E25 Black', 'Contoso, Ltd', 'Economy', 'Movie DVD', 4, 38.4615],
['Contoso Alaska', 'SV DVD 14-Inch Player Portable L100 Silver', 'Southridge Video', 'Deluxe', 'Movie DVD', 9, 2287.912],
['Contoso Shanghai', 'SV DVD 9-Inch Player Portable M300 Black', 'Southridge Video', 'Regular', 'Movie DVD', 9, 1407.912],
['Contoso New York', 'SV DVD 55DVD Storage Binder M56 Silver', 'Southridge Video', 'Regular', 'Movie DVD', 9, 113.307],
['Contoso Virginia', 'SV DVD 15-Inch Player Portable L200 Silver', 'Southridge Video', 'Deluxe', 'Movie DVD', 9, 2609.91],
['Contoso Florida', 'SV DVD 55DVD Storage Binder M56 Red', 'Southridge Video', 'Regular', 'Movie DVD', 9, 112.674],
['Contoso South Carolina', 'SV DVD 58 DVD Storage Binder M55 Black', 'Southridge Video', 'Regular', 'Movie DVD', 9, 122.9265],
['Contoso Beijing', 'SV DVD 12-Inch Player Portable M400 White', 'Southridge Video', 'Regular', 'Movie DVD', 9, 1592.9115],
['Contoso Catalog Store', 'SV DVD 12-Inch Player Portable M400 White', 'Southridge Video', 'Regular', 'Movie DVD', 9, 1592.9115],
['Contoso Alberta', 'SV DVD 58 DVD Storage Binder M55 Red', 'Southridge Video', 'Regular', 'Movie DVD', 9, 125.01],
['Contoso Russia', 'SV DVD 7-Inch Player Portable E200 Black', 'Southridge Video', 'Economy', 'Movie DVD', 4, 417.962],
['Contoso Catalog Store', 'SV DVD 60 DVD Storage Binder L20 Black', 'Southridge Video', 'Deluxe', 'Movie DVD', 9, 203.721],
['Contoso Thailand', 'A. Datum Interchangeable lens Non-SLR Digital Camera X250 Orange', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 2371.8],
['Contoso Malta', 'A. Datum Ultra Compact Digital Camera M190 Orange', 'A. Datum Corporation', 'Economy', 'Digital Cameras', 4, 643.5],
['Contoso Texas', 'A. Datum Interchangeable lens Non-SLR Digital Camera X250 Green', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 2385.2],
['Contoso Japan', 'A. Datum Super-zoom Digital Camera X300 Orange', 'A. Datum Corporation', 'Deluxe', 'Digital Cameras', 9, 2566.5],
['Contoso Slovenia', 'Contoso Bright Light battery E20 Black', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 102.22],
['Contoso Denmark', 'Contoso Bright Light battery E20 Pink', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 104.91],
['Contoso the Netherlands', 'A. Datum All in One Digital Camera M200 Green', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 1682.6],
['Contoso Maine', 'A. Datum Point Shoot Digital Camera M500 Orange', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 1772.1],
['Contoso Beijing', 'A. Datum Interchangeable lens Non-SLR Digital Camera X250 Orange', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 2398.6],
['Contoso New York', 'A. Datum Super-zoom Digital Camera X300 Azure', 'A. Datum Corporation', 'Deluxe', 'Digital Cameras', 9, 2595.5],
['Contoso Poland', 'A. Datum Full Frame Digital Camera X300 Silver Grey', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 2044.35],
['Contoso Beijing', 'A. Datum All in One Digital Camera M200 Green', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 1673.2],
['Contoso Virginia', 'Contoso Bright Light battery E20 blue', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 102.22],
['Contoso Turkmenistan', 'Contoso Bright Light battery E20 blue', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 106.255],
['Contoso Quebec', 'A. Datum Full Frame Digital Camera X300 Silver Grey', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 2067.45],
['Contoso Denmark', 'Contoso Cables To Go USB 2.0 Hard Drive Enclosure E920 Grey', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 47.6],
['Contoso South Carolina', 'Contoso Bright Light battery E20 Pink', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 104.91],
['Contoso Italy', 'WWI CRT17 E106 Black', 'Wide World Importers', 'Economy', 'Monitors', 4, 391.05],
['Contoso Singapore', 'WWI LCD24 X300 Black', 'Wide World Importers', 'Deluxe', 'Monitors', 9, 7289.1],
['Contoso Germany', 'Proseware Projector 480p DLP12 White', 'Proseware, Inc.', 'Regular', 'Projectors & Screens', 9, 4416.15],
['Contoso South Korea', 'Contoso Projector 480p M480 Silver', 'Contoso, Ltd', 'Regular', 'Projectors & Screens', 9, 2015.2],
['Contoso Canada', 'WWI Projector 480p DLP12 Silver', 'Wide World Importers', 'Regular', 'Projectors & Screens', 9, 4441.1],
['Contoso Guangdong', 'Proseware LCD17W E202 Black', 'Proseware, Inc.', 'Economy', 'Monitors', 4, 490.2],
['Contoso Colorado', 'WWI CRT17 E106 White', 'Wide World Importers', 'Economy', 'Monitors', 4, 391.05],
['Contoso Pakistan', 'Contoso Projector 480p M480 Silver', 'Contoso, Ltd', 'Regular', 'Projectors & Screens', 9, 2049.55],
['Contoso New York', 'WWI LCD24 X300 White', 'Wide World Importers', 'Deluxe', 'Monitors', 9, 7289.1],
['Contoso Italy', 'Adventure Works LCD17W E203 White', 'Adventure Works', 'Economy', 'Monitors', 4, 503.1],
['Contoso Russia', 'Adventure Works LCD17W E203 White', 'Adventure Works', 'Economy', 'Monitors', 4, 490.2],
['Contoso North America', 'WWI Projector 480p DLP12 Silver', 'Wide World Importers', 'Regular', 'Projectors & Screens', 9, 4491],
['Contoso Beijing', 'Proseware Projector 480p DLP12 Silver', 'Proseware, Inc.', 'Regular', 'Projectors & Screens', 9, 4466.05],
['Contoso Guangdong', 'Proseware Screen 80in E1010 Silver', 'Proseware, Inc.', 'Economy', 'Projectors & Screens', 4, 414.2],
['Contoso Ireland', 'Proseware Screen 85in E1010 Silver', 'Proseware, Inc.', 'Economy', 'Projectors & Screens', 4, 535.15],
['Contoso Florida', 'Proseware Screen 80in E1010 Silver', 'Proseware, Inc.', 'Economy', 'Projectors & Screens', 4, 425.1],
['Contoso Maine', 'Proseware Projector 480p LCD12 White', 'Proseware, Inc.', 'Regular', 'Projectors & Screens', 9, 2061],
['Contoso South Korea', 'Proseware Projector 1080p LCD86 Silver', 'Proseware, Inc.', 'Deluxe', 'Projectors & Screens', 9, 20425.5],
['Contoso Europe', 'Contoso Projector 480p M480 Black', 'Contoso, Ltd', 'Regular', 'Projectors & Screens', 9, 2049.55],
['Contoso South Carolina', 'WWI Screen 85in E1010 Black', 'Wide World Importers', 'Economy', 'Projectors & Screens', 4, 535.15],
['Contoso Syria', 'Proseware Projector 480p LCD12 Silver', 'Proseware, Inc.', 'Regular', 'Projectors & Screens', 9, 2026.65],
['Contoso Xinjiang', 'Contoso Screen 85in E085 White', 'Contoso, Ltd', 'Economy', 'Projectors & Screens', 4, 542.1],
['Contoso Germany', 'WWI Projector 480p LCD12 White', 'Wide World Importers', 'Regular', 'Projectors & Screens', 9, 2026.65],
['Contoso Virginia', 'WWI Projector 480p LCD12 White', 'Wide World Importers', 'Regular', 'Projectors & Screens', 9, 2026.65],
['Contoso Malta', 'Proseware Screen 85in E1010 Silver', 'Proseware, Inc.', 'Economy', 'Projectors & Screens', 4, 556],
['Contoso North America', 'Contoso Projector 1080p X980 Black', 'Contoso, Ltd', 'Deluxe', 'Projectors & Screens', 9, 20196],
['Contoso Sweden', 'Proseware Screen 80in E1010 Silver', 'Proseware, Inc.', 'Economy', 'Projectors & Screens', 4, 436],
['Contoso New Jersey', 'Proseware All-In-One Photo Printer M200 Grey', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1196.8],
['Contoso South Korea', 'Proseware Projector 480p DLP12 Black', 'Proseware, Inc.', 'Regular', 'Projectors & Screens', 9, 4491],
['Contoso Russia', 'Proseware Projector 480p DLP12 Black', 'Proseware, Inc.', 'Regular', 'Projectors & Screens', 9, 4441.1],
['Contoso Singapore', 'Proseware High-Performance Business-Class Laser Fax X200 Grey', 'Proseware, Inc.', 'Deluxe', 'Printers, Scanners & Fax', 9, 2207.2],
['Contoso Italy', 'Proseware 23ppm Laser Printer with Wireless and Wired Network Interfaces M680 Grey', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1734.6],
['Contoso Ireland', 'Proseware Office Jet All-in-One Printer M500 Grey', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1467],
['Contoso Beijing', 'Proseware Projector 1080p LCD86 Black', 'Proseware, Inc.', 'Deluxe', 'Projectors & Screens', 9, 20655],
['Contoso Turkmenistan', 'Proseware Laser Jet Printer E100 Grey', 'Proseware, Inc.', 'Economy', 'Printers, Scanners & Fax', 4, 304.15],
['Contoso United States', 'Proseware Laser Jet Printer E100 Grey', 'Proseware, Inc.', 'Economy', 'Printers, Scanners & Fax', 8, 616.2],
['Contoso Alberta', 'Proseware Laser Jet Printer E100 Grey', 'Proseware, Inc.', 'Economy', 'Printers, Scanners & Fax', 4, 300.2],
['Contoso Greece', 'Proseware Slim-Design Fax Machine with Answering System X180 Grey', 'Proseware, Inc.', 'Deluxe', 'Printers, Scanners & Fax', 9, 2088.6],
['Contoso Florida', 'Proseware Color Ink Jet Fax, Copier, Phone M250 Grey', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1415.1],
['Contoso Pakistan', 'Fabrikam Budget Moviemaker 1/2\'\' 3mm E300 Black', 'Fabrikam, Inc.', 'Regular', 'Camcorders', 9, 4338],
['Contoso France', 'Fabrikam Laptop14.1 E4101 Red', 'Fabrikam, Inc.', 'Economy', 'Laptops', 4, 1287],
['Contoso New Jersey', 'WWI Desktop PC1.80 E1800 White', 'Wide World Importers', 'Economy', 'Desktops', 12, 2747.305],
['Contoso Kyrgyzstan', 'WWI Desktop PC1.80 E1800 White', 'Wide World Importers', 'Economy', 'Desktops', 12, 2758.8],
['Contoso Catalog Store', 'Adventure Works Desktop PC1.80 ED182 Silver', 'Adventure Works', 'Regular', 'Desktops', 27, 13397.32],
['Contoso New Jersey', 'Adventure Works Desktop PC1.80 ED182 Silver', 'Adventure Works', 'Regular', 'Desktops', 27, 13397.32],
['Contoso Poland', 'Adventure Works Desktop PC1.80 ED182 Silver', 'Adventure Works', 'Regular', 'Desktops', 27, 13447.31],
['Contoso Alaska', 'Fabrikam Laptop16W M6080 Black', 'Fabrikam, Inc.', 'Regular', 'Laptops', 9, 8557.95],
['Contoso Italy', 'Adventure Works Desktop PC1.80 ED180 Silver', 'Adventure Works', 'Regular', 'Desktops', 27, 9963],
['Contoso Greece', 'Adventure Works Desktop PC1.80 ED180 White', 'Adventure Works', 'Regular', 'Desktops', 27, 9963],
['Contoso Germany', 'WWI Desktop PC1.80 E1801 Silver', 'Wide World Importers', 'Economy', 'Desktops', 12, 3238.8],
['Contoso Canada', 'Proseware CRT19 E201 Black', 'Proseware, Inc.', 'Economy', 'Monitors', 4, 276],
['Contoso Alberta', 'Adventure Works LCD17 E200 Black', 'Adventure Works', 'Economy', 'Monitors', 4, 396],
['Contoso Singapore', 'WWI Desktop PC1.60 E1600 Red', 'Wide World Importers', 'Economy', 'Desktops', 12, 2617.405],
['Contoso Turkmenistan', 'Adventure Works Desktop PC1.60 ED160 White', 'Adventure Works', 'Economy', 'Desktops', 12, 3198.9075],
['Contoso Alaska', 'WWI Desktop PC1.80 E1801 Black', 'Wide World Importers', 'Economy', 'Desktops', 12, 3238.8],
['Contoso South Korea', 'Contoso Touch Screen Phones SAW/On-wall M806 Black', 'Contoso, Ltd', 'Regular', 'Touch Screen Phones ', 9, 2622.35],
['Contoso Singapore', 'The Phone Company Touch Screen Phones 26-1.4" M250 Black', 'The Phone Company', 'Regular', 'Touch Screen Phones ', 9, 2358.4],
['Contoso India', 'The Phone Company Sharp Touch Screen Phones M910 Gold', 'The Phone Company', 'Regular', 'Touch Screen Phones ', 9, 2648.8],
['Contoso UK', 'Contoso Touch Screen Phones SAW/On-wall M806 Black', 'Contoso, Ltd', 'Regular', 'Touch Screen Phones ', 9, 2578.4],
['Contoso India', 'Contoso Pen Touch Screen Phones M320 Black', 'Contoso, Ltd', 'Regular', 'Touch Screen Phones ', 9, 2595.5],
['Contoso Europe', 'The Phone Company Touch Screen Phones Infrared M901 Grey', 'The Phone Company', 'Regular', 'Touch Screen Phones ', 9, 2655],
['Contoso Catalog Store', 'The Phone Company Touch Screen Phones - CRT M11 Gold', 'The Phone Company', 'Economy', 'Touch Screen Phones ', 4, 718.2],
['Contoso UK', 'Contoso Pen Touch Screen Phones M320 Black', 'Contoso, Ltd', 'Regular', 'Touch Screen Phones ', 9, 2581],
['Contoso Poland', 'Contoso Pen Touch Screen Phones M320 Black', 'Contoso, Ltd', 'Regular', 'Touch Screen Phones ', 9, 2595.5],
['Contoso Connecticut', 'The Phone Company Touch Screen Phones Infrared M901 Black', 'The Phone Company', 'Regular', 'Touch Screen Phones ', 9, 2670],
['Contoso Malta', 'The Phone Company Touch Screen Phones Capacitive M908 Black', 'The Phone Company', 'Regular', 'Touch Screen Phones ', 9, 2756.6],
['Contoso Pakistan', 'The Phone Company Finger Touch Screen Phones M30 Grey', 'The Phone Company', 'Economy', 'Touch Screen Phones ', 4, 756.2],
['Contoso Sweden', 'The Phone Company Touch Screen Phones - LCD M12 Grey', 'The Phone Company', 'Economy', 'Touch Screen Phones ', 4, 760],
['Contoso North America', 'Contoso Pen Touch Screen Phones M320 Black', 'Contoso, Ltd', 'Regular', 'Touch Screen Phones ', 9, 2566.5],
['Contoso Catalog Store', 'The Phone Company Touch Screen Phones 4-Wire/On-wall M302 Gold', 'The Phone Company', 'Regular', 'Touch Screen Phones ', 9, 2586.55],
['Contoso Canada', 'The Phone Company Touch Screen Phones Capacitive M908 Black', 'The Phone Company', 'Regular', 'Touch Screen Phones ', 9, 2710.4],
['Contoso Italy', 'The Phone Company Touch Screen Phones SAW/On-wall M806 Grey', 'The Phone Company', 'Regular', 'Touch Screen Phones ', 9, 2622.35],
['Contoso Kyrgyzstan', 'The Phone Company Sharp Touch Screen Phones M910 Grey', 'The Phone Company', 'Regular', 'Touch Screen Phones ', 9, 2648.8],
['Contoso Turkmenistan', 'The Phone Company Pen Touch Screen Phones M320 Grey', 'The Phone Company', 'Regular', 'Touch Screen Phones ', 9, 2581],
['Contoso Ireland', 'The Phone Company Touch Screen Phones - LCD M12 Grey', 'The Phone Company', 'Economy', 'Touch Screen Phones ', 4, 770],
['Contoso Thailand', 'The Phone Company Touch Screen Phones Infrared M901 Gold', 'The Phone Company', 'Regular', 'Touch Screen Phones ', 9, 2670],
['Contoso Maine', 'The Phone Company Finger Touch Screen Phones M30 Gold', 'The Phone Company', 'Economy', 'Touch Screen Phones ', 4, 766.15],
['Contoso UK', 'Contoso Touch Screen Phones - LCD M12 Black', 'Contoso, Ltd', 'Economy', 'Touch Screen Phones ', 8, 1570],
['Contoso Colorado', 'Contoso Touch Screen Phones - LCD M12 Black', 'Contoso, Ltd', 'Economy', 'Touch Screen Phones ', 4, 780],
['Contoso Germany', 'The Phone Company Touch Screen Phones - CRT M11 Gold', 'The Phone Company', 'Economy', 'Touch Screen Phones ', 4, 737.1],
['Contoso Massachusetts', 'The Phone Company PDA Wifi 4.7-inch L290 White', 'The Phone Company', 'Deluxe', 'Smart phones & PDAs ', 9, 3420],
['Contoso India', 'The Phone Company PDA Handheld 3.7 inch M630 Black', 'The Phone Company', 'Regular', 'Smart phones & PDAs ', 9, 2367.4],
['Contoso Massachusetts', 'The Phone Company Touch Screen Phones 26-1.4" M250 Grey', 'The Phone Company', 'Regular', 'Touch Screen Phones ', 9, 2358.4],
['Contoso Europe', 'The Phone Company PDA GPS Phone 3.7 inch M930 Silver', 'The Phone Company', 'Regular', 'Smart phones & PDAs ', 9, 2622.4],
['Contoso South Carolina', 'The Phone Company PDA Wifi 4.7-inch L290 Black', 'The Phone Company', 'Deluxe', 'Smart phones & PDAs ', 9, 3382],
['Contoso Poland', 'The Phone Company Touch Screen Phones 26-2.2" M200 Grey', 'The Phone Company', 'Regular', 'Touch Screen Phones ', 9, 2058.5],
['Contoso Florida', 'The Phone Company PDA Phone 4.7 inches L360 White', 'The Phone Company', 'Deluxe', 'Smart phones & PDAs ', 9, 3597.9],
['Contoso North America', 'The Phone Company PDA GPS Phone 4.7 inch L950 Black', 'The Phone Company', 'Deluxe', 'Smart phones & PDAs ', 9, 3312],
['Contoso South Korea', 'The Phone Company Smart phones Unlocked International M800 Gold', 'The Phone Company', 'Deluxe', 'Smart phones & PDAs ', 9, 2790],
['Contoso Russia', 'The Phone Company Smart phones 6-LINE SCREEN M21 Black', 'The Phone Company', 'Regular', 'Smart phones & PDAs ', 9, 2035.5],
['Contoso Pakistan', 'Contoso Rubberized Skin BlackBerry E100 White', 'Contoso, Ltd', 'Economy', 'Cell phones Accessories', 80, 1196.202],
['Contoso South Korea', 'The Phone Company Smart phones Expert M400 Pink', 'The Phone Company', 'Regular', 'Smart phones & PDAs ', 9, 2640],
['Contoso Ireland', 'The Phone Company Smart phones 6-LINE SCREEN M21 White', 'The Phone Company', 'Regular', 'Smart phones & PDAs ', 9, 2058.5],
['Contoso Thailand', 'The Phone Company Smart phones without camera E100 Pink', 'The Phone Company', 'Economy', 'Smart phones & PDAs ', 4, 503.1],
['Contoso India', 'Contoso Rubberized Skin BlackBerry E100 White', 'Contoso, Ltd', 'Economy', 'Cell phones Accessories', 80, 1196.9515],
['Contoso Ireland', 'Contoso Rubberized Skin BlackBerry E100 White', 'Contoso, Ltd', 'Economy', 'Cell phones Accessories', 80, 1198.4505],
['Contoso Russia', 'Contoso Rubberized Skin BlackBerry E100 White', 'Contoso, Ltd', 'Economy', 'Cell phones Accessories', 80, 1198.4505],
['Contoso Greece', 'The Phone Company PDA Phone Unlocked 3.7 inches M510 White', 'The Phone Company', 'Regular', 'Smart phones & PDAs ', 9, 2142],
['Contoso Connecticut', 'Cigarette Lighter Adapter for Contoso Phones E110 Black', 'Contoso, Ltd', 'Economy', 'Cell phones Accessories', 80, 1997.9505],
['Contoso Singapore', 'The Phone Company Smart phones 6-LINE SCREEN M21 Gold', 'The Phone Company', 'Regular', 'Smart phones & PDAs ', 9, 2070],
['Contoso Pakistan', 'Cigarette Lighter Adapter for Contoso Phones E110 White', 'Contoso, Ltd', 'Economy', 'Cell phones Accessories', 80, 1997.9505],
['Contoso Poland', 'Contoso USB Cable M250 Black', 'Contoso, Ltd', 'Regular', 'Cameras & Camcorders Accessories', 9, 222.5],
['Contoso Alaska', 'Contoso USB Cable M250 Blue', 'Contoso, Ltd', 'Regular', 'Cameras & Camcorders Accessories', 9, 222.5],
['Contoso Russia', 'Contoso Mini Battery Charger Kit E320 Black', 'Contoso, Ltd', 'Economy', 'Cameras & Camcorders Accessories', 4, 97.461],
['Contoso Europe', 'Contoso Lens Adapter M450 Grey', 'Contoso, Ltd', 'Regular', 'Cameras & Camcorders Accessories', 9, 598.4],
['Contoso Greece', 'Contoso Rechargeable Li-Ion Battery Pack E300 Black', 'Contoso, Ltd', 'Economy', 'Cameras & Camcorders Accessories', 4, 189.962],
['Contoso Virginia', 'Contoso USB Cable M250 White', 'Contoso, Ltd', 'Regular', 'Cameras & Camcorders Accessories', 9, 222.5],
['Contoso India', 'Contoso 2-Line Corded Cordless Telephone M202 White', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 258.011],
['Contoso Maine', 'Contoso 4-Line Expandable Cordless Phone System M900 Black', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 194.7],
['Contoso New Jersey', 'Contoso 4-Line Expandable Cordless Phone System M900 White', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 193.6],
['Contoso Alberta', 'Contoso Lifestyles Series - Big Button Cordless phone M800 White', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 204.7],
['Contoso Sweden', 'Contoso Waterproof Accessory Handset and Charging Cradle M609 White', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 203.4615],
['Contoso Canada', 'Contoso Integrated Business Phone With card L10 White', 'Contoso, Ltd', 'Deluxe', 'Home & Office Phones', 9, 373.8],
['Contoso Europe', 'Contoso Lifestyles Series - Big Button Cordless phone M800 Black', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 203.55],
['Contoso Virginia', 'Contoso Waterproof Accessory Handset and Charging Cradle M609 White', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 205.7605],
['Contoso Connecticut', 'Contoso Expandable 3-Handset Cordless Phone System M204 White', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 323.91],
['Contoso Sweden', 'Contoso 4-Line Expandable Cordless Phone System M900 Black', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 195.8],
['Contoso Syria', 'Contoso 2-Line Speakerphone M109 White', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 322.1105],
['Contoso Sweden', 'Contoso Carrying Case E312 White', 'Contoso, Ltd', 'Economy', 'Cameras & Camcorders Accessories', 4, 192.346],
['Contoso Virginia', 'Contoso 4-Line Expandable Cordless Phone System M900 White', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 193.6],
['Contoso Alberta', 'Contoso Phone with Memory Dialing-single line E88 Grey', 'Contoso, Ltd', 'Economy', 'Home & Office Phones', 4, 53.922],
['Contoso Alberta', 'Contoso Expandable 4-Handset Cordless Phone System M206 Grey', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 394.29],
['Contoso Canada', 'Contoso Expandable 4-Handset Cordless Phone System M206 Grey', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 392.0995],
['Contoso Guangdong', 'Contoso 3 Handset Cordless Phone System E30 White', 'Contoso, Ltd', 'Economy', 'Home & Office Phones', 4, 67.1105],
['Contoso Malta', 'Contoso Dual Handset Cordless Phone System E20 White', 'Contoso, Ltd', 'Economy', 'Home & Office Phones', 4, 51.96],
['Contoso North America', 'Contoso Travel Charger for S-Series Battery E302 Black', 'Contoso, Ltd', 'Economy', 'Cameras & Camcorders Accessories', 4, 236.9605],
['Contoso Kyrgyzstan', 'Contoso Expandable Cordless Phone System M008 Grey', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 203.4615],
['Contoso Greece', 'Contoso Phone for MSN E200 White', 'Contoso, Ltd', 'Economy', 'Home & Office Phones', 4, 60.8],
['Contoso Colorado', 'Contoso Expandable 4-Handset Cordless Phone System M206 Black', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 394.29],
['Contoso Guangdong', 'Contoso 4 Handset Cordless Phone System M86 White', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 318.5115],
['Contoso India', 'Contoso KSU-less key system M38 Black', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 241.5605],
['Contoso Maine', 'Contoso Dual Handset Cordless Phone System E20 Black', 'Contoso, Ltd', 'Economy', 'Home & Office Phones', 4, 50.0115],
['Contoso Catalog Store', 'Contoso Multi-line phones M30 White', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 202.312],
['Contoso Syria', 'Contoso Dual Handset Cordless Phone System E20 Grey', 'Contoso, Ltd', 'Economy', 'Home & Office Phones', 4, 51.96],
['Contoso Greece', 'Contoso Electronic Private Automatic Branch Exchange M90 White', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 359.91],
['Contoso Kyrgyzstan', 'Contoso 4 Handset Cordless Phone System M86 White', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 320.311],
['Contoso Europe', 'Contoso In front of Centrex L15 Black', 'Contoso, Ltd', 'Deluxe', 'Home & Office Phones', 9, 413.512],
['Contoso New York', 'Contoso Private Automatic Branch Exchange M65 White', 'Contoso, Ltd', 'Regular', 'Home & Office Phones', 9, 345.0615],
['Contoso Maine', 'Contoso Integrated Business Phone With card L10 Black', 'Contoso, Ltd', 'Deluxe', 'Home & Office Phones', 9, 378],
['Contoso India', 'Contoso behind Centrex X15 Black', 'Contoso, Ltd', 'Deluxe', 'Home & Office Phones', 9, 439.912],
['Contoso Virginia', 'Contoso DVD 38 DVD Storage Binder E25 Red', 'Contoso, Ltd', 'Economy', 'Movie DVD', 4, 38.961],
['Contoso South Korea', 'Contoso DVD 58 DVD Storage Binder M55 Red', 'Contoso, Ltd', 'Regular', 'Movie DVD', 9, 124.3155],
['Contoso Florida', 'Contoso DVD 58 DVD Storage Binder M55 Silver', 'Contoso, Ltd', 'Regular', 'Movie DVD', 9, 122.232],
['Contoso Massachusetts', 'Contoso DVD 14-Inch Player Portable L100 Silver', 'Contoso, Ltd', 'Deluxe', 'Movie DVD', 9, 2339.91],
['Contoso Singapore', 'Contoso Rubberized Snap-On Cover Hard Case Cell Phone Protector E160 White', 'Contoso, Ltd', 'Economy', 'Cell phones Accessories', 80, 379.2],
['Contoso Connecticut', 'Contoso DVD 58 DVD Storage Binder M55 Silver', 'Contoso, Ltd', 'Regular', 'Movie DVD', 9, 123.621],
['Contoso Massachusetts', 'Contoso DVD 58 DVD Storage Binder M55 Red', 'Contoso, Ltd', 'Regular', 'Movie DVD', 9, 123.621],
['Contoso Poland', 'Contoso Rubberized Skin BlackBerry E100 Black', 'Contoso, Ltd', 'Economy', 'Cell phones Accessories', 80, 1198.4505],
['Contoso Turkmenistan', 'Contoso Rubberized Snap-On Cover Hard Case Cell Phone Protector E160 Pink', 'Contoso, Ltd', 'Economy', 'Cell phones Accessories', 80, 378.489],
['Contoso Pakistan', 'Contoso DVD 15-Inch Player Portable L200 White', 'Contoso, Ltd', 'Deluxe', 'Movie DVD', 9, 2566.4115],
['Contoso New Jersey', 'Contoso Rubberized Skin BlackBerry E100 Black', 'Contoso, Ltd', 'Economy', 'Cell phones Accessories', 80, 1196.202],
['Contoso Kyrgyzstan', 'Contoso DVD 14-Inch Player Portable L100 Silver', 'Contoso, Ltd', 'Deluxe', 'Movie DVD', 9, 2300.9115],
['Contoso Turkmenistan', 'Contoso Cables To Go USB 2.0 Hard Drive Enclosure E920 Black', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 45.815],
['Contoso Pakistan', 'Proseware Ink Jet Instant PDF Sheet-Fed Scanner M300 Black', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1440],
['Contoso Beijing', 'Proseware Office Jet All-in-One Printer M500 Black', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1467],
['Contoso Ireland', 'Contoso Mouse Lock Bundle E200 White', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 51.1525],
['Contoso Guangdong', 'SV Keyboard E90 Grey', 'Southridge Video', 'Economy', 'Computers Accessories', 4, 158.574],
['Contoso Virginia', 'Proseware Slim-Design Fax Machine with Answering System X180 Black', 'Proseware, Inc.', 'Deluxe', 'Printers, Scanners & Fax', 9, 2124],
['Contoso South Carolina', 'SV Keyboard E90 Black', 'Southridge Video', 'Economy', 'Computers Accessories', 4, 166.92],
['Contoso Connecticut', 'Contoso Education Essentials Bundle M300 White', 'Contoso, Ltd', 'Regular', 'Computers Accessories', 9, 84.075],
['Contoso Syria', 'Proseware Ink Jet Wireless All-In-One Printer M400 Black', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1141.65],
['Contoso Maine', 'Contoso Notebook Peripheral Kit M69 White', 'Contoso, Ltd', 'Regular', 'Computers Accessories', 9, 146.025],
['Contoso New York', 'Proseware Color Ink Jet Fax, Copier, Phone M250 Black', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1431],
['Contoso Greece', 'Contoso Education Essentials Bundle M300 Black', 'Contoso, Ltd', 'Regular', 'Computers Accessories', 9, 85.025],
['Contoso Thailand', 'Proseware Photo Ink Jet Printer M100 Black', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1423.05],
['Contoso Beijing', 'Contoso Dual USB Power Adapter - power adapter E300 Grey', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 155.61],
['Contoso Maine', 'SV Keyboard E90 Silver', 'Southridge Video', 'Economy', 'Computers Accessories', 4, 166.92],
['Contoso Italy', 'SV 80GB USB2.0 Portable Hard Disk E500 Red', 'Southridge Video', 'Economy', 'Computers Accessories', 4, 397.8],
['Contoso Guangdong', 'Contoso Optical Wheel OEM PS/2 Mouse E60 Grey', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 50.05],
['Contoso Europe', 'SV Keyboard E90 Silver', 'Southridge Video', 'Economy', 'Computers Accessories', 4, 162.747],
['Contoso Alberta', 'Contoso Laptop Cooling Hub notebook fan with 4 ports USB hub E80 Grey', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 116.61],
['Contoso Catalog Store', 'Contoso Cables To Go USB 2.0 Hard Drive Enclosure E920 White', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 45.22],
['Contoso South Korea', 'SV Keyboard E10 Black', 'Southridge Video', 'Economy', 'Computers Accessories', 4, 176],
['Contoso Spain', 'Contoso Optical Wheel OEM PS/2 Mouse E60 White', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 50.05],
['Contoso Florida', 'SV 40GB USB2.0 Portable Hard Disk E400 Silver', 'Southridge Video', 'Economy', 'Computers Accessories', 4, 303.96],
['Contoso Thailand', 'SV 80GB USB2.0 Portable Hard Disk E500 Silver', 'Southridge Video', 'Economy', 'Computers Accessories', 4, 408],
['Contoso Colorado', 'SV Keyboard E10 Grey', 'Southridge Video', 'Economy', 'Computers Accessories', 4, 169.4],
['Contoso Xinjiang', 'Contoso Desktop Alternative Bundle E200 White', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 44.275],
['Contoso Spain', 'Contoso Battery charger - bike E200 Grey', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 76.615],
['Contoso Maine', 'Contoso USB Optical Mouse E200 Grey', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 58.9],
['Contoso Poland', 'SV 512MB Laptop memory E800 Yellow', 'Southridge Video', 'Economy', 'Computers Accessories', 4, 132.561],
['Contoso Massachusetts', 'Contoso Enhanced Capacity Battery M800 White', 'Contoso, Ltd', 'Regular', 'Computers Accessories', 9, 245.52],
['Contoso New York', 'SV 40GB USB2.0 Portable Hard Disk E400 Red', 'Southridge Video', 'Economy', 'Computers Accessories', 4, 292.5615],
['Contoso Singapore', 'Contoso 90W AC/DC Power Adapter E300 Grey', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 46.41],
['Contoso Syria', 'Contoso Battery charger - bike E200 Grey', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 79.6],
['Contoso Kyrgyzstan', 'SV PCI Network Adapter E905 Silver', 'Southridge Video', 'Economy', 'Computers Accessories', 4, 165.8605],
['Contoso New Jersey', 'Contoso USB Data Link - direct connect adapter E600 Grey', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 65.065],
['Contoso Alaska', 'Contoso SLR Camera X142 Black', 'Contoso, Ltd', 'Deluxe', 'Digital SLR Cameras', 9, 5669.3],
['Contoso Florida', 'Contoso SLR Camera X142 Black', 'Contoso, Ltd', 'Deluxe', 'Digital SLR Cameras', 9, 5637.45],
['Contoso Catalog Store', 'Contoso SLR Camera 35" X358 Silver', 'Contoso, Ltd', 'Regular', 'Digital SLR Cameras', 9, 5112],
['Contoso Spain', 'Contoso SLR Camera X143 Silver', 'Contoso, Ltd', 'Deluxe', 'Digital SLR Cameras', 9, 5781.7],
['Contoso Alberta', 'Contoso SLR Camera 35" M358 Silver', 'Contoso, Ltd', 'Regular', 'Digital SLR Cameras', 9, 3204.1],
['Contoso Sweden', 'A. Datum SLR Camera X142 Orange', 'A. Datum Corporation', 'Regular', 'Digital SLR Cameras', 9, 3843],
['Contoso Catalog Store', 'Contoso SLR Camera X143 Silver', 'Contoso, Ltd', 'Deluxe', 'Digital SLR Cameras', 9, 5814],
['Contoso Italy', 'A. Datum SLR Camera X142 Orange', 'A. Datum Corporation', 'Regular', 'Digital SLR Cameras', 9, 3778.95],
['Contoso Sweden', 'Contoso SLR Camera X142 Black', 'Contoso, Ltd', 'Deluxe', 'Digital SLR Cameras', 9, 5605.6],
['Contoso Florida', 'Proseware Mobile Receipt and Document Scanner M200 Black', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1026.6],
['Contoso Pakistan', 'Proseware All-In-One Photo Printer M200 White', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1224],
['Contoso Spain', 'Proseware Ink Jet Wireless All-In-One Printer M400 Green', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1141.65],
['Contoso United States', 'Proseware All-In-One Photo Printer M200 White', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1196.8],
['Contoso Germany', 'Proseware Laser Fax Printer E100 White', 'Proseware, Inc.', 'Economy', 'Printers, Scanners & Fax', 4, 354.9],
['Contoso South Carolina', 'Proseware Slim-Design Fax Machine with Answering System X180 Green', 'Proseware, Inc.', 'Deluxe', 'Printers, Scanners & Fax', 9, 2112.2],
['Contoso Thailand', 'Proseware Laser Fax Printer E100 White', 'Proseware, Inc.', 'Economy', 'Printers, Scanners & Fax', 4, 359.45],
['Contoso Alaska', 'Proseware All-In-One Photo Printer M200 White', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1203.6],
['Contoso Beijing', 'Proseware All-In-One Photo Printer M200 White', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1203.6],
['Contoso New York', 'Proseware Scan Jet Digital Flat Bed Scanner M300 Black', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1076.9],
['Contoso Ireland', 'Proseware High Speed Laser M2000 White', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1881],
['Contoso New Jersey', 'Proseware Mobile Receipt and Document Scanner M200 White', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1038.2],
['Contoso Colorado', 'Proseware Ink Jet Wireless All-In-One Printer M400 Green', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1141.65],
['Contoso Poland', 'Proseware Laser Fax Printer M250 Green', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1062],
['Contoso Russia', 'Proseware Color Ink Jet Fax, Copier, Phone M250 Green', 'Proseware, Inc.', 'Regular', 'Printers, Scanners & Fax', 9, 1431],
['Contoso Xinjiang', 'Contoso Home Theater System 4.1 Channel M1410 Black', 'Contoso, Ltd', 'Regular', 'Home Theater System', 9, 2944.55],
['Contoso Italy', 'Contoso Home Theater System 2.1 Channel E1220 Silver', 'Contoso, Ltd', 'Economy', 'Home Theater System', 4, 766.15],
['Contoso Colorado', 'SV 16xDVD M320 Black', 'Southridge Video', 'Regular', 'VCD & DVD', 9, 1047.2],
['Contoso Thailand', 'Contoso Home Theater System 2.1 Channel E1200 Silver', 'Contoso, Ltd', 'Economy', 'Home Theater System', 4, 1196],
['Contoso Ireland', 'SV 8xDVD E100 Black', 'Southridge Video', 'Economy', 'VCD & DVD', 4, 262.2],
['Contoso United States', 'Contoso Home Theater System 5.1 Channel M1500 Silver', 'Contoso, Ltd', 'Regular', 'Home Theater System', 9, 3818.1],
['Contoso Germany', 'Contoso Home Theater System 7.1 Channel M1700 Silver', 'Contoso, Ltd', 'Regular', 'Home Theater System', 9, 8001],
['Contoso Germany', 'Contoso Home Theater System 5.1 Channel M1500 Silver', 'Contoso, Ltd', 'Regular', 'Home Theater System', 9, 3818.1],
['Contoso Spain', 'Contoso Home Theater System 5.1 Channel M1500 Black', 'Contoso, Ltd', 'Regular', 'Home Theater System', 9, 3839.55],
['Contoso Beijing', 'Contoso Home Theater System 4.1 Channel M1400 Silver', 'Contoso, Ltd', 'Regular', 'Home Theater System', 9, 3660.55],
['Contoso Sweden', 'SV 16xDVD M320 Silver', 'Southridge Video', 'Regular', 'VCD & DVD', 9, 1053.15],
['Contoso Canada', 'SV 8xDVD E140 Silver', 'Southridge Video', 'Economy', 'VCD & DVD', 4, 260.7],
['Contoso Thailand', 'Contoso Home Theater System 4.1 Channel M1410 Silver', 'Contoso, Ltd', 'Regular', 'Home Theater System', 9, 2928.1],
['Contoso Germany', 'Contoso Home Theater System 2.1 Channel E1220 Silver', 'Contoso, Ltd', 'Economy', 'Home Theater System', 4, 776.1],
['Contoso Colorado', 'Contoso Home Theater System 2.1 Channel E1200 Brown', 'Contoso, Ltd', 'Economy', 'Home Theater System', 4, 1166.1],
['Contoso New York', 'Contoso Home Theater System 4.1 Channel M1400 Silver', 'Contoso, Ltd', 'Regular', 'Home Theater System', 9, 3640.1],
['Contoso Germany', 'Contoso Home Theater System 4.1 Channel M1400 White', 'Contoso, Ltd', 'Regular', 'Home Theater System', 9, 3660.55],
['Contoso UK', 'Contoso Home Theater System 5.1 Channel M1500 White', 'Contoso, Ltd', 'Regular', 'Home Theater System', 9, 3839.55],
['Contoso Virginia', 'Contoso Home Theater System 7.1 Channel M1700 Black', 'Contoso, Ltd', 'Regular', 'Home Theater System', 9, 8001],
['Contoso Alaska', 'Contoso Home Theater System 4.1 Channel M1400 Brown', 'Contoso, Ltd', 'Regular', 'Home Theater System', 18, 7300.65],
['Contoso New York', 'Contoso Home Theater System 5.1 Channel M1500 Brown', 'Contoso, Ltd', 'Regular', 'Home Theater System', 9, 3775.2],
['Contoso Colorado', 'Contoso Home Theater System 5.1 Channel M1500 Brown', 'Contoso, Ltd', 'Regular', 'Home Theater System', 9, 3861],
['Contoso New York', 'Litware Home Theater System 2.1 Channel E211 Silver', 'Litware, Inc.', 'Economy', 'Home Theater System', 4, 1079.6],
['Contoso Germany', 'Contoso Home Theater System 5.1 Channel M1500 Brown', 'Contoso, Ltd', 'Regular', 'Home Theater System', 9, 3818.1],
['Contoso Massachusetts', 'Contoso Home Theater System 2.1 Channel M1210 White', 'Contoso, Ltd', 'Regular', 'Home Theater System', 9, 2961],
['Contoso Beijing', 'Contoso Home Theater System 5.1 Channel M1530 White', 'Contoso, Ltd', 'Regular', 'Home Theater System', 9, 3531.15],
['Contoso Ireland', 'SV Car Video TFT6.2W E6281 Brown', 'Southridge Video', 'Economy', 'Car Video', 4, 1036],
['Contoso New Jersey', 'Litware Home Theater System 2.1 Channel E212 Brown', 'Litware, Inc.', 'Economy', 'Home Theater System', 4, 1169.61],
['Contoso Malta', 'SV Car Video TFT6.2W E6281 Brown', 'Southridge Video', 'Economy', 'Car Video', 4, 1010.1],
['Contoso Beijing', 'SV Car Video TFT7 M7000 Black', 'Southridge Video', 'Regular', 'Car Video', 9, 2661.1],
['Contoso Connecticut', 'SV Car Video TFT7 M7001 Black', 'Southridge Video', 'Regular', 'Car Video', 9, 2750.1],
['Contoso Guangdong', 'SV Car Video LCD7W M7080 Brown', 'Southridge Video', 'Regular', 'Car Video', 9, 4475],
['Contoso Alberta', 'SV Car Video AM/FM E1000 Silver', 'Southridge Video', 'Economy', 'Car Video', 4, 766.15],
['Contoso Spain', 'SV Car Video TFT7 M7001 Brown', 'Southridge Video', 'Regular', 'Car Video', 18, 5515.65],
['Contoso Thailand', 'SV Car Video LCD7W M7081 Silver', 'Southridge Video', 'Regular', 'Car Video', 9, 4391.2],
['Contoso Florida', 'SV Car Video TFT6.2W E6281 Silver', 'Southridge Video', 'Economy', 'Car Video', 4, 997.15],
['Contoso Colorado', 'SV Car Video LCD7W M7080 Black', 'Southridge Video', 'Regular', 'Car Video', 9, 4500],
['Contoso Thailand', 'SV Car Video TFT6.2W E6280 Black', 'Southridge Video', 'Economy', 'Car Video', 4, 1088.1],
['Contoso Spain', 'SV Car Video TFT6.2W E6281 Brown', 'Southridge Video', 'Economy', 'Car Video', 4, 1010.1],
['Contoso India', 'SV Car Video TFT6.2W E6281 Silver', 'Southridge Video', 'Economy', 'Car Video', 4, 1010.1],
['Contoso Pakistan', 'SV Car Video LCD7W M7081 Brown', 'Southridge Video', 'Regular', 'Car Video', 9, 4466.05],
['Contoso Colorado', 'SV Car Video TFT7 M7000 Silver', 'Southridge Video', 'Regular', 'Car Video', 9, 2646.15],
['Contoso the Netherlands', 'Proseware Laptop15 M510 White', 'Proseware, Inc.', 'Regular', 'Laptops', 9, 6221.1],
['Contoso Slovenia', 'WWI Laptop19W X0196 Black', 'Wide World Importers', 'Deluxe', 'Laptops', 9, 11431.2],
['Contoso UK', 'Adventure Works Laptop19W X1980 White', 'Adventure Works', 'Deluxe', 'Laptops', 9, 11496.15],
['Contoso Colorado', 'NT Bluetooth Stereo Headphones E52 Yellow', 'Northwind Traders', 'Economy', 'Bluetooth Headphones', 4, 102.76],
['Contoso Xinjiang', 'NT Bluetooth Stereo Headphones E52 Yellow', 'Northwind Traders', 'Economy', 'Bluetooth Headphones', 4, 101.4755],
['Contoso Malta', 'Contoso 2G MP3 Player E200 Silver', 'Contoso, Ltd', 'Economy', 'MP4&MP3', 4, 85.2015],
['Contoso Poland', 'Contoso 8GB Clock & Radio MP3 Player X850 Blue', 'Contoso, Ltd', 'Deluxe', 'MP4&MP3', 9, 2648.1855],
['Contoso Alaska', 'Contoso 2G MP3 Player E200 Silver', 'Contoso, Ltd', 'Economy', 'MP4&MP3', 4, 86.28],
['Contoso Canada', 'Adventure Works 26" 720p LCD HDTV M140 Black', 'Adventure Works', 'Regular', 'Televisions', 9, 4182.733],
['Contoso Russia', 'Adventure Works 26" 720p LCD HDTV M140 Black', 'Adventure Works', 'Regular', 'Televisions', 9, 4135.736],
['Contoso Florida', 'Adventure Works 19" Portable LCD HDTV M110 White', 'Adventure Works', 'Regular', 'Televisions', 9, 2463.912],
['Contoso Xinjiang', 'NT Bluetooth Stereo Headphones E52 Blue', 'Northwind Traders', 'Economy', 'Bluetooth Headphones', 4, 101.4755],
['Contoso Turkmenistan', 'Adventure Works 19" Portable LCD HDTV M110 Silver', 'Adventure Works', 'Regular', 'Televisions', 9, 2477.9115],
['Contoso North America', 'Adventure Works 26" 720p LCD HDTV M140 Silver', 'Adventure Works', 'Regular', 'Televisions', 9, 4182.733],
['Contoso Greece', 'Adventure Works 26" 720p LCD HDTV M140 White', 'Adventure Works', 'Regular', 'Televisions', 9, 4229.73],
['Contoso Sweden', 'Adventure Works 20" CRT TV E15 Silver', 'Adventure Works', 'Economy', 'Televisions', 4, 645.962],
['Contoso Alaska', 'A. Datum Slim Digital Camera M180 Azure', 'A. Datum Corporation', 'Economy', 'Digital Cameras', 4, 592],
['Contoso Xinjiang', 'A. Datum All in One Digital Camera M200 Grey', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 1654.4],
['Contoso Maine', 'A. Datum Compact Digital Camera M200 Silver', 'A. Datum Corporation', 'Economy', 'Digital Cameras', 4, 509.55],
['Contoso South Korea', 'A. Datum Compact Digital Camera M200 Silver', 'A. Datum Corporation', 'Economy', 'Digital Cameras', 4, 509.55],
['Contoso New York', 'A. Datum Consumer Digital Camera M300 Green', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 1660.5],
['Contoso Europe', 'A. Datum Slim Digital Camera M180 Silver', 'A. Datum Corporation', 'Economy', 'Digital Cameras', 4, 562.4],
['Contoso New Jersey', 'A. Datum Slim Digital Camera M180 Silver', 'A. Datum Corporation', 'Economy', 'Digital Cameras', 4, 592],
['Contoso South Carolina', 'A. Datum Point n\' Shoot Digital Camera M500 Azure', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 1782],
['Contoso Sweden', 'A. Datum Consumer Digital Camera E100 Azure', 'A. Datum Corporation', 'Deluxe', 'Digital Cameras', 9, 2472.8],
['Contoso Turkmenistan', 'A. Datum Consumer Digital Camera E100 Azure', 'A. Datum Corporation', 'Deluxe', 'Digital Cameras', 9, 2486.85],
['Contoso Connecticut', 'A. Datum Point Shoot Digital Camera M500 Black', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 1752.3],
['Contoso Russia', 'A. Datum Slim Digital Camera M180 Grey', 'A. Datum Corporation', 'Economy', 'Digital Cameras', 4, 562.4],
['Contoso Russia', 'Fabrikam SLR Camera 35" X358 Silver', 'Fabrikam, Inc.', 'Regular', 'Digital SLR Cameras', 9, 3838.56],
['Contoso Xinjiang', 'A. Datum Super-zoom Digital Camera X300 Pink', 'A. Datum Corporation', 'Deluxe', 'Digital Cameras', 9, 2610],
['Contoso Guangdong', 'Fabrikam SLR Camera X147 Silver', 'Fabrikam, Inc.', 'Deluxe', 'Digital SLR Cameras', 9, 5708.25],
['Contoso Thailand', 'Fabrikam SLR Camera X147 Grey', 'Fabrikam, Inc.', 'Deluxe', 'Digital SLR Cameras', 9, 5676],
['Contoso Florida', 'A. Datum Consumer Digital Camera M300 Pink', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 1623.6],
['Contoso Canada', 'Fabrikam SLR Camera M150 Orange', 'Fabrikam, Inc.', 'Regular', 'Digital SLR Cameras', 9, 3527.1],
['Contoso Kyrgyzstan', 'Contoso SLR Camera X145 Pink', 'Contoso, Ltd', 'Deluxe', 'Digital SLR Cameras', 9, 5593.2],
['Contoso Guangdong', 'Fabrikam SLR Camera M147 Grey', 'Fabrikam, Inc.', 'Regular', 'Digital SLR Cameras', 9, 2972.6],
['Contoso Malta', 'Contoso SLR Camera M146 Orange', 'Contoso, Ltd', 'Economy', 'Digital SLR Cameras', 4, 1223.6],
['Contoso Alberta', 'A. Datum Consumer Digital Camera E100 Pink', 'A. Datum Corporation', 'Deluxe', 'Digital Cameras', 9, 2514.95],
['Contoso Italy', 'Fabrikam SLR Camera 35" M358 Blue', 'Fabrikam, Inc.', 'Economy', 'Digital SLR Cameras', 4, 1295.6],
['Contoso Sweden', 'Fabrikam SLR Camera X148 Silver Grey', 'Fabrikam, Inc.', 'Deluxe', 'Digital SLR Cameras', 9, 5847.3],
['Contoso Florida', 'A. Datum SLR Camera 35" X358 Black', 'A. Datum Corporation', 'Regular', 'Digital SLR Cameras', 9, 5262.6],
['Contoso Greece', 'Contoso SLR Camera X144 Gold', 'Contoso, Ltd', 'Deluxe', 'Digital SLR Cameras', 9, 5956.05],
['Contoso Syria', 'A. Datum SLR Camera 35" X358 Silver Grey', 'A. Datum Corporation', 'Regular', 'Digital SLR Cameras', 9, 5262.6],
['Contoso Connecticut', 'Fabrikam SLR Camera 35" M358 Gold', 'Fabrikam, Inc.', 'Economy', 'Digital SLR Cameras', 4, 1312],
['Contoso Syria', 'A. Datum SLR Camera 35" M358 Gold', 'A. Datum Corporation', 'Regular', 'Digital SLR Cameras', 9, 3008.2],
['Contoso Syria', 'A. Datum SLR Camera M136 Silver', 'A. Datum Corporation', 'Economy', 'Digital SLR Cameras', 4, 1232.4],
['Contoso UK', 'Fabrikam SLR Camera M148 Silver Grey', 'Fabrikam, Inc.', 'Regular', 'Digital SLR Cameras', 9, 2971.4],
['Contoso Russia', 'A. Datum SLR Camera M135 Black', 'A. Datum Corporation', 'Economy', 'Digital SLR Cameras', 4, 1216.8],
['Contoso Xinjiang', 'A. Datum SLR Camera 35" M358 Silver', 'A. Datum Corporation', 'Regular', 'Digital SLR Cameras', 9, 3042],
['Contoso Beijing', 'Fabrikam SLR Camera 35" X358 Orange', 'Fabrikam, Inc.', 'Regular', 'Digital SLR Cameras', 9, 3903.99],
['Contoso Guangdong', 'Contoso SLR Camera 35" M358 Grey', 'Contoso, Ltd', 'Regular', 'Digital SLR Cameras', 9, 3150.4],
['Contoso South Carolina', 'Contoso SLR Camera 35" M358 Grey', 'Contoso, Ltd', 'Regular', 'Digital SLR Cameras', 9, 3186.2],
['Contoso Xinjiang', 'Fabrikam SLR Camera 35" X358 Silver Grey', 'Fabrikam, Inc.', 'Regular', 'Digital SLR Cameras', 9, 3860.37],
['Contoso Malta', 'A. Datum SLR Camera 35" M358 Silver', 'A. Datum Corporation', 'Regular', 'Digital SLR Cameras', 9, 2974.4],
['Contoso North America', 'A. Datum SLR Camera 35" X358 Blue', 'A. Datum Corporation', 'Regular', 'Digital SLR Cameras', 9, 5203.8],
['Contoso Connecticut', 'Contoso DVD 38 DVD Storage Binder E25 Black', 'Contoso, Ltd', 'Economy', 'Movie DVD', 4, 38.961],
['Contoso Alaska', 'SV DVD 14-Inch Player Portable L100 White', 'Southridge Video', 'Deluxe', 'Movie DVD', 9, 2287.912],
['Contoso Guangdong', 'SV DVD 9-Inch Player Portable M300 Black', 'Southridge Video', 'Regular', 'Movie DVD', 9, 1439.91],
['Contoso Kyrgyzstan', 'SV DVD 7-Inch Player Portable E200 White', 'Southridge Video', 'Economy', 'Movie DVD', 4, 439.96],
['Contoso Catalog Store', 'SV DVD 14-Inch Player Portable L100 Silver', 'Southridge Video', 'Deluxe', 'Movie DVD', 9, 2326.9105],
['Contoso Maine', 'Contoso DVD 55DVD Storage Binder M56 Black', 'Contoso, Ltd', 'Regular', 'Movie DVD', 9, 112.041],
['Contoso North America', 'SV DVD 60 DVD Storage Binder L20 Silver', 'Southridge Video', 'Deluxe', 'Movie DVD', 9, 203.721],
['Contoso Turkmenistan', 'Contoso DVD 60 DVD Storage Binder L20 Black', 'Contoso, Ltd', 'Deluxe', 'Movie DVD', 9, 206.01],
['Contoso Guangdong', 'SV DVD 12-Inch Player Portable M400 Black', 'Southridge Video', 'Regular', 'Movie DVD', 9, 1583.912],
['Contoso Ireland', 'SV DVD 48 DVD Storage Binder M50 Silver', 'Southridge Video', 'Regular', 'Movie DVD', 9, 161.91],
['Contoso UK', 'A. Datum Ultra Compact Digital Camera M190 Green', 'A. Datum Corporation', 'Economy', 'Digital Cameras', 4, 660],
['Contoso UK', 'Contoso USB Wave Multi-Media Keyboard E280 Grey', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 62.01],
['Contoso Catalog Store', 'Contoso Bright Light battery E20 Black', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 102.22],
['Contoso Singapore', 'A. Datum Super-zoom Digital Camera X300 Azure', 'A. Datum Corporation', 'Deluxe', 'Digital Cameras', 9, 2552],
['Contoso United States', 'A. Datum Point Shoot Digital Camera M500 Orange', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 1782],
['Contoso Virginia', 'A. Datum Consumer Digital Camera M300 Orange', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 1642.05],
['Contoso New Jersey', 'A. Datum All in One Digital Camera M200 Green', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 1663.8],
['Contoso Syria', 'Contoso Ultraportable Neoprene Sleeve E30 Black', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 59.28],
['Contoso Catalog Store', 'A. Datum Advanced Digital Camera M300 Orange', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 1658.8],
['Contoso Singapore', 'A. Datum Interchangeable lens Non-SLR Digital Camera X250 Orange', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 2385.2],
['Contoso Singapore', 'A. Datum Point Shoot Digital Camera M500 Silver Grey', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 1752.3],
['Contoso Maine', 'Contoso Home/Office Laptop Power Adapter E300 White', 'Contoso, Ltd', 'Economy', 'Computers Accessories', 4, 99.45],
['Contoso Singapore', 'A. Datum Interchangeable lens Non-SLR Digital Camera X250 Green', 'A. Datum Corporation', 'Regular', 'Digital Cameras', 9, 2385.2]
];
</script>
<style>
table tr td, table tr th {
padding: 7px 7px;
border-left: 1px solid #ddd;
border-bottom: 1px solid #ddd;
white-space: nowrap;
}
table tr th {
border-bottom-width: 2px;
}
table {
border-right: 1px solid #ddd;
border-top: 1px solid #ddd;
margin: 10px;
}
table td.data, table td.footer-data {
text-align: right;
}
table .data-header.sorted-asc::after, table .group-header.sorted-asc::after {
color: initial;
}
table .data-header::after, table .group-header::after {
content: "▲";
margin-left: 5px;
font-size: 0.75em;
color: #ccc;
}
table .data-header.sorted-desc::after, table .group-header.sorted-desc::after {
content: "▼";
color: initial;
}
table .group-header {
position: relative;
}
table .group-header .delete {
position: absolute;
right: 5px;
top: 0;
}
table .group-header .delete:hover::after {
color: red;
}
table .group-header .delete::after {
content: "x";
color: #ccc;
cursor: pointer;
font-size: 1.5em;
line-height: 1.5em;
}
table .group.closed:before {
content: "▶";
margin-right: 5px;
font-size: 0.55em;
}
table .group.open:before {
content: "▼";
margin-right: 5px;
font-size: 0.65em;
}
</style>
</head>
<body>
<div id="buttons"></div>
<table id="pivot-table"></table>
</body>
</html>
const compose = (f, g) => x => f(g(x));
const chain = (data, f) => data.reduce((acc, v) => acc.concat(f(v)), []);
function toLower(s) {
if (!typeof s !== 'string') return s;
return s.toLowerCase();
}
function unornull(a) {
return a === undefined || a === null;
}
function genericCompare(a, b) {
if (unornull(a) && unornull(b)) return 0;
if (unornull(b)) return -1;
if (unornull(a)) return 1;
const al = toLower(a);
const bl = toLower(b);
if (al < bl) return -1
else if (al > bl) return 1
return 0;
}
function createSort(compare) {
return function(ary) {
return ary.slice().sort(compare);
}
}
const negate = x => -x;
const compares = {
asc: genericCompare,
desc: (a, b) => negate(genericCompare(a, b)),
}
function makeGroupReducer(groups, reduce, basePath = []) {
const [hg, ...tg] = groups;
const next = tg.length ?
(path => makeGroupReducer(tg, reduce, path)) :
() => () => undefined;
return function (acc, { point, projection }) {
const key = projection[hg.name];
const path = basePath.concat(key);
const prev = acc[key] || {};
return {
...acc,
[key]: {
reduced: reduce(prev.reduced || {}, point),
path,
points: (prev.points || []).concat([point]),
projection,
subGroups: next(path)((prev.subGroups || {}), { point, projection }),
},
};
}
}
function projectGroups(groups) {
return function (point) {
const projection = groups.reduce((acc, v) => ({ ...acc, [v.name]: v.selector(point) }), {});
return {
point,
projection,
};
};
}
function combineReducers(obj) {
const keys = Object.keys(obj);
return function(acc, v) {
return keys.reduce((state, key) => {
const reducer = obj[key];
return { ...state, [key]: reducer(state[key], v) };
}, acc || {});
}
}
function reduceData(data, groups, reducer, initialValue) {
const projector = projectGroups(groups);
const groupReducer = makeGroupReducer(groups, reducer);
const projectedGroupReducer = function(acc, v) {
if (groups.length === 0) return acc;
const projected = projector(v);
return groupReducer(acc, projected);
}
const combined = combineReducers({
total: reducer,
groups: projectedGroupReducer,
});
return data.reduce(combined, { total: initialValue, groups: initialValue });
}
function getSingleCompare(s) {
if (typeof s === 'function') return s;
const compare = compares[String(s).toLowerCase()];
if (!compare) throw new Error(`Could not get sort for arg ${s}. Expecting 'asc' or 'desc'`);
return compare;
}
function levelCompareCreator(levels) {
return function(level) {
return levels[level];
}
}
function getGroupSorter(groupSorts, groups) {
if (!Array.isArray(groupSorts)) throw new Error('groupSorts must be an array');
const levels = groups
.map((v, i) => groupSorts[i] || compares.asc)
.map(getSingleCompare);
const levelToCompare = levelCompareCreator(levels);
return (list, level) => {
const compare = levelToCompare(level);
const groupName = groups[level].name;
return createSort((a, b) => {
const aval = a.projection[groupName];
const bval = b.projection[groupName];
return compare(aval, bval);
})(list);
}
}
function getSorter(groups, groupSorts, dataSortWith) {
if (!groupSorts && !dataSortWith) return getGroupSorter([], groups);;
if (groupSorts && dataSortWith) throw new Error('You can only specify one type of sort (group or data)');
if (groupSorts) return getGroupSorter(groupSorts, groups);
return createSort(dataSortWith);
}
function flattenGroups(data, sorter, level = 0) {
if (!data) return [];
const levelData = Object.values(data);
if (levelData.length === 0) return [];
return chain(sorter(levelData, level), (row) => {
return [
{ ...row, level },
...flattenGroups(row.subGroups, sorter, level + 1),
];
});
}
const mapObj = (obj, fn) => Object.keys(obj).reduce((acc, k) => ({ ...acc, [k]: fn(obj[k])}), {})
function pointFromGroup(reduced, dataPoint) {
const { value, subDataPoints } = dataPoint;
try {
const data = value(reduced);
if (subDataPoints) return pointsFrom(data, subDataPoints);
return data;
} catch (e) {
console.warn(e);
return null;
}
}
function pointsFrom(reduced, dataPoints) {
if (!dataPoints) return reduced;
return dataPoints.reduce((acc, v) => {
return { ...acc, [v.title]: pointFromGroup(reduced, v) };
}, {});
}
function withPoints(group, dataPoints) {
if (!group) return group;
const data = pointsFrom(group.reduced, dataPoints)
const subGroups = group.subGroups &&
mapObj(group.subGroups, g => withPoints(g, dataPoints));
return { ...group, subGroups, data };
}
function addPoints({ total, groups }, dataPoints) {
return {
total: withPoints({ reduced: total }, dataPoints).data,
groups: mapObj(groups, g => withPoints(g, dataPoints))
};
}
function dataPathGetter(path) {
return function(obj) {
try {
return path.reduce((acc, v) => acc[v], obj.data);
} catch (e) {
return undefined;
}
}
}
function toDataSelector(s) {
if (typeof s === 'function') return s;
if (Array.isArray(s)) return dataPathGetter(s);
return dataPathGetter(String(s).split('.'));
}
function compareBy(compare) {
return function (by) {
return function(a, b) {
return compare(by(a), by(b));
}
}
}
function byToWith(sortBy, dir) {
const compareFn = compares[dir];
if (!compareFn) throw new Error(`Could not get sort for arg ${dir}. Expecting 'asc' or 'desc'`);
const compareFns = [].concat(sortBy).map(toDataSelector).map(compareBy(compareFn));
return (a, b) => {
for (let c of compareFns) {
const v = c(a, b);
if (v !== 0) return v;
}
return 0;
}
}
function toDataSortWith(dataSortWith, dataSortBy, dataSortDir = 'asc') {
if (dataSortWith && dataSortBy) throw new Error('Cannot use dataSortWith with dataSortBy');
if (!dataSortBy) return dataSortWith;
return byToWith(dataSortBy, dataSortDir);
}
function pivot({
groups,
reducer,
dataSortWith,
dataSortBy,
dataSortDir,
groupSorts,
dataPoints,
input,
initialValue = {},
}) {
const reduced = reduceData(input, groups, reducer, initialValue);
const withPoints = addPoints(reduced, dataPoints);
const sorter = getSorter(
groups,
groupSorts,
toDataSortWith(dataSortWith, dataSortBy, dataSortDir),
);
const flattened = flattenGroups(withPoints.groups, sorter);
return { ...withPoints, flattened };
}
class Pivoter {
constructor(obj) {
this.setFrom(obj);
this.listeners = [];
this.stage1();
}
stage1() {
console.log('Running Stage 1')
this.reduced = reduceData(this.input, this.groups, this.reducer, this.initialValue);
this.stage2();
}
stage2() {
console.log('Running stage 2')
this.withPoints = addPoints(this.reduced, this.dataPoints);
this.total = this.withPoints.total;
this.groupsData = this.withPoints.groups;
this.stage3();
}
stage3() {
console.log('Running stage 3')
this.sorter = getSorter(
this.groups,
this.groupSorts,
toDataSortWith(this.dataSortWith, this.dataSortBy, this.dataSortDir),
);
this.flattened = flattenGroups(this.withPoints.groups, this.sorter);
this.data = { ...this.withPoints, flattened: this.flattened };
}
setFrom(obj) {
this.handleSorts(obj);
Object.keys(obj).forEach(k => {
this[k] = obj[k];
});
if (this.initialValue === undefined) this.initialValue = {};
}
handleSorts(obj) {
if (!this.hasAny(obj, ['groupSorts', 'dataSortWith', 'dataSortBy'])) return;
this.dataSortWith = undefined;
this.dataSortBy = undefined;
this.groupSorts = undefined;
}
hasAny(obj, props) {
return props.some(p => obj.hasOwnProperty(p));
}
update(obj) {
this.setFrom(obj);
if (this.hasAny(obj, ['input', 'groups', 'reducer', 'initialValue'])) {
this.stage1();
} else if (this.hasAny(obj, ['dataPoints'])) {
this.stage2();
} else if (this.hasAny(obj, ['groupSorts', 'dataSortWith', 'dataSortBy', 'dataSortDir'])) {
this.stage3();
}
this.listeners.forEach(l => l(this.data));
return this.data;
}
listen(listener) {
this.listeners.push(listener);
listener(this.data);
}
}
////////////////////////////////////////////////////////////////
const subDataPoints = [
{ title: 'Quantity', value: x => x && x.quantity, formatter: x => x },
{ title: 'Amount', value: x => x && (x.sum / x.count) || 0, formatter: x => Number(x).toFixed(0) },
];
const dataPoints = [
{ title: 'Economy', value: x => x && x.Economy, subDataPoints },
{ title: 'Regular', value: x => x && x.Regular, subDataPoints },
{ title: 'Deluxe', value: x => x && x.Deluxe, subDataPoints },
{ title: 'Grand Total', value: x => x && x.total, subDataPoints },
];
const allGroups = [
{ name: 'Manufacturer', selector: x => x[2] },
{ name: 'Category', selector: x => x[4] },
{ name: 'Entity', selector: x => x[0] },
{ name: 'Product', selector: x => x[1] },
];
const reducer = function(data, row) {
const type = row[3];
const value = row[6];
const quantity = row[5];
const dataTotal = data.total || {};
const dataType = data[type] || {};
return {
...data,
total: {
count: (dataTotal.count || 0) + 1,
sum: (dataTotal.sum || 0) + value,
quantity: (dataTotal.quantity || 0) + quantity,
},
[type]: {
count: (dataType.count || 0) + 1,
sum: (dataType.sum || 0) + value,
quantity: (dataType.quantity || 0) + quantity,
},
};
}
const pivoter = new Pivoter({ reducer, groups: [], dataPoints, input: window.data });
function range(start, end, step=1) {
let a = [];for (let i = start; i < end; i+=step) a.push(i); return a;
}
function leaves(data) {
return Object.keys(data).reduce((acc, title) => {
const value = data[title];
if (typeof value !== 'object') {
return [...acc, value === undefined ? '' : value];
}
return [...acc, ...leaves(value)]
}, [])
}
function titles(dataPoints, base = '') {
return dataPoints.reduce((acc, v) => {
if (!v.subDataPoints) {
return [...acc, `${base}${v.title}`];
}
return [...acc, ...titles(v.subDataPoints, `${v.title}.`)]
}, [])
}
let opens = [];
const keyOpen = key => opens.some(o => o === key)
const render = data => {
const groupSorts = pivoter.groupSorts;
const sortBy = pivoter.dataSortBy;
const dir = pivoter.dataSortDir;
const headers = `
<tr>
${pivoter.groups.map((g, i) => `<th class="${groupSorts ? 'sorted-' + (groupSorts[i] || 'asc') : ''} group-header">${g.name}<span class="delete"></span></th>`).join('')}
${titles(pivoter.dataPoints).map(t => `<th class="${sortBy === t ? 'sorted-' + dir : '' } data-header">${t}</th>`).join('')}
</tr>
`;
const toKey = path => path.join('PATHSEPARATOR');
const content = data.flattened.map(row => {
const parentKey = toKey(row.path.slice(0, -1));
if (row.level !== 0 && !keyOpen(parentKey)) return '';
const key = toKey(row.path);
const open = keyOpen(key);
const openClass = open ? 'open' : (row.subGroups ? 'closed' : '')
return `<tr class="group level-${row.level}">
${range(0, row.level).map(() => '<td></td>').join('')}
<td class="group ${openClass}" data-path="${key}">${row.path.slice(-1)}</td>
${range(0, (pivoter.groups.length - 1) - row.level).map(() => '<td></td>').join('')}
${leaves(row.data, dataPoints).map(l => `<td class="data">${l}</td>`).join('')}
</tr>`
});
const footer = `<tr>
${pivoter.groups.length > 0 ? '<td>Grand Total</td>' : ''}
${range(0, pivoter.groups.length - 1).map(() => '<td></td>').join('')}
${leaves(data.total, dataPoints).map(l => `<td class="footer-data">${l}</td>`).join('')}
</tr>
`
document.getElementById('pivot-table').innerHTML = `${headers}${content.join('')}${footer}`;
const buttons = allGroups
.filter(g => !pivoter.groups.some(pg => pg.name === g.name))
.map(g => `<button>${g.name}</button>`);
document.getElementById('buttons').innerHTML = `${buttons.join('')}`
};
pivoter.listen(render);
const otherDir = d => d === 'asc' ? 'desc' : 'asc';
document.getElementById('pivot-table').addEventListener('click', (e) => {
const target = e.target.closest('.data-header');
if (target) {
const dataSortBy = (target).innerText;
const dir = otherDir(pivoter.dataSortDir);
const dataSortDir = dataSortBy === pivoter.dataSortBy ? dir : 'asc';
pivoter.update({ dataSortDir, dataSortBy });
}
});
document.getElementById('pivot-table').addEventListener('click', (e) => {
if (e.target.classList.contains('delete')) {
const target = e.target.closest('.group-header');
const groupName = target.innerText;
pivoter.update({ groups: pivoter.groups.filter(g => g.name !== groupName) });
}
})
document.getElementById('pivot-table').addEventListener('click', (e) => {
const target = e.target.closest('.group-header');
if (target) {
if (!pivoter.groupSorts) {
return pivoter.update({ groupSorts: range(0, pivoter.groups.length).map(() => 'asc') });
}
const index = [...target.parentNode.children].indexOf(target);
const groupSorts = pivoter.groups
.map((v, i) => pivoter.groupSorts[i] || 'asc')
.map((v, i) => i === index ? otherDir(v) : v);
pivoter.update({ groupSorts });
}
});
const isOpen = t => t.classList.contains('open');
const isClosed = t => t.classList.contains('closed');
document.getElementById('pivot-table').addEventListener('click', (e) => {
const target = e.target.closest('.group');
if (target) {
const open = isOpen(target);
const closed = isClosed(target);
if (!open && !closed) return;
if (open) {
opens = opens.filter(o => !o.startsWith(target.dataset.path))
} else {
opens.push(target.dataset.path);
}
render(pivoter.data);
}
});
document.getElementById('buttons').addEventListener('click', (e) => {
const target = e.target.closest('button');
if (target) {
const name = target.innerText;
const group = allGroups.find(g => g.name === name)
pivoter.update({ groups: pivoter.groups.concat(group) });
}
});
{
"name": "esnextbin-sketch",
"version": "0.0.0",
"dependencies": {
"babel-runtime": "6.22.0"
}
}
'use strict';
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = require('babel-runtime/helpers/createClass');
var _createClass3 = _interopRequireDefault(_createClass2);
var _getIterator2 = require('babel-runtime/core-js/get-iterator');
var _getIterator3 = _interopRequireDefault(_getIterator2);
var _toConsumableArray2 = require('babel-runtime/helpers/toConsumableArray');
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
var _values = require('babel-runtime/core-js/object/values');
var _values2 = _interopRequireDefault(_values);
var _keys = require('babel-runtime/core-js/object/keys');
var _keys2 = _interopRequireDefault(_keys);
var _defineProperty2 = require('babel-runtime/helpers/defineProperty');
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
var _extends8 = require('babel-runtime/helpers/extends');
var _extends9 = _interopRequireDefault(_extends8);
var _toArray2 = require('babel-runtime/helpers/toArray');
var _toArray3 = _interopRequireDefault(_toArray2);
var _typeof2 = require('babel-runtime/helpers/typeof');
var _typeof3 = _interopRequireDefault(_typeof2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var compose = function compose(f, g) {
return function (x) {
return f(g(x));
};
};
var chain = function chain(data, f) {
return data.reduce(function (acc, v) {
return acc.concat(f(v));
}, []);
};
function toLower(s) {
if (!(typeof s === 'undefined' ? 'undefined' : (0, _typeof3.default)(s)) !== 'string') return s;
return s.toLowerCase();
}
function unornull(a) {
return a === undefined || a === null;
}
function genericCompare(a, b) {
if (unornull(a) && unornull(b)) return 0;
if (unornull(b)) return -1;
if (unornull(a)) return 1;
var al = toLower(a);
var bl = toLower(b);
if (al < bl) return -1;else if (al > bl) return 1;
return 0;
}
function createSort(compare) {
return function (ary) {
return ary.slice().sort(compare);
};
}
var negate = function negate(x) {
return -x;
};
var compares = {
asc: genericCompare,
desc: function desc(a, b) {
return negate(genericCompare(a, b));
}
};
function makeGroupReducer(groups, reduce) {
var basePath = arguments.length <= 2 || arguments[2] === undefined ? [] : arguments[2];
var _groups = (0, _toArray3.default)(groups);
var hg = _groups[0];
var tg = _groups.slice(1);
var next = tg.length ? function (path) {
return makeGroupReducer(tg, reduce, path);
} : function () {
return function () {
return undefined;
};
};
return function (acc, _ref) {
var point = _ref.point;
var projection = _ref.projection;
var key = projection[hg.name];
var path = basePath.concat(key);
var prev = acc[key] || {};
return (0, _extends9.default)({}, acc, (0, _defineProperty3.default)({}, key, {
reduced: reduce(prev.reduced || {}, point),
path: path,
points: (prev.points || []).concat([point]),
projection: projection,
subGroups: next(path)(prev.subGroups || {}, { point: point, projection: projection })
}));
};
}
function projectGroups(groups) {
return function (point) {
var projection = groups.reduce(function (acc, v) {
return (0, _extends9.default)({}, acc, (0, _defineProperty3.default)({}, v.name, v.selector(point)));
}, {});
return {
point: point,
projection: projection
};
};
}
function combineReducers(obj) {
var keys = (0, _keys2.default)(obj);
return function (acc, v) {
return keys.reduce(function (state, key) {
var reducer = obj[key];
return (0, _extends9.default)({}, state, (0, _defineProperty3.default)({}, key, reducer(state[key], v)));
}, acc || {});
};
}
function reduceData(data, groups, reducer, initialValue) {
var projector = projectGroups(groups);
var groupReducer = makeGroupReducer(groups, reducer);
var projectedGroupReducer = function projectedGroupReducer(acc, v) {
if (groups.length === 0) return acc;
var projected = projector(v);
return groupReducer(acc, projected);
};
var combined = combineReducers({
total: reducer,
groups: projectedGroupReducer
});
return data.reduce(combined, { total: initialValue, groups: initialValue });
}
function getSingleCompare(s) {
if (typeof s === 'function') return s;
var compare = compares[String(s).toLowerCase()];
if (!compare) throw new Error('Could not get sort for arg ' + s + '. Expecting \'asc\' or \'desc\'');
return compare;
}
function levelCompareCreator(levels) {
return function (level) {
return levels[level];
};
}
function getGroupSorter(groupSorts, groups) {
if (!Array.isArray(groupSorts)) throw new Error('groupSorts must be an array');
var levels = groups.map(function (v, i) {
return groupSorts[i] || compares.asc;
}).map(getSingleCompare);
var levelToCompare = levelCompareCreator(levels);
return function (list, level) {
var compare = levelToCompare(level);
var groupName = groups[level].name;
return createSort(function (a, b) {
var aval = a.projection[groupName];
var bval = b.projection[groupName];
return compare(aval, bval);
})(list);
};
}
function getSorter(groups, groupSorts, dataSortWith) {
if (!groupSorts && !dataSortWith) return getGroupSorter([], groups);;
if (groupSorts && dataSortWith) throw new Error('You can only specify one type of sort (group or data)');
if (groupSorts) return getGroupSorter(groupSorts, groups);
return createSort(dataSortWith);
}
function flattenGroups(data, sorter) {
var level = arguments.length <= 2 || arguments[2] === undefined ? 0 : arguments[2];
if (!data) return [];
var levelData = (0, _values2.default)(data);
if (levelData.length === 0) return [];
return chain(sorter(levelData, level), function (row) {
return [(0, _extends9.default)({}, row, { level: level })].concat((0, _toConsumableArray3.default)(flattenGroups(row.subGroups, sorter, level + 1)));
});
}
var mapObj = function mapObj(obj, fn) {
return (0, _keys2.default)(obj).reduce(function (acc, k) {
return (0, _extends9.default)({}, acc, (0, _defineProperty3.default)({}, k, fn(obj[k])));
}, {});
};
function pointFromGroup(reduced, dataPoint) {
var value = dataPoint.value;
var subDataPoints = dataPoint.subDataPoints;
try {
var data = value(reduced);
if (subDataPoints) return pointsFrom(data, subDataPoints);
return data;
} catch (e) {
console.warn(e);
return null;
}
}
function pointsFrom(reduced, dataPoints) {
if (!dataPoints) return reduced;
return dataPoints.reduce(function (acc, v) {
return (0, _extends9.default)({}, acc, (0, _defineProperty3.default)({}, v.title, pointFromGroup(reduced, v)));
}, {});
}
function withPoints(group, dataPoints) {
if (!group) return group;
var data = pointsFrom(group.reduced, dataPoints);
var subGroups = group.subGroups && mapObj(group.subGroups, function (g) {
return withPoints(g, dataPoints);
});
return (0, _extends9.default)({}, group, { subGroups: subGroups, data: data });
}
function addPoints(_ref2, dataPoints) {
var total = _ref2.total;
var groups = _ref2.groups;
return {
total: withPoints({ reduced: total }, dataPoints).data,
groups: mapObj(groups, function (g) {
return withPoints(g, dataPoints);
})
};
}
function dataPathGetter(path) {
return function (obj) {
try {
return path.reduce(function (acc, v) {
return acc[v];
}, obj.data);
} catch (e) {
return undefined;
}
};
}
function toDataSelector(s) {
if (typeof s === 'function') return s;
if (Array.isArray(s)) return dataPathGetter(s);
return dataPathGetter(String(s).split('.'));
}
function compareBy(compare) {
return function (by) {
return function (a, b) {
return compare(by(a), by(b));
};
};
}
function byToWith(sortBy, dir) {
var compareFn = compares[dir];
if (!compareFn) throw new Error('Could not get sort for arg ' + dir + '. Expecting \'asc\' or \'desc\'');
var compareFns = [].concat(sortBy).map(toDataSelector).map(compareBy(compareFn));
return function (a, b) {
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = (0, _getIterator3.default)(compareFns), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var c = _step.value;
var v = c(a, b);
if (v !== 0) return v;
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
return 0;
};
}
function toDataSortWith(dataSortWith, dataSortBy) {
var dataSortDir = arguments.length <= 2 || arguments[2] === undefined ? 'asc' : arguments[2];
if (dataSortWith && dataSortBy) throw new Error('Cannot use dataSortWith with dataSortBy');
if (!dataSortBy) return dataSortWith;
return byToWith(dataSortBy, dataSortDir);
}
function pivot(_ref3) {
var groups = _ref3.groups;
var reducer = _ref3.reducer;
var dataSortWith = _ref3.dataSortWith;
var dataSortBy = _ref3.dataSortBy;
var dataSortDir = _ref3.dataSortDir;
var groupSorts = _ref3.groupSorts;
var dataPoints = _ref3.dataPoints;
var input = _ref3.input;
var _ref3$initialValue = _ref3.initialValue;
var initialValue = _ref3$initialValue === undefined ? {} : _ref3$initialValue;
var reduced = reduceData(input, groups, reducer, initialValue);
var withPoints = addPoints(reduced, dataPoints);
var sorter = getSorter(groups, groupSorts, toDataSortWith(dataSortWith, dataSortBy, dataSortDir));
var flattened = flattenGroups(withPoints.groups, sorter);
return (0, _extends9.default)({}, withPoints, { flattened: flattened });
}
var Pivoter = function () {
function Pivoter(obj) {
(0, _classCallCheck3.default)(this, Pivoter);
this.setFrom(obj);
this.listeners = [];
this.stage1();
}
(0, _createClass3.default)(Pivoter, [{
key: 'stage1',
value: function stage1() {
console.log('Running Stage 1');
this.reduced = reduceData(this.input, this.groups, this.reducer, this.initialValue);
this.stage2();
}
}, {
key: 'stage2',
value: function stage2() {
console.log('Running stage 2');
this.withPoints = addPoints(this.reduced, this.dataPoints);
this.total = this.withPoints.total;
this.groupsData = this.withPoints.groups;
this.stage3();
}
}, {
key: 'stage3',
value: function stage3() {
console.log('Running stage 3');
this.sorter = getSorter(this.groups, this.groupSorts, toDataSortWith(this.dataSortWith, this.dataSortBy, this.dataSortDir));
this.flattened = flattenGroups(this.withPoints.groups, this.sorter);
this.data = (0, _extends9.default)({}, this.withPoints, { flattened: this.flattened });
}
}, {
key: 'setFrom',
value: function setFrom(obj) {
var _this = this;
this.handleSorts(obj);
(0, _keys2.default)(obj).forEach(function (k) {
_this[k] = obj[k];
});
if (this.initialValue === undefined) this.initialValue = {};
}
}, {
key: 'handleSorts',
value: function handleSorts(obj) {
if (!this.hasAny(obj, ['groupSorts', 'dataSortWith', 'dataSortBy'])) return;
this.dataSortWith = undefined;
this.dataSortBy = undefined;
this.groupSorts = undefined;
}
}, {
key: 'hasAny',
value: function hasAny(obj, props) {
return props.some(function (p) {
return obj.hasOwnProperty(p);
});
}
}, {
key: 'update',
value: function update(obj) {
var _this2 = this;
this.setFrom(obj);
if (this.hasAny(obj, ['input', 'groups', 'reducer', 'initialValue'])) {
this.stage1();
} else if (this.hasAny(obj, ['dataPoints'])) {
this.stage2();
} else if (this.hasAny(obj, ['groupSorts', 'dataSortWith', 'dataSortBy', 'dataSortDir'])) {
this.stage3();
}
this.listeners.forEach(function (l) {
return l(_this2.data);
});
return this.data;
}
}, {
key: 'listen',
value: function listen(listener) {
this.listeners.push(listener);
listener(this.data);
}
}]);
return Pivoter;
}();
////////////////////////////////////////////////////////////////
var subDataPoints = [{ title: 'Quantity', value: function value(x) {
return x && x.quantity;
}, formatter: function formatter(x) {
return x;
} }, { title: 'Amount', value: function value(x) {
return x && x.sum / x.count || 0;
}, formatter: function formatter(x) {
return Number(x).toFixed(0);
} }];
var dataPoints = [{ title: 'Economy', value: function value(x) {
return x && x.Economy;
}, subDataPoints: subDataPoints }, { title: 'Regular', value: function value(x) {
return x && x.Regular;
}, subDataPoints: subDataPoints }, { title: 'Deluxe', value: function value(x) {
return x && x.Deluxe;
}, subDataPoints: subDataPoints }, { title: 'Grand Total', value: function value(x) {
return x && x.total;
}, subDataPoints: subDataPoints }];
var allGroups = [{ name: 'Manufacturer', selector: function selector(x) {
return x[2];
} }, { name: 'Category', selector: function selector(x) {
return x[4];
} }, { name: 'Entity', selector: function selector(x) {
return x[0];
} }, { name: 'Product', selector: function selector(x) {
return x[1];
} }];
var reducer = function reducer(data, row) {
var type = row[3];
var value = row[6];
var quantity = row[5];
var dataTotal = data.total || {};
var dataType = data[type] || {};
return (0, _extends9.default)({}, data, (0, _defineProperty3.default)({
total: {
count: (dataTotal.count || 0) + 1,
sum: (dataTotal.sum || 0) + value,
quantity: (dataTotal.quantity || 0) + quantity
}
}, type, {
count: (dataType.count || 0) + 1,
sum: (dataType.sum || 0) + value,
quantity: (dataType.quantity || 0) + quantity
}));
};
var pivoter = new Pivoter({ reducer: reducer, groups: [], dataPoints: dataPoints, input: window.data });
function range(start, end) {
var step = arguments.length <= 2 || arguments[2] === undefined ? 1 : arguments[2];
var a = [];for (var i = start; i < end; i += step) {
a.push(i);
}return a;
}
function leaves(data) {
return (0, _keys2.default)(data).reduce(function (acc, title) {
var value = data[title];
if ((typeof value === 'undefined' ? 'undefined' : (0, _typeof3.default)(value)) !== 'object') {
return [].concat((0, _toConsumableArray3.default)(acc), [value === undefined ? '' : value]);
}
return [].concat((0, _toConsumableArray3.default)(acc), (0, _toConsumableArray3.default)(leaves(value)));
}, []);
}
function titles(dataPoints) {
var base = arguments.length <= 1 || arguments[1] === undefined ? '' : arguments[1];
return dataPoints.reduce(function (acc, v) {
if (!v.subDataPoints) {
return [].concat((0, _toConsumableArray3.default)(acc), ['' + base + v.title]);
}
return [].concat((0, _toConsumableArray3.default)(acc), (0, _toConsumableArray3.default)(titles(v.subDataPoints, v.title + '.')));
}, []);
}
var opens = [];
var keyOpen = function keyOpen(key) {
return opens.some(function (o) {
return o === key;
});
};
var render = function render(data) {
var groupSorts = pivoter.groupSorts;
var sortBy = pivoter.dataSortBy;
var dir = pivoter.dataSortDir;
var headers = '\n <tr>\n ' + pivoter.groups.map(function (g, i) {
return '<th class="' + (groupSorts ? 'sorted-' + (groupSorts[i] || 'asc') : '') + ' group-header">' + g.name + '<span class="delete"></span></th>';
}).join('') + ' \n ' + titles(pivoter.dataPoints).map(function (t) {
return '<th class="' + (sortBy === t ? 'sorted-' + dir : '') + ' data-header">' + t + '</th>';
}).join('') + '\n </tr>\n ';
var toKey = function toKey(path) {
return path.join('PATHSEPARATOR');
};
var content = data.flattened.map(function (row) {
var parentKey = toKey(row.path.slice(0, -1));
if (row.level !== 0 && !keyOpen(parentKey)) return '';
var key = toKey(row.path);
var open = keyOpen(key);
var openClass = open ? 'open' : row.subGroups ? 'closed' : '';
return '<tr class="group level-' + row.level + '">\n ' + range(0, row.level).map(function () {
return '<td></td>';
}).join('') + ' \n <td class="group ' + openClass + '" data-path="' + key + '">' + row.path.slice(-1) + '</td>\n ' + range(0, pivoter.groups.length - 1 - row.level).map(function () {
return '<td></td>';
}).join('') + ' \n ' + leaves(row.data, dataPoints).map(function (l) {
return '<td class="data">' + l + '</td>';
}).join('') + '\n </tr>';
});
var footer = '<tr>\n ' + (pivoter.groups.length > 0 ? '<td>Grand Total</td>' : '') + '\n ' + range(0, pivoter.groups.length - 1).map(function () {
return '<td></td>';
}).join('') + '\n ' + leaves(data.total, dataPoints).map(function (l) {
return '<td class="footer-data">' + l + '</td>';
}).join('') + '\n </tr>\n ';
document.getElementById('pivot-table').innerHTML = '' + headers + content.join('') + footer;
var buttons = allGroups.filter(function (g) {
return !pivoter.groups.some(function (pg) {
return pg.name === g.name;
});
}).map(function (g) {
return '<button>' + g.name + '</button>';
});
document.getElementById('buttons').innerHTML = '' + buttons.join('');
};
pivoter.listen(render);
var otherDir = function otherDir(d) {
return d === 'asc' ? 'desc' : 'asc';
};
document.getElementById('pivot-table').addEventListener('click', function (e) {
var target = e.target.closest('.data-header');
if (target) {
var dataSortBy = target.innerText;
var dir = otherDir(pivoter.dataSortDir);
var dataSortDir = dataSortBy === pivoter.dataSortBy ? dir : 'asc';
pivoter.update({ dataSortDir: dataSortDir, dataSortBy: dataSortBy });
}
});
document.getElementById('pivot-table').addEventListener('click', function (e) {
if (e.target.classList.contains('delete')) {
(function () {
var target = e.target.closest('.group-header');
var groupName = target.innerText;
pivoter.update({ groups: pivoter.groups.filter(function (g) {
return g.name !== groupName;
}) });
})();
}
});
document.getElementById('pivot-table').addEventListener('click', function (e) {
var target = e.target.closest('.group-header');
if (target) {
var _ret2 = function () {
if (!pivoter.groupSorts) {
return {
v: pivoter.update({ groupSorts: range(0, pivoter.groups.length).map(function () {
return 'asc';
}) })
};
}
var index = [].concat((0, _toConsumableArray3.default)(target.parentNode.children)).indexOf(target);
var groupSorts = pivoter.groups.map(function (v, i) {
return pivoter.groupSorts[i] || 'asc';
}).map(function (v, i) {
return i === index ? otherDir(v) : v;
});
pivoter.update({ groupSorts: groupSorts });
}();
if ((typeof _ret2 === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret2)) === "object") return _ret2.v;
}
});
var isOpen = function isOpen(t) {
return t.classList.contains('open');
};
var isClosed = function isClosed(t) {
return t.classList.contains('closed');
};
document.getElementById('pivot-table').addEventListener('click', function (e) {
var target = e.target.closest('.group');
if (target) {
var open = isOpen(target);
var closed = isClosed(target);
if (!open && !closed) return;
if (open) {
opens = opens.filter(function (o) {
return !o.startsWith(target.dataset.path);
});
} else {
opens.push(target.dataset.path);
}
render(pivoter.data);
}
});
document.getElementById('buttons').addEventListener('click', function (e) {
var target = e.target.closest('button');
if (target) {
(function () {
var name = target.innerText;
var group = allGroups.find(function (g) {
return g.name === name;
});
pivoter.update({ groups: pivoter.groups.concat(group) });
})();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment