diff --git a/.idea/YourTradebase.iml b/.idea/YourTradebase.iml
new file mode 100644
index 0000000..2f440e5
--- /dev/null
+++ b/.idea/YourTradebase.iml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
new file mode 100644
index 0000000..15a15b2
--- /dev/null
+++ b/.idea/encodings.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..dfeeeb4
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..319f9a8
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..5d7fbfa
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 0000000..dceff8b
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,422 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ unordered_list
+ person
+ terminal
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1547585424728
+
+
+ 1547585424728
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.rspec b/.rspec
new file mode 100644
index 0000000..c99d2e7
--- /dev/null
+++ b/.rspec
@@ -0,0 +1 @@
+--require spec_helper
diff --git a/Gemfile b/Gemfile
new file mode 100644
index 0000000..c77cfea
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,11 @@
+source 'https://rubygems.org'
+
+ruby '~> 2.5.3'
+
+gem 'json'
+gem 'haversine'
+gem 'terminal-table'
+
+group :test do
+ gem 'rspec', '~>3.8.0'
+end
\ No newline at end of file
diff --git a/Gemfile.lock b/Gemfile.lock
new file mode 100644
index 0000000..34d3e52
--- /dev/null
+++ b/Gemfile.lock
@@ -0,0 +1,37 @@
+GEM
+ remote: https://rubygems.org/
+ specs:
+ diff-lcs (1.3)
+ haversine (0.3.2)
+ json (2.1.0)
+ rspec (3.8.0)
+ rspec-core (~> 3.8.0)
+ rspec-expectations (~> 3.8.0)
+ rspec-mocks (~> 3.8.0)
+ rspec-core (3.8.0)
+ rspec-support (~> 3.8.0)
+ rspec-expectations (3.8.2)
+ diff-lcs (>= 1.2.0, < 2.0)
+ rspec-support (~> 3.8.0)
+ rspec-mocks (3.8.0)
+ diff-lcs (>= 1.2.0, < 2.0)
+ rspec-support (~> 3.8.0)
+ rspec-support (3.8.0)
+ terminal-table (1.8.0)
+ unicode-display_width (~> 1.1, >= 1.1.1)
+ unicode-display_width (1.4.1)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ haversine
+ json
+ rspec (~> 3.8.0)
+ terminal-table
+
+RUBY VERSION
+ ruby 2.5.3p105
+
+BUNDLED WITH
+ 1.16.6
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..282b9d1
--- /dev/null
+++ b/README.md
@@ -0,0 +1,56 @@
+YTB Coding Challange Solution
+-
+**Requirements**
+
+* Ruby = 2.5.3
+
+**Setup**
+1. Download zip or clone repository
+2. Goto project's folder in your terminal
+3. Run `$ bundle install`
+
+**Task 1**
+
+To run the first task run `$ ruby bin/runner.rb - l`
+
+**Task 2**
+
+To run the second task run `$ ruby bin/runner.rb - a`
+
+**Additional**
+
+There are additional parameters that can be added to the programme.
+
+`$ ruby bin/runner.rb **-c** [-radius Integer] [-filter_by column country] [-sort_by id]`
+
+Example: If you wish to search for all individuals located Wales in a radius of 300km from Brighton
+
+`$ ruby bin/runner.rb -c -radius 300 -filter_by country wales`
+
+**Comments**
+
+The main idea should remain the changeability of the application at hand, as it usually is the only metric that counts. The classes all have a single responsibility and are independent (except for Task, yet the dependency is one directional).
+
+I prefer to remove argument-order dependencies on any public interface of a class. I understand that this may differ from other people's practices. However, even you limit the parameter list and only allow methods to be public that is stable, the argument list may change, and you end up with bugs that could otherwise be avoided.
+
+I spent close to two hours on writing the application my efforts within a decent timeframe. The lack of time left the app with some known issues and incomplete implementation.
+
+_Known Issues_
+
+1. `People#sort_by` fails when the column picked is a hash (value of a key). Hence, the rescue.
+2. `Interface#print_table` order of column headings is not linked to the actual column value
+3. The Task class is somewhat experimental and comparable to a spike. There is a violation when it comes to dependency injection given an object of each, People and Interface, are created within. The dependencies have been isolated by moving the creation to private methods to highlight this.
+4. The way chaining in `Task#one` and `Task#two` may not be pretty, yet, the changing has been implemented considering that the next step in the evolution of the programme is more flexibility so the user can define how to filter and search the list (see. Additional).
+
+_Required Improvements_
+
+1. People know too much about the JSON format and may not cope well if the format changes (especially when it comes to location).
+2. Error handling. Exceptions are being raised, yet little thought has been given towards a rescue path. I do not believe everything should be blindly rescued within an application - therefore this bit is left open.
+
+_Incomplete_
+
+1. There are no tests for Task
+2. There are no tests for Interface
+3. Note that I only test messages of the public interface, as testing anything private that is unstable and likely to change is a duplication, given it is part of the test of a publicly available message, and thereby only ads cost (writing specs, maintaining them, etc.)
+
+Mainly because both classes had been added in a spike towards the end of writing, they require cleaning up, respectively a rewrite anyway with testing first.
\ No newline at end of file
diff --git a/assets/people.json b/assets/people.json
new file mode 100644
index 0000000..c308814
--- /dev/null
+++ b/assets/people.json
@@ -0,0 +1,1602 @@
+[
+ {
+ "id": "5a00487898a445517663540a",
+ "value": "2287.04",
+ "name": {
+ "first": "Karyn",
+ "last": "Hess"
+ },
+ "location": {
+ "latitude": "51.429388",
+ "longitude": "-2.024979"
+ },
+ "company": "Enaut",
+ "email": "karyn.hess@enaut.org",
+ "address": "423 Auburn Place, Sanders, Texas, 5269",
+ "country": "england"
+ },
+ {
+ "id": "5a00487905c99b6667e5e1ea",
+ "value": "3749.61",
+ "name": {
+ "first": "Riddle",
+ "last": "Nixon"
+ },
+ "location": {
+ "latitude": "51.077801",
+ "longitude": "-3.082931"
+ },
+ "company": "Isodrive",
+ "email": "riddle.nixon@isodrive.me",
+ "address": "177 Wyckoff Avenue, Marienthal, Guam, 1832",
+ "country": "england"
+ },
+ {
+ "id": "5a004879df8be73cb1d3c036",
+ "value": "3607.35",
+ "name": {
+ "first": "Stefanie",
+ "last": "Wilson"
+ },
+ "location": {
+ "latitude": "51.837922",
+ "longitude": "-4.457236"
+ },
+ "company": "Candecor",
+ "email": "stefanie.wilson@candecor.us",
+ "address": "758 Rockaway Parkway, Bayview, Idaho, 3892",
+ "country": "wales"
+ },
+ {
+ "id": "5a004879c5f159630e71ae5c",
+ "value": "2008.06",
+ "name": {
+ "first": "Corrine",
+ "last": "Lawson"
+ },
+ "location": {
+ "latitude": "51.00752",
+ "longitude": "-3.683598"
+ },
+ "company": "Ronelon",
+ "email": "corrine.lawson@ronelon.biz",
+ "address": "295 Varanda Place, Hackneyville, Georgia, 7472",
+ "country": "england"
+ },
+ {
+ "id": "5a004879a3096945f3ae6dd3",
+ "value": "3851.44",
+ "name": {
+ "first": "Jeannette",
+ "last": "Francis"
+ },
+ "location": {
+ "latitude": "52.524156",
+ "longitude": "-1.899498"
+ },
+ "company": "Enquility",
+ "email": "jeannette.francis@enquility.net",
+ "address": "900 Pierrepont Place, Umapine, Missouri, 7845",
+ "country": "england"
+ },
+ {
+ "id": "5a004879b88e1c3d36b82a53",
+ "value": "1942.01",
+ "name": {
+ "first": "Hines",
+ "last": "Randolph"
+ },
+ "location": {
+ "latitude": "50.431939",
+ "longitude": "-3.9422"
+ },
+ "company": "Frosnex",
+ "email": "hines.randolph@frosnex.co.uk",
+ "address": "571 Myrtle Avenue, Lund, Michigan, 2638",
+ "country": "england"
+ },
+ {
+ "id": "5a00487965391283f07ca148",
+ "value": "1022.48",
+ "name": {
+ "first": "Joyce",
+ "last": "Shannon"
+ },
+ "location": {
+ "latitude": "51.946801",
+ "longitude": "-5.305864"
+ },
+ "company": "Interodeo",
+ "email": "joyce.shannon@interodeo.name",
+ "address": "402 Clarkson Avenue, Canoochee, South Carolina, 7626",
+ "country": "wales"
+ },
+ {
+ "id": "5a0048798966b856951dbcec",
+ "value": "1266.05",
+ "name": {
+ "first": "Compton",
+ "last": "Hurley"
+ },
+ "location": {
+ "latitude": "53.720496",
+ "longitude": "-2.127667"
+ },
+ "company": "Venoflex",
+ "email": "compton.hurley@venoflex.info",
+ "address": "132 Ainslie Street, Boyd, Arkansas, 3060",
+ "country": "england"
+ },
+ {
+ "id": "5a00487998f35bfee4f1f809",
+ "value": "2874.90",
+ "name": {
+ "first": "Estes",
+ "last": "Welch"
+ },
+ "location": {
+ "latitude": "53.074803",
+ "longitude": "-3.623905"
+ },
+ "company": "Luxuria",
+ "email": "estes.welch@luxuria.tv",
+ "address": "250 Irving Place, Waikele, Wisconsin, 3271",
+ "country": "wales"
+ },
+ {
+ "id": "5a0048798708a2615cb9071a",
+ "value": "2456.13",
+ "name": {
+ "first": "Ida",
+ "last": "Carver"
+ },
+ "location": {
+ "latitude": "53.700709",
+ "longitude": "-1.238537"
+ },
+ "company": "Apexia",
+ "email": "ida.carver@apexia.com",
+ "address": "632 Will Place, Walton, Alaska, 7112",
+ "country": "england"
+ },
+ {
+ "id": "5a0048797d3d15a4aabc7dd8",
+ "value": "1901.66",
+ "name": {
+ "first": "Tonia",
+ "last": "Hancock"
+ },
+ "location": {
+ "latitude": "51.905358",
+ "longitude": "-5.849261"
+ },
+ "company": "Comvex",
+ "email": "tonia.hancock@comvex.io",
+ "address": "623 Clara Street, Wakarusa, Tennessee, 4310",
+ "country": "wales"
+ },
+ {
+ "id": "5a0048794db08bc69ee6e7b0",
+ "value": "1562.98",
+ "name": {
+ "first": "Foster",
+ "last": "Weber"
+ },
+ "location": {
+ "latitude": "53.774468",
+ "longitude": "-5.663588"
+ },
+ "company": "Menbrain",
+ "email": "foster.weber@menbrain.ca",
+ "address": "678 Sutton Street, Maybell, District Of Columbia, 1316",
+ "country": "wales"
+ },
+ {
+ "id": "5a0048798a615cbe25f673b2",
+ "value": "1793.82",
+ "name": {
+ "first": "Malinda",
+ "last": "Owens"
+ },
+ "location": {
+ "latitude": "50.766109",
+ "longitude": "-0.447396"
+ },
+ "company": "Zidant",
+ "email": "malinda.owens@zidant.org",
+ "address": "854 Broadway , Homeland, Florida, 550",
+ "country": "england"
+ },
+ {
+ "id": "5a0048792405c8d2fdaaee3b",
+ "value": "3159.79",
+ "name": {
+ "first": "Victoria",
+ "last": "Talley"
+ },
+ "location": {
+ "latitude": "52.779934",
+ "longitude": "-0.473664"
+ },
+ "company": "Zentime",
+ "email": "victoria.talley@zentime.me",
+ "address": "330 Rutledge Street, Greer, Illinois, 8489",
+ "country": "england"
+ },
+ {
+ "id": "5a004879e860c4f5ce29eec7",
+ "value": "1071.92",
+ "name": {
+ "first": "Sherry",
+ "last": "Pearson"
+ },
+ "location": {
+ "latitude": "50.462267",
+ "longitude": "-1.527313"
+ },
+ "company": "Evidends",
+ "email": "sherry.pearson@evidends.us",
+ "address": "848 Jefferson Avenue, Harrodsburg, South Dakota, 9600",
+ "country": "england"
+ },
+ {
+ "id": "5a004879ab03dea73523f942",
+ "value": "2861.20",
+ "name": {
+ "first": "Jane",
+ "last": "Marks"
+ },
+ "location": {
+ "latitude": "53.580594",
+ "longitude": "-1.509291"
+ },
+ "company": "Virva",
+ "email": "jane.marks@virva.biz",
+ "address": "420 Essex Street, Sterling, American Samoa, 5164",
+ "country": "england"
+ },
+ {
+ "id": "5a00487945f8c7e20b2fd5c2",
+ "value": "2816.42",
+ "name": {
+ "first": "Bartlett",
+ "last": "Hawkins"
+ },
+ "location": {
+ "latitude": "52.764883",
+ "longitude": "-6.107933"
+ },
+ "company": "Unq",
+ "email": "bartlett.hawkins@unq.net",
+ "address": "991 Union Street, Swartzville, Ohio, 5146",
+ "country": "wales"
+ },
+ {
+ "id": "5a004879a39dcd28df1f033a",
+ "value": "2078.36",
+ "name": {
+ "first": "Terry",
+ "last": "Dejesus"
+ },
+ "location": {
+ "latitude": "50.292545",
+ "longitude": "-1.810523"
+ },
+ "company": "Zenthall",
+ "email": "terry.dejesus@zenthall.co.uk",
+ "address": "264 Kossuth Place, Bodega, Maryland, 2121",
+ "country": "england"
+ },
+ {
+ "id": "5a004879ec27e626dc6e767b",
+ "value": "2978.30",
+ "name": {
+ "first": "Goodman",
+ "last": "Harding"
+ },
+ "location": {
+ "latitude": "50.012354",
+ "longitude": "-3.115474"
+ },
+ "company": "Andershun",
+ "email": "goodman.harding@andershun.name",
+ "address": "245 Harrison Avenue, Germanton, Marshall Islands, 7379",
+ "country": "england"
+ },
+ {
+ "id": "5a0048795e7f62bec242703a",
+ "value": "1927.34",
+ "name": {
+ "first": "Goodwin",
+ "last": "Spence"
+ },
+ "location": {
+ "latitude": "52.591905",
+ "longitude": "-1.1294"
+ },
+ "company": "Aquamate",
+ "email": "goodwin.spence@aquamate.info",
+ "address": "461 Grove Place, Starks, Nevada, 3147",
+ "country": "england"
+ },
+ {
+ "id": "5a004879f726b4f2d84cba42",
+ "value": "2136.64",
+ "name": {
+ "first": "Hollie",
+ "last": "Lawrence"
+ },
+ "location": {
+ "latitude": "52.379107",
+ "longitude": "-0.214126"
+ },
+ "company": "Injoy",
+ "email": "hollie.lawrence@injoy.tv",
+ "address": "450 Provost Street, Coyote, Oklahoma, 3620",
+ "country": "england"
+ },
+ {
+ "id": "5a004879b2e834ed2d48f501",
+ "value": "1004.05",
+ "name": {
+ "first": "Palmer",
+ "last": "Hernandez"
+ },
+ "location": {
+ "latitude": "51.017705",
+ "longitude": "-2.25826"
+ },
+ "company": "Inquala",
+ "email": "palmer.hernandez@inquala.com",
+ "address": "904 Perry Terrace, Hampstead, Virgin Islands, 5443",
+ "country": "england"
+ },
+ {
+ "id": "5a004879352733d0786d8270",
+ "value": "3735.93",
+ "name": {
+ "first": "Anne",
+ "last": "Colon"
+ },
+ "location": {
+ "latitude": "51.847934",
+ "longitude": "-0.641801"
+ },
+ "company": "Techmania",
+ "email": "anne.colon@techmania.io",
+ "address": "253 Degraw Street, Driftwood, Colorado, 6605",
+ "country": "england"
+ },
+ {
+ "id": "5a004879a14908bc9bf24ecf",
+ "value": "3571.79",
+ "name": {
+ "first": "Downs",
+ "last": "Byrd"
+ },
+ "location": {
+ "latitude": "50.802013",
+ "longitude": "-2.604672"
+ },
+ "company": "Qualitern",
+ "email": "downs.byrd@qualitern.ca",
+ "address": "208 Cleveland Street, Navarre, New York, 8196",
+ "country": "england"
+ },
+ {
+ "id": "5a004879ee4c0501b5921e6c",
+ "value": "2462.96",
+ "name": {
+ "first": "Pierce",
+ "last": "Arnold"
+ },
+ "location": {
+ "latitude": "50.604299",
+ "longitude": "-2.941913"
+ },
+ "company": "Datagene",
+ "email": "pierce.arnold@datagene.org",
+ "address": "602 Baughman Place, Keller, Delaware, 3809",
+ "country": "england"
+ },
+ {
+ "id": "5a004879601051644819af7b",
+ "value": "1338.85",
+ "name": {
+ "first": "Desiree",
+ "last": "Frazier"
+ },
+ "location": {
+ "latitude": "52.084961",
+ "longitude": "-0.595082"
+ },
+ "company": "Unisure",
+ "email": "desiree.frazier@unisure.me",
+ "address": "267 Newkirk Placez, Greenock, Rhode Island, 4112",
+ "country": "england"
+ },
+ {
+ "id": "5a0048795f0b6fb2ac16fb8f",
+ "value": "1431.24",
+ "name": {
+ "first": "Baker",
+ "last": "Conley"
+ },
+ "location": {
+ "latitude": "51.934471",
+ "longitude": "-5.027516"
+ },
+ "company": "Coash",
+ "email": "baker.conley@coash.us",
+ "address": "379 Kingsway Place, Mayfair, Vermont, 7263",
+ "country": "wales"
+ },
+ {
+ "id": "5a00487935e88049c53ff015",
+ "value": "3600.10",
+ "name": {
+ "first": "Mercedes",
+ "last": "Lott"
+ },
+ "location": {
+ "latitude": "53.072874",
+ "longitude": "-4.290184"
+ },
+ "company": "Quantasis",
+ "email": "mercedes.lott@quantasis.biz",
+ "address": "543 Wogan Terrace, Canterwood, New Mexico, 9424",
+ "country": "wales"
+ },
+ {
+ "id": "5a0048794979d230e3b21c50",
+ "value": "1676.28",
+ "name": {
+ "first": "Casey",
+ "last": "Kaufman"
+ },
+ "location": {
+ "latitude": "52.974927",
+ "longitude": "-6.011307"
+ },
+ "company": "Zuvy",
+ "email": "casey.kaufman@zuvy.net",
+ "address": "283 Hunts Lane, Tecolotito, Federated States Of Micronesia, 282",
+ "country": "wales"
+ },
+ {
+ "id": "5a004879b787f56919591acd",
+ "value": "1454.86",
+ "name": {
+ "first": "Tanner",
+ "last": "Pollard"
+ },
+ "location": {
+ "latitude": "52.801105",
+ "longitude": "-5.529224"
+ },
+ "company": "Visualix",
+ "email": "tanner.pollard@visualix.co.uk",
+ "address": "459 Lawrence Avenue, Craig, Washington, 4806",
+ "country": "wales"
+ },
+ {
+ "id": "5a004879cba4d2615ed187a9",
+ "value": "2579.89",
+ "name": {
+ "first": "Christie",
+ "last": "Cotton"
+ },
+ "location": {
+ "latitude": "51.046233",
+ "longitude": "-0.056777"
+ },
+ "company": "Singavera",
+ "email": "christie.cotton@singavera.name",
+ "address": "428 Cooper Street, Fedora, Palau, 8039",
+ "country": "england"
+ },
+ {
+ "id": "5a00487947321f1746f910ef",
+ "value": "1071.34",
+ "name": {
+ "first": "Moses",
+ "last": "Hopper"
+ },
+ "location": {
+ "latitude": "51.010407",
+ "longitude": "-0.365423"
+ },
+ "company": "Duoflex",
+ "email": "moses.hopper@duoflex.info",
+ "address": "307 Maujer Street, Edgewater, Hawaii, 6515",
+ "country": "england"
+ },
+ {
+ "id": "5a0048790e03263cb83bf115",
+ "value": "1134.38",
+ "name": {
+ "first": "Rhonda",
+ "last": "Cox"
+ },
+ "location": {
+ "latitude": "50.262932",
+ "longitude": "-2.954396"
+ },
+ "company": "Songbird",
+ "email": "rhonda.cox@songbird.tv",
+ "address": "211 Losee Terrace, Aberdeen, Utah, 5716",
+ "country": "england"
+ },
+ {
+ "id": "5a004879daf844051f1f8efe",
+ "value": "3005.12",
+ "name": {
+ "first": "Kirsten",
+ "last": "Dunlap"
+ },
+ "location": {
+ "latitude": "50.898556",
+ "longitude": "-0.354055"
+ },
+ "company": "Hydrocom",
+ "email": "kirsten.dunlap@hydrocom.com",
+ "address": "610 Lake Place, Jamestown, New Jersey, 9374",
+ "country": "england"
+ },
+ {
+ "id": "5a004879ecd95938809047be",
+ "value": "3575.80",
+ "name": {
+ "first": "Ruthie",
+ "last": "Malone"
+ },
+ "location": {
+ "latitude": "52.56134",
+ "longitude": "-5.630958"
+ },
+ "company": "Isoswitch",
+ "email": "ruthie.malone@isoswitch.io",
+ "address": "465 Rutland Road, Omar, Kentucky, 2387",
+ "country": "wales"
+ },
+ {
+ "id": "5a004879cdee7a6a37089794",
+ "value": "2570.48",
+ "name": {
+ "first": "Cooke",
+ "last": "Moses"
+ },
+ "location": {
+ "latitude": "51.777998",
+ "longitude": "-3.781289"
+ },
+ "company": "Hyplex",
+ "email": "cooke.moses@hyplex.ca",
+ "address": "105 Oxford Street, Bowie, Kansas, 6209",
+ "country": "wales"
+ },
+ {
+ "id": "5a004879e353190c82dedccd",
+ "value": "1108.63",
+ "name": {
+ "first": "Henry",
+ "last": "Deleon"
+ },
+ "location": {
+ "latitude": "50.596196",
+ "longitude": "-5.241864"
+ },
+ "company": "Zillan",
+ "email": "henry.deleon@zillan.org",
+ "address": "632 Butler Street, Vienna, Indiana, 6530",
+ "country": "england"
+ },
+ {
+ "id": "5a004879d29f57123989d97a",
+ "value": "1143.72",
+ "name": {
+ "first": "Rena",
+ "last": "Patton"
+ },
+ "location": {
+ "latitude": "53.647546",
+ "longitude": "-4.099547"
+ },
+ "company": "Exodoc",
+ "email": "rena.patton@exodoc.me",
+ "address": "713 Seeley Street, Felt, Minnesota, 2289",
+ "country": "wales"
+ },
+ {
+ "id": "5a0048791fd0eb99c84daf96",
+ "value": "3445.85",
+ "name": {
+ "first": "Todd",
+ "last": "Wooten"
+ },
+ "location": {
+ "latitude": "51.406367",
+ "longitude": "-0.029817"
+ },
+ "company": "Photobin",
+ "email": "todd.wooten@photobin.us",
+ "address": "411 Greene Avenue, Groton, North Carolina, 1663",
+ "country": "england"
+ },
+ {
+ "id": "5a004879a9fd958062eea032",
+ "value": "2098.47",
+ "name": {
+ "first": "Barnett",
+ "last": "Mayo"
+ },
+ "location": {
+ "latitude": "51.953807",
+ "longitude": "-1.957769"
+ },
+ "company": "Tersanki",
+ "email": "barnett.mayo@tersanki.biz",
+ "address": "954 Hooper Street, Cedarville, Pennsylvania, 867",
+ "country": "england"
+ },
+ {
+ "id": "5a004879d635fa7c13349935",
+ "value": "3807.20",
+ "name": {
+ "first": "Collins",
+ "last": "Haley"
+ },
+ "location": {
+ "latitude": "53.621243",
+ "longitude": "-4.412705"
+ },
+ "company": "Gallaxia",
+ "email": "collins.haley@gallaxia.net",
+ "address": "499 Dictum Court, Sussex, Louisiana, 7695",
+ "country": "wales"
+ },
+ {
+ "id": "5a004879fbc7f8075ccf0234",
+ "value": "1595.80",
+ "name": {
+ "first": "Garrett",
+ "last": "Lopez"
+ },
+ "location": {
+ "latitude": "50.939701",
+ "longitude": "-5.590329"
+ },
+ "company": "Comcur",
+ "email": "garrett.lopez@comcur.co.uk",
+ "address": "353 Lincoln Terrace, Clarence, Connecticut, 9531",
+ "country": "england"
+ },
+ {
+ "id": "5a004879a56f8c9e03444849",
+ "value": "3985.85",
+ "name": {
+ "first": "Whitley",
+ "last": "Langley"
+ },
+ "location": {
+ "latitude": "53.152254",
+ "longitude": "-3.22497"
+ },
+ "company": "Buzzness",
+ "email": "whitley.langley@buzzness.name",
+ "address": "693 Rogers Avenue, Dahlen, North Dakota, 5374",
+ "country": "wales"
+ },
+ {
+ "id": "5a004879c405e10f5a5cedc9",
+ "value": "2904.55",
+ "name": {
+ "first": "Wolf",
+ "last": "Ware"
+ },
+ "location": {
+ "latitude": "52.915336",
+ "longitude": "-0.60763"
+ },
+ "company": "Glukgluk",
+ "email": "wolf.ware@glukgluk.info",
+ "address": "600 Interborough Parkway, Wikieup, Nebraska, 7807",
+ "country": "england"
+ },
+ {
+ "id": "5a00487913f9e21cb5eaaba1",
+ "value": "2648.68",
+ "name": {
+ "first": "Diane",
+ "last": "Shepard"
+ },
+ "location": {
+ "latitude": "51.506095",
+ "longitude": "-3.741707"
+ },
+ "company": "Ezent",
+ "email": "diane.shepard@ezent.tv",
+ "address": "668 Amboy Street, Gardiner, Puerto Rico, 1267",
+ "country": "wales"
+ },
+ {
+ "id": "5a004879e319fdc40c41dc24",
+ "value": "2730.77",
+ "name": {
+ "first": "Olive",
+ "last": "Perez"
+ },
+ "location": {
+ "latitude": "53.194724",
+ "longitude": "-3.462935"
+ },
+ "company": "Automon",
+ "email": "olive.perez@automon.com",
+ "address": "857 Prescott Place, Magnolia, West Virginia, 2445",
+ "country": "wales"
+ },
+ {
+ "id": "5a004879d0e9f5d5088d157f",
+ "value": "1620.73",
+ "name": {
+ "first": "Adeline",
+ "last": "Cabrera"
+ },
+ "location": {
+ "latitude": "52.763776",
+ "longitude": "-0.984589"
+ },
+ "company": "Dancerity",
+ "email": "adeline.cabrera@dancerity.io",
+ "address": "814 Barwell Terrace, Konterra, Mississippi, 193",
+ "country": "england"
+ },
+ {
+ "id": "5a004879894a3bdefc02bfd8",
+ "value": "2580.63",
+ "name": {
+ "first": "Levy",
+ "last": "Franklin"
+ },
+ "location": {
+ "latitude": "53.620106",
+ "longitude": "-4.566805"
+ },
+ "company": "Flotonic",
+ "email": "levy.franklin@flotonic.ca",
+ "address": "617 Lancaster Avenue, Chesapeake, Massachusetts, 8110",
+ "country": "wales"
+ },
+ {
+ "id": "5a004879cc68f53d82157d70",
+ "value": "1417.23",
+ "name": {
+ "first": "Fran",
+ "last": "Medina"
+ },
+ "location": {
+ "latitude": "51.650005",
+ "longitude": "-0.37347"
+ },
+ "company": "Insuron",
+ "email": "fran.medina@insuron.org",
+ "address": "471 Harbor Court, Accoville, Alabama, 8833",
+ "country": "england"
+ },
+ {
+ "id": "5a0048798ef4f8d454a68361",
+ "value": "3633.37",
+ "name": {
+ "first": "Manning",
+ "last": "Knapp"
+ },
+ "location": {
+ "latitude": "51.324444",
+ "longitude": "-4.940616"
+ },
+ "company": "Eventage",
+ "email": "manning.knapp@eventage.me",
+ "address": "876 Ross Street, Keyport, Virginia, 9874",
+ "country": "england"
+ },
+ {
+ "id": "5a0048790af951d3e57470c9",
+ "value": "3152.73",
+ "name": {
+ "first": "Janell",
+ "last": "Atkins"
+ },
+ "location": {
+ "latitude": "53.749158",
+ "longitude": "-2.716944"
+ },
+ "company": "Helixo",
+ "email": "janell.atkins@helixo.us",
+ "address": "566 Dobbin Street, Brethren, Wyoming, 8487",
+ "country": "england"
+ },
+ {
+ "id": "5a0048799d5fbfc7cd6a0cfc",
+ "value": "1950.14",
+ "name": {
+ "first": "Mindy",
+ "last": "Gomez"
+ },
+ "location": {
+ "latitude": "51.418735",
+ "longitude": "-3.952244"
+ },
+ "company": "Comdom",
+ "email": "mindy.gomez@comdom.biz",
+ "address": "887 Anna Court, Lisco, New Hampshire, 4885",
+ "country": "wales"
+ },
+ {
+ "id": "5a0048794ca16cae0e2569d1",
+ "value": "1970.96",
+ "name": {
+ "first": "Robinson",
+ "last": "Duke"
+ },
+ "location": {
+ "latitude": "51.277848",
+ "longitude": "-5.082675"
+ },
+ "company": "Speedbolt",
+ "email": "robinson.duke@speedbolt.net",
+ "address": "106 Roosevelt Place, Ilchester, Oregon, 8864",
+ "country": "england"
+ },
+ {
+ "id": "5a00487936eb5ad19bcd5fc9",
+ "value": "3320.72",
+ "name": {
+ "first": "Melanie",
+ "last": "Buckner"
+ },
+ "location": {
+ "latitude": "51.242404",
+ "longitude": "-2.737969"
+ },
+ "company": "Fleetmix",
+ "email": "melanie.buckner@fleetmix.co.uk",
+ "address": "705 Mayfair Drive, National, Montana, 5959",
+ "country": "england"
+ },
+ {
+ "id": "5a004879ab1e46beb126ac23",
+ "value": "2647.00",
+ "name": {
+ "first": "Suarez",
+ "last": "Melton"
+ },
+ "location": {
+ "latitude": "53.712526",
+ "longitude": "-0.656663"
+ },
+ "company": "Zentility",
+ "email": "suarez.melton@zentility.name",
+ "address": "929 Stewart Street, Deseret, Iowa, 5160",
+ "country": "england"
+ },
+ {
+ "id": "5a0048792c7d082fc24205da",
+ "value": "1996.51",
+ "name": {
+ "first": "Gilmore",
+ "last": "Keller"
+ },
+ "location": {
+ "latitude": "53.541537",
+ "longitude": "-0.446775"
+ },
+ "company": "Microluxe",
+ "email": "gilmore.keller@microluxe.info",
+ "address": "736 Townsend Street, Laurelton, California, 4821",
+ "country": "england"
+ },
+ {
+ "id": "5a004879bc0de1f9093f4b84",
+ "value": "1870.02",
+ "name": {
+ "first": "Sofia",
+ "last": "Bullock"
+ },
+ "location": {
+ "latitude": "53.231103",
+ "longitude": "-5.47683"
+ },
+ "company": "Jetsilk",
+ "email": "sofia.bullock@jetsilk.tv",
+ "address": "640 Aviation Road, Linwood, Maine, 7724",
+ "country": "wales"
+ },
+ {
+ "id": "5a00487923e2c2428ad973b4",
+ "value": "2289.40",
+ "name": {
+ "first": "Burgess",
+ "last": "Sanchez"
+ },
+ "location": {
+ "latitude": "51.111059",
+ "longitude": "-1.913589"
+ },
+ "company": "Datacator",
+ "email": "burgess.sanchez@datacator.com",
+ "address": "675 Battery Avenue, Manchester, Northern Mariana Islands, 1089",
+ "country": "england"
+ },
+ {
+ "id": "5a0048795944a4cbb5b9ede4",
+ "value": "3985.03",
+ "name": {
+ "first": "Pennington",
+ "last": "Vang"
+ },
+ "location": {
+ "latitude": "50.575012",
+ "longitude": "-2.030082"
+ },
+ "company": "Circum",
+ "email": "pennington.vang@circum.io",
+ "address": "820 McKibben Street, Belleview, Texas, 5172",
+ "country": "england"
+ },
+ {
+ "id": "5a0048799acfdd965f233b10",
+ "value": "1487.27",
+ "name": {
+ "first": "Craft",
+ "last": "Oneil"
+ },
+ "location": {
+ "latitude": "53.73674",
+ "longitude": "-0.213264"
+ },
+ "company": "Surelogic",
+ "email": "craft.oneil@surelogic.ca",
+ "address": "995 Kathleen Court, Cuylerville, Guam, 3712",
+ "country": "england"
+ },
+ {
+ "id": "5a004879378835131e7e2864",
+ "value": "2396.19",
+ "name": {
+ "first": "Kasey",
+ "last": "Delgado"
+ },
+ "location": {
+ "latitude": "52.647802",
+ "longitude": "0.141276"
+ },
+ "company": "Pathways",
+ "email": "kasey.delgado@pathways.org",
+ "address": "585 Gem Street, Rosine, Idaho, 9605",
+ "country": "england"
+ },
+ {
+ "id": "5a004879a8c50420eb989be1",
+ "value": "2542.41",
+ "name": {
+ "first": "Ruiz",
+ "last": "Preston"
+ },
+ "location": {
+ "latitude": "51.219068",
+ "longitude": "-3.373727"
+ },
+ "company": "Tingles",
+ "email": "ruiz.preston@tingles.me",
+ "address": "738 Tehama Street, Gracey, Georgia, 5239",
+ "country": "england"
+ },
+ {
+ "id": "5a004879c087a6ff247877f7",
+ "value": "2406.91",
+ "name": {
+ "first": "Lula",
+ "last": "Beck"
+ },
+ "location": {
+ "latitude": "51.526048",
+ "longitude": "-5.866339"
+ },
+ "company": "Deviltoe",
+ "email": "lula.beck@deviltoe.us",
+ "address": "135 Ovington Court, Bentley, Missouri, 9769",
+ "country": "wales"
+ },
+ {
+ "id": "5a0048794e3eaac68c04cfa8",
+ "value": "2643.61",
+ "name": {
+ "first": "Colleen",
+ "last": "Guy"
+ },
+ "location": {
+ "latitude": "51.890363",
+ "longitude": "-3.650261"
+ },
+ "company": "Zolavo",
+ "email": "colleen.guy@zolavo.biz",
+ "address": "172 Glendale Court, Garnet, Michigan, 6619",
+ "country": "wales"
+ },
+ {
+ "id": "5a004879148c5971afad4854",
+ "value": "1166.24",
+ "name": {
+ "first": "Melissa",
+ "last": "Young"
+ },
+ "location": {
+ "latitude": "52.512842",
+ "longitude": "-5.51245"
+ },
+ "company": "Bolax",
+ "email": "melissa.young@bolax.net",
+ "address": "152 Louise Terrace, Crumpler, South Carolina, 8422",
+ "country": "wales"
+ },
+ {
+ "id": "5a004879219e69b85f5b28f0",
+ "value": "1453.00",
+ "name": {
+ "first": "Melinda",
+ "last": "Hamilton"
+ },
+ "location": {
+ "latitude": "52.416351",
+ "longitude": "-1.038253"
+ },
+ "company": "Immunics",
+ "email": "melinda.hamilton@immunics.co.uk",
+ "address": "976 Milford Street, Santel, Arkansas, 1850",
+ "country": "england"
+ },
+ {
+ "id": "5a004879be11c18bc0483656",
+ "value": "1054.34",
+ "name": {
+ "first": "Camille",
+ "last": "Boyer"
+ },
+ "location": {
+ "latitude": "53.049047",
+ "longitude": "-0.932264"
+ },
+ "company": "Manglo",
+ "email": "camille.boyer@manglo.name",
+ "address": "986 Beaumont Street, Urbana, Wisconsin, 2212",
+ "country": "england"
+ },
+ {
+ "id": "5a004879adae7b4569521b6c",
+ "value": "2438.85",
+ "name": {
+ "first": "Sylvia",
+ "last": "Stein"
+ },
+ "location": {
+ "latitude": "52.473359",
+ "longitude": "-5.427067"
+ },
+ "company": "Genmex",
+ "email": "sylvia.stein@genmex.info",
+ "address": "270 Menahan Street, Bartonsville, Alaska, 7030",
+ "country": "wales"
+ },
+ {
+ "id": "5a004879a366ff92a7b501cf",
+ "value": "2725.07",
+ "name": {
+ "first": "Lisa",
+ "last": "Delacruz"
+ },
+ "location": {
+ "latitude": "53.504384",
+ "longitude": "-3.208552"
+ },
+ "company": "Bleendot",
+ "email": "lisa.delacruz@bleendot.tv",
+ "address": "322 Monroe Place, Bowmansville, Tennessee, 2197",
+ "country": "wales"
+ },
+ {
+ "id": "5a0048792f7e0293b680ca87",
+ "value": "2814.61",
+ "name": {
+ "first": "Russo",
+ "last": "Clark"
+ },
+ "location": {
+ "latitude": "51.466041",
+ "longitude": "-0.775981"
+ },
+ "company": "Zillactic",
+ "email": "russo.clark@zillactic.com",
+ "address": "888 Fairview Place, Bloomington, District Of Columbia, 7953",
+ "country": "england"
+ },
+ {
+ "id": "5a004879cbb6c16d55769a18",
+ "value": "1093.62",
+ "name": {
+ "first": "Elba",
+ "last": "Stephenson"
+ },
+ "location": {
+ "latitude": "51.356307",
+ "longitude": "-0.504089"
+ },
+ "company": "Applideck",
+ "email": "elba.stephenson@applideck.io",
+ "address": "496 Oriental Court, Cassel, Florida, 1514",
+ "country": "england"
+ },
+ {
+ "id": "5a0048793239bb261a33abf6",
+ "value": "3247.20",
+ "name": {
+ "first": "Hendrix",
+ "last": "Carney"
+ },
+ "location": {
+ "latitude": "52.008002",
+ "longitude": "-5.37505"
+ },
+ "company": "Earwax",
+ "email": "hendrix.carney@earwax.ca",
+ "address": "541 Holt Court, Reinerton, Illinois, 4786",
+ "country": "wales"
+ },
+ {
+ "id": "5a004879142e3b8ba7220b91",
+ "value": "3360.15",
+ "name": {
+ "first": "Sweet",
+ "last": "Kent"
+ },
+ "location": {
+ "latitude": "53.086217",
+ "longitude": "-4.358327"
+ },
+ "company": "Flumbo",
+ "email": "sweet.kent@flumbo.org",
+ "address": "488 Meeker Avenue, Choctaw, South Dakota, 2463",
+ "country": "wales"
+ },
+ {
+ "id": "5a0048793a5f4112b1089e10",
+ "value": "3097.53",
+ "name": {
+ "first": "Marsh",
+ "last": "Thompson"
+ },
+ "location": {
+ "latitude": "51.184841",
+ "longitude": "-0.659372"
+ },
+ "company": "Insuresys",
+ "email": "marsh.thompson@insuresys.me",
+ "address": "941 Schenck Place, Norris, American Samoa, 5907",
+ "country": "england"
+ },
+ {
+ "id": "5a00487938d2ece32245d968",
+ "value": "1265.94",
+ "name": {
+ "first": "Hodges",
+ "last": "Rodgers"
+ },
+ "location": {
+ "latitude": "51.239019",
+ "longitude": "-5.922074"
+ },
+ "company": "Gronk",
+ "email": "hodges.rodgers@gronk.us",
+ "address": "431 Thatford Avenue, Albany, Ohio, 3081",
+ "country": "england"
+ },
+ {
+ "id": "5a004879b324e6e426cf99dd",
+ "value": "3500.98",
+ "name": {
+ "first": "Gretchen",
+ "last": "Hartman"
+ },
+ "location": {
+ "latitude": "50.299575",
+ "longitude": "-4.120472"
+ },
+ "company": "Roughies",
+ "email": "gretchen.hartman@roughies.biz",
+ "address": "798 Hazel Court, Cornfields, Maryland, 2812",
+ "country": "england"
+ },
+ {
+ "id": "5a004879fa59d6bff23af485",
+ "value": "1417.33",
+ "name": {
+ "first": "Hurley",
+ "last": "Guthrie"
+ },
+ "location": {
+ "latitude": "50.837193",
+ "longitude": "-1.907111"
+ },
+ "company": "Combogen",
+ "email": "hurley.guthrie@combogen.net",
+ "address": "119 Blake Avenue, Cowiche, Marshall Islands, 5831",
+ "country": "england"
+ },
+ {
+ "id": "5a004879bb9013411b2c5847",
+ "value": "1301.30",
+ "name": {
+ "first": "Jamie",
+ "last": "Pate"
+ },
+ "location": {
+ "latitude": "52.684533",
+ "longitude": "-3.715212"
+ },
+ "company": "Ecrater",
+ "email": "jamie.pate@ecrater.co.uk",
+ "address": "348 Chase Court, Itmann, Nevada, 8706",
+ "country": "wales"
+ },
+ {
+ "id": "5a00487af2409ac39e845a27",
+ "value": "3056.26",
+ "name": {
+ "first": "Robertson",
+ "last": "Mendez"
+ },
+ "location": {
+ "latitude": "53.443518",
+ "longitude": "-5.817906"
+ },
+ "company": "Cablam",
+ "email": "robertson.mendez@cablam.name",
+ "address": "274 Jewel Street, Tuttle, Oklahoma, 6712",
+ "country": "wales"
+ },
+ {
+ "id": "5a00487a5e370a18fc37854d",
+ "value": "3416.85",
+ "name": {
+ "first": "Alba",
+ "last": "Gilbert"
+ },
+ "location": {
+ "latitude": "52.685208",
+ "longitude": "-3.879983"
+ },
+ "company": "Renovize",
+ "email": "alba.gilbert@renovize.info",
+ "address": "763 Herkimer Court, Weeksville, Virgin Islands, 8347",
+ "country": "wales"
+ },
+ {
+ "id": "5a00487ae2db97095dc43ab2",
+ "value": "3637.63",
+ "name": {
+ "first": "Michael",
+ "last": "Floyd"
+ },
+ "location": {
+ "latitude": "51.132729",
+ "longitude": "-6.0959"
+ },
+ "company": "Translink",
+ "email": "michael.floyd@translink.tv",
+ "address": "253 Laurel Avenue, Hayes, Colorado, 7309",
+ "country": "england"
+ },
+ {
+ "id": "5a00487a5ca80432f96a5882",
+ "value": "3792.12",
+ "name": {
+ "first": "Robles",
+ "last": "Klein"
+ },
+ "location": {
+ "latitude": "53.448739",
+ "longitude": "-4.165096"
+ },
+ "company": "Papricut",
+ "email": "robles.klein@papricut.com",
+ "address": "870 Linden Boulevard, Ruckersville, New York, 8121",
+ "country": "wales"
+ },
+ {
+ "id": "5a00487a1b3f2b8ba3c33a69",
+ "value": "3434.28",
+ "name": {
+ "first": "Lottie",
+ "last": "Park"
+ },
+ "location": {
+ "latitude": "51.485992",
+ "longitude": "-4.497275"
+ },
+ "company": "Zilodyne",
+ "email": "lottie.park@zilodyne.io",
+ "address": "700 Livingston Street, Whitestone, Delaware, 5085",
+ "country": "wales"
+ },
+ {
+ "id": "5a00487a89269d9719c6ae47",
+ "value": "2839.15",
+ "name": {
+ "first": "Rosalinda",
+ "last": "Stone"
+ },
+ "location": {
+ "latitude": "51.851386",
+ "longitude": "-1.866979"
+ },
+ "company": "Polarium",
+ "email": "rosalinda.stone@polarium.ca",
+ "address": "470 Kansas Place, Sedley, Rhode Island, 6780",
+ "country": "england"
+ },
+ {
+ "id": "5a00487ab58f61b1ca097340",
+ "value": "2918.95",
+ "name": {
+ "first": "Shelly",
+ "last": "Rowe"
+ },
+ "location": {
+ "latitude": "51.929718",
+ "longitude": "-0.133211"
+ },
+ "company": "Webiotic",
+ "email": "shelly.rowe@webiotic.org",
+ "address": "699 Hope Street, Ferney, Vermont, 5553",
+ "country": "england"
+ },
+ {
+ "id": "5a00487a9d8544d5e0a78f4b",
+ "value": "3677.75",
+ "name": {
+ "first": "Lorrie",
+ "last": "Tate"
+ },
+ "location": {
+ "latitude": "50.652907",
+ "longitude": "-0.336797"
+ },
+ "company": "Sulfax",
+ "email": "lorrie.tate@sulfax.me",
+ "address": "911 Kings Place, Nelson, New Mexico, 2067",
+ "country": "england"
+ },
+ {
+ "id": "5a00487a8786c45f4434bbb6",
+ "value": "1017.75",
+ "name": {
+ "first": "Ashley",
+ "last": "Duffy"
+ },
+ "location": {
+ "latitude": "53.837215",
+ "longitude": "-0.386368"
+ },
+ "company": "Mediot",
+ "email": "ashley.duffy@mediot.us",
+ "address": "786 Rapelye Street, Drytown, Federated States Of Micronesia, 8236",
+ "country": "england"
+ },
+ {
+ "id": "5a00487a6671b037eaae5826",
+ "value": "2643.05",
+ "name": {
+ "first": "Chaney",
+ "last": "Alexander"
+ },
+ "location": {
+ "latitude": "51.426739",
+ "longitude": "-2.621982"
+ },
+ "company": "Opportech",
+ "email": "chaney.alexander@opportech.biz",
+ "address": "182 Underhill Avenue, Veguita, Washington, 6796",
+ "country": "england"
+ },
+ {
+ "id": "5a00487ae93d4330d6457d36",
+ "value": "2055.83",
+ "name": {
+ "first": "Brittany",
+ "last": "Stewart"
+ },
+ "location": {
+ "latitude": "49.970984",
+ "longitude": "-3.22834"
+ },
+ "company": "Tsunamia",
+ "email": "brittany.stewart@tsunamia.net",
+ "address": "707 Plaza Street, Gwynn, Palau, 8568",
+ "country": "england"
+ },
+ {
+ "id": "5a00487a84f66de105493ca2",
+ "value": "2284.09",
+ "name": {
+ "first": "Leila",
+ "last": "Mullen"
+ },
+ "location": {
+ "latitude": "52.357331",
+ "longitude": "-6.042832"
+ },
+ "company": "Isologia",
+ "email": "leila.mullen@isologia.co.uk",
+ "address": "441 Moore Place, Ahwahnee, Hawaii, 1354",
+ "country": "wales"
+ },
+ {
+ "id": "5a00487a236213b9c172bb67",
+ "value": "3590.75",
+ "name": {
+ "first": "Justine",
+ "last": "Sherman"
+ },
+ "location": {
+ "latitude": "53.137909",
+ "longitude": "-0.101569"
+ },
+ "company": "Tellifly",
+ "email": "justine.sherman@tellifly.name",
+ "address": "181 Aurelia Court, Greenbackville, Utah, 472",
+ "country": "england"
+ },
+ {
+ "id": "5a00487a9679119a4f68e5b1",
+ "value": "1636.23",
+ "name": {
+ "first": "Bettye",
+ "last": "Martinez"
+ },
+ "location": {
+ "latitude": "51.601671",
+ "longitude": "-1.664049"
+ },
+ "company": "Remold",
+ "email": "bettye.martinez@remold.info",
+ "address": "456 Miller Place, Hannasville, New Jersey, 5478",
+ "country": "england"
+ },
+ {
+ "id": "5a00487a8a48e3628a855d68",
+ "value": "3174.90",
+ "name": {
+ "first": "Faith",
+ "last": "Serrano"
+ },
+ "location": {
+ "latitude": "53.138939",
+ "longitude": "-1.464078"
+ },
+ "company": "Xplor",
+ "email": "faith.serrano@xplor.tv",
+ "address": "227 Rockaway Avenue, Cleary, Kentucky, 5814",
+ "country": "england"
+ },
+ {
+ "id": "5a00487af2b33d13456b5d06",
+ "value": "1546.70",
+ "name": {
+ "first": "Thompson",
+ "last": "Smith"
+ },
+ "location": {
+ "latitude": "51.076526",
+ "longitude": "-3.769905"
+ },
+ "company": "Gadtron",
+ "email": "thompson.smith@gadtron.com",
+ "address": "369 Anthony Street, Jugtown, Kansas, 6054",
+ "country": "england"
+ },
+ {
+ "id": "5a00487a3cb83a57b58c0fdc",
+ "value": "1992.25",
+ "name": {
+ "first": "Amanda",
+ "last": "Hale"
+ },
+ "location": {
+ "latitude": "53.378042",
+ "longitude": "-4.60403"
+ },
+ "company": "Magnemo",
+ "email": "amanda.hale@magnemo.io",
+ "address": "644 Fair Street, Clarksburg, Indiana, 3569",
+ "country": "wales"
+ },
+ {
+ "id": "5a00487a3d0e454791320148",
+ "value": "1561.29",
+ "name": {
+ "first": "Zamora",
+ "last": "Peck"
+ },
+ "location": {
+ "latitude": "53.24554",
+ "longitude": "-4.761538"
+ },
+ "company": "Exozent",
+ "email": "zamora.peck@exozent.ca",
+ "address": "970 Pioneer Street, Savage, Minnesota, 4055",
+ "country": "wales"
+ },
+ {
+ "id": "5a00487af295c90312751307",
+ "value": "2200.44",
+ "name": {
+ "first": "Kimberly",
+ "last": "Navarro"
+ },
+ "location": {
+ "latitude": "52.623847",
+ "longitude": "-0.046332"
+ },
+ "company": "Filodyne",
+ "email": "kimberly.navarro@filodyne.org",
+ "address": "379 Junius Street, Convent, North Carolina, 1497",
+ "country": "england"
+ },
+ {
+ "id": "5a00487a7aaf72ecd5f1ecc9",
+ "value": "3119.17",
+ "name": {
+ "first": "Mcneil",
+ "last": "Turner"
+ },
+ "location": {
+ "latitude": "50.793173",
+ "longitude": "-2.735517"
+ },
+ "company": "Amtap",
+ "email": "mcneil.turner@amtap.me",
+ "address": "650 Gerry Street, Chaparrito, Pennsylvania, 5132",
+ "country": "england"
+ },
+ {
+ "id": "5a00487a14378112b51136a3",
+ "value": "3393.93",
+ "name": {
+ "first": "Jennie",
+ "last": "Whitehead"
+ },
+ "location": {
+ "latitude": "53.017306",
+ "longitude": "-1.708159"
+ },
+ "company": "Norsul",
+ "email": "jennie.whitehead@norsul.us",
+ "address": "122 Herkimer Street, Marion, Louisiana, 3110",
+ "country": "england"
+ },
+ {
+ "id": "5a00487a2bbabb8c7a5431c1",
+ "value": "2980.19",
+ "name": {
+ "first": "Brandy",
+ "last": "Ramos"
+ },
+ "location": {
+ "latitude": "50.599756",
+ "longitude": "-3.751501"
+ },
+ "company": "Exoswitch",
+ "email": "brandy.ramos@exoswitch.biz",
+ "address": "716 Dank Court, Lorraine, Connecticut, 4011",
+ "country": "england"
+ }
+]
\ No newline at end of file
diff --git a/bin/runner.rb b/bin/runner.rb
new file mode 100644
index 0000000..2f50344
--- /dev/null
+++ b/bin/runner.rb
@@ -0,0 +1,35 @@
+require_relative '../lib/task.rb'
+
+def process_arguments(args)
+ arguments = {}
+ args.each_with_index do |val, index|
+ case val
+ when "-radius"
+ arguments.merge!(:filter_by_radius => {:radius => args[index + 1]})
+ when "-sort_by"
+ arguments.merge!(:sort_by => {:value => args[index + 1]})
+ when "-filter_by"
+ arguments.merge!(:filter_by_column => {:column => args[index + 1] ,:value => args[index + 2]})
+ end
+ end
+ return arguments
+end
+
+task = Task.new
+
+if ARGV.any?
+ case ARGV[0]
+ when "-l"
+ task.one
+ when "-a"
+ task.two
+ when "-c"
+ #ARGV.delete_at(0) unless ARGV.empty?
+ arguments = process_arguments(ARGV)
+ task.three(arguments)
+ else
+ task.manual
+ end
+else
+ task.manual
+end
\ No newline at end of file
diff --git a/lib/interface.rb b/lib/interface.rb
new file mode 100644
index 0000000..18583d8
--- /dev/null
+++ b/lib/interface.rb
@@ -0,0 +1,37 @@
+require 'terminal-table'
+
+class Interface
+ attr_reader :title
+
+ def print_table(collection: [], headings: [])
+ collection = verify_array(collection)
+ headings = verify_array(headings)
+
+ rows = []
+ collection.each do |element|
+ columns = get_hash_values(element, headings)
+ rows << columns
+ end
+ puts Terminal::Table.new :headings => headings, :rows => rows
+ end
+
+ def print_value(value: 0, heading: [])
+ heading = verify_array(heading)
+
+ puts Terminal::Table.new { |row| row << [heading, value]}
+ end
+
+ private
+ def verify_array(array)
+ return array if array.is_a? Array
+ return []
+ end
+
+ def get_hash_values(h,headings)
+ h.each_with_object([]) do |(k,v),keys|
+ keys << v if headings.include? k.to_sym
+ keys.concat(get_hash_values(v, headings)) if v.is_a? Hash
+ end
+ end
+end
+
diff --git a/lib/people.rb b/lib/people.rb
new file mode 100644
index 0000000..732c7cb
--- /dev/null
+++ b/lib/people.rb
@@ -0,0 +1,71 @@
+require 'haversine'
+
+class People
+ InvalidRadius = Class.new(StandardError)
+ InvalidColumn = Class.new(StandardError)
+ InvalidCollection = Class.new(StandardError)
+
+ attr_reader :coordinates
+
+ def initialize(people: [], coordinates: {:latitude => 51.450167, :longitude => -2.594678})
+ validate_people(people)
+
+ @people = people
+ @coordinates = coordinates.values
+ end
+
+ def filter_by_radius(radius:)
+ validate_radius(radius)
+
+ @people = @people.select do |person|
+ (Haversine.distance(coordinates, [person["location"]["latitude"].to_f,
+ person["location"]["longitude"].to_f]).to_km <= radius.to_i)
+ end
+ self
+ end
+
+ def filter_by_column(column:, value:)
+ validate_column(column)
+
+ @people = @people.select do |person|
+ (person[column].downcase == value.downcase)
+ end
+ self
+ end
+
+ def sort_by(column:)
+ validate_column(column)
+
+ begin
+ @people = @people.sort_by { |person| person[column] }
+ @people.reverse
+ rescue
+ puts "====> sort_by failed"
+ end
+ end
+
+ def avg(column:)
+ validate_column(column)
+
+ @people = @people.inject(0) do |sum, hash|
+ sum + hash[column].to_f
+ end.fdiv(@people.size)
+ end
+
+ def to_a
+ @people.to_a
+ end
+
+ private
+ def validate_radius(radius)
+ raise(InvalidRadius, radius) unless radius.instance_of?(Integer) && radius.to_i > 0
+ end
+
+ def validate_column(column)
+ raise(InvalidColumn, column) unless @people.first.key?(column) if @people.size > 0
+ end
+
+ def validate_people(people)
+ raise(InvalidCollection) unless !people.nil? && people.size > 0 && people[0]["location"].key?("latitude") && people[0]["location"].key?("longitude")
+ end
+end
\ No newline at end of file
diff --git a/lib/reader.rb b/lib/reader.rb
new file mode 100644
index 0000000..78b62a0
--- /dev/null
+++ b/lib/reader.rb
@@ -0,0 +1,10 @@
+require 'json'
+
+class Reader
+ InvalidFile = Class.new(StandardError)
+
+ def self.import(path = "./assets/people.json")
+ raise(InvalidFile, path) unless File.exist?(path)
+ JSON.parse(File.read(path))
+ end
+end
\ No newline at end of file
diff --git a/lib/task.rb b/lib/task.rb
new file mode 100644
index 0000000..a105c02
--- /dev/null
+++ b/lib/task.rb
@@ -0,0 +1,52 @@
+require_relative 'reader.rb'
+require_relative 'people.rb'
+require_relative 'interface.rb'
+
+class Task
+ def one
+ list = people
+ .filter_by_column(:column => "country", :value => "england")
+ .filter_by_radius(:radius => 100)
+ .sort_by(:column => "value")
+ interface.print_table(:collection => list, :headings => [:id, :value, :first, :last, :email])
+ end
+
+ def two
+ avg = people
+ .filter_by_column(:column => "country", :value => "england")
+ .filter_by_radius(:radius => 200)
+ .avg(:column => "value")
+ interface.print_value(:value => avg, :heading => "Average")
+ end
+
+ def three(args)
+ list = people
+
+ puts args.dig(:filter_by_radius, :radius)
+
+ if args.has_key?(:filter_by_column)
+ list = list.filter_by_column(:column => args.dig(:filter_by_column, :column), :value => args.dig(:filter_by_column, :value))
+ end
+ if args.has_key?(:filter_by_radius)
+ list = list.filter_by_radius(:radius => args.dig(:filter_by_radius, :radius).to_i)
+ end
+ if args.has_key?(:sort_by)
+ list = list.sort_by(:column => args.dig(:sort_by, :value))
+ end
+
+ interface.print_table(:collection => list.to_a, :headings => [:id, :value, :first, :last, :latitude, :longitude, :email, :country])
+ end
+
+ def manual
+ puts "To run the first task:\n $ ruby bin/runner.rb -l\nTo run the second task:\n $ ruby bin/runner.rb -a"
+ end
+
+ private
+ def people
+ @people ||= People.new(:people => Reader.import)
+ end
+
+ def interface
+ @interface ||= Interface.new
+ end
+end
\ No newline at end of file
diff --git a/spec/fixtures/json/invalid_people.json b/spec/fixtures/json/invalid_people.json
new file mode 100644
index 0000000..5ddfe53
--- /dev/null
+++ b/spec/fixtures/json/invalid_people.json
@@ -0,0 +1 @@
+xc
\ No newline at end of file
diff --git a/spec/fixtures/json/valid_people.json b/spec/fixtures/json/valid_people.json
new file mode 100644
index 0000000..4ffc010
--- /dev/null
+++ b/spec/fixtures/json/valid_people.json
@@ -0,0 +1,50 @@
+[
+ {
+ "id": "5a00487898a445517663540a",
+ "value": "2287.04",
+ "name": {
+ "first": "Karyn",
+ "last": "Hess"
+ },
+ "location": {
+ "latitude": "51.429388",
+ "longitude": "-2.024979"
+ },
+ "company": "Enaut",
+ "email": "karyn.hess@enaut.org",
+ "address": "423 Auburn Place, Sanders, Texas, 5269",
+ "country": "england"
+ },
+ {
+ "id": "5a00487905c99b6667e5e1ea",
+ "value": "3749.61",
+ "name": {
+ "first": "Riddle",
+ "last": "Nixon"
+ },
+ "location": {
+ "latitude": "51.077801",
+ "longitude": "-3.082931"
+ },
+ "company": "Isodrive",
+ "email": "riddle.nixon@isodrive.me",
+ "address": "177 Wyckoff Avenue, Marienthal, Guam, 1832",
+ "country": "england"
+ },
+ {
+ "id": "5a004879df8be73cb1d3c036",
+ "value": "3607.35",
+ "name": {
+ "first": "Stefanie",
+ "last": "Wilson"
+ },
+ "location": {
+ "latitude": "51.837922",
+ "longitude": "-4.457236"
+ },
+ "company": "Candecor",
+ "email": "stefanie.wilson@candecor.us",
+ "address": "758 Rockaway Parkway, Bayview, Idaho, 3892",
+ "country": "wales"
+ }
+]
diff --git a/spec/interface_spec.rb b/spec/interface_spec.rb
new file mode 100644
index 0000000..9c87461
--- /dev/null
+++ b/spec/interface_spec.rb
@@ -0,0 +1,5 @@
+require_relative '../lib/interface.rb'
+
+describe Interface do
+ # ToDo
+end
diff --git a/spec/people_spec.rb b/spec/people_spec.rb
new file mode 100644
index 0000000..a072b95
--- /dev/null
+++ b/spec/people_spec.rb
@@ -0,0 +1,71 @@
+require_relative '../lib/people.rb'
+require 'json'
+
+describe People do
+ json = JSON.parse(File.read(File.join('spec', 'fixtures', 'json', 'valid_people.json')))
+ subject(:people) {People.new(:people => json)}
+
+ describe '#filter_by_radius' do
+ context 'with valid radius' do
+ it 'returns a list of people within the specified radius' do
+ expect(people.filter_by_radius(:radius => 100).to_a.size).to eq(2)
+ end
+ end
+
+ context 'with invalid radius' do
+ it 'raises an Invalid Radius exception on string' do
+ expect{ people.filter_by_radius(:radius => "A") }.to raise_exception(People::InvalidRadius)
+ end
+
+ it 'raises an Invalid Radius exception on negative integer' do
+ expect{ people.filter_by_radius(:radius => -50) }.to raise_exception(People::InvalidRadius)
+ end
+
+ it 'raises an Invalid Radius exception on positive float' do
+ expect{ people.filter_by_radius(:radius => 50.5) }.to raise_exception(People::InvalidRadius)
+ end
+ end
+ end
+
+ describe '#filter_by_column' do
+ context 'with valid column' do
+ it 'returns a list of people filtered value' do
+ expect(people.filter_by_column(:column => "country", :value => "England").to_a.size).to eq(2)
+ end
+ end
+
+ context 'with invalid column' do
+ it 'raises a Invalid Colum exception non existing column' do
+ expect{ people.filter_by_column(:column => "xyz", :value => "nan") }.to raise_exception(People::InvalidColumn)
+ end
+ end
+ end
+
+ describe '#sorty_by' do
+ context 'with valid column' do
+ it 'returns a desc sorted list of people' do
+ expect(people.sort_by(:column => "value")[0]["value"]).to eq("3749.61")
+ end
+ end
+
+ context 'with invalid column' do
+ it 'raises a Invalid Colum exception non existing column' do
+ expect{ people.sort_by(:column => "xyz") }.to raise_exception(People::InvalidColumn)
+ end
+ end
+ end
+
+ describe '#avg' do
+ context 'with valid column' do
+ it 'returns a desc sorted list of people' do
+ expect(people.avg(:column => "value").round(2)).to eq(3214.67)
+ end
+ end
+
+ context 'with invalid column' do
+ it 'raises a Invalid Colum exception non existing column' do
+ expect{ people.avg(:column => "xyz") }.to raise_exception(People::InvalidColumn)
+ end
+ end
+ end
+end
\ No newline at end of file
diff --git a/spec/reader_spec.rb b/spec/reader_spec.rb
new file mode 100644
index 0000000..7b487a2
--- /dev/null
+++ b/spec/reader_spec.rb
@@ -0,0 +1,33 @@
+require_relative '../lib/reader.rb'
+
+describe Reader do
+ describe "#import" do
+ let(:json_file) { File.join('spec', 'fixtures', 'json', file_name) }
+
+ context 'when resource is found' do
+ context 'when content is valid json format' do
+ let(:file_name) { 'valid_people.json' }
+
+ it 'parses content of file' do
+ expect(Reader.import(json_file).size).to eq(3)
+ end
+ end
+
+ context 'when content is invalid json format' do
+ let(:file_name) { 'invalid_people.json' }
+
+ it 'raises an JSON::ParserError exception' do
+ expect { Reader.import(json_file) }.to raise_exception(JSON::ParserError)
+ end
+ end
+ end
+
+ context 'when resource is not found' do
+ let(:file_name) { 'does_not_exist.json' }
+
+ it 'raises an ArgumentError exception' do
+ expect { Reader.import(json_file) }.to raise_exception(Reader::InvalidFile)
+ end
+ end
+ end
+end
\ No newline at end of file
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
new file mode 100644
index 0000000..251aa51
--- /dev/null
+++ b/spec/spec_helper.rb
@@ -0,0 +1,100 @@
+# This file was generated by the `rspec --init` command. Conventionally, all
+# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
+# The generated `.rspec` file contains `--require spec_helper` which will cause
+# this file to always be loaded, without a need to explicitly require it in any
+# files.
+#
+# Given that it is always loaded, you are encouraged to keep this file as
+# light-weight as possible. Requiring heavyweight dependencies from this file
+# will add to the boot time of your test suite on EVERY test run, even for an
+# individual file that may not need all of that loaded. Instead, consider making
+# a separate helper file that requires the additional dependencies and performs
+# the additional setup, and require it from the spec files that actually need
+# it.
+#
+# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
+RSpec.configure do |config|
+ # rspec-expectations config goes here. You can use an alternate
+ # assertion/expectation library such as wrong or the stdlib/minitest
+ # assertions if you prefer.
+ config.expect_with :rspec do |expectations|
+ # This option will default to `true` in RSpec 4. It makes the `description`
+ # and `failure_message` of custom matchers include text for helper methods
+ # defined using `chain`, e.g.:
+ # be_bigger_than(2).and_smaller_than(4).description
+ # # => "be bigger than 2 and smaller than 4"
+ # ...rather than:
+ # # => "be bigger than 2"
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
+ end
+
+ # rspec-mocks config goes here. You can use an alternate test double
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
+ config.mock_with :rspec do |mocks|
+ # Prevents you from mocking or stubbing a method that does not exist on
+ # a real object. This is generally recommended, and will default to
+ # `true` in RSpec 4.
+ mocks.verify_partial_doubles = true
+ end
+
+ # This option will default to `:apply_to_host_groups` in RSpec 4 (and will
+ # have no way to turn it off -- the option exists only for backwards
+ # compatibility in RSpec 3). It causes shared context metadata to be
+ # inherited by the metadata hash of host groups and examples, rather than
+ # triggering implicit auto-inclusion in groups with matching metadata.
+ config.shared_context_metadata_behavior = :apply_to_host_groups
+
+# The settings below are suggested to provide a good initial experience
+# with RSpec, but feel free to customize to your heart's content.
+=begin
+ # This allows you to limit a spec run to individual examples or groups
+ # you care about by tagging them with `:focus` metadata. When nothing
+ # is tagged with `:focus`, all examples get run. RSpec also provides
+ # aliases for `it`, `describe`, and `context` that include `:focus`
+ # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
+ config.filter_run_when_matching :focus
+
+ # Allows RSpec to persist some state between runs in order to support
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
+ # you configure your source control system to ignore this file.
+ config.example_status_persistence_file_path = "spec/examples.txt"
+
+ # Limits the available syntax to the non-monkey patched syntax that is
+ # recommended. For more details, see:
+ # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
+ # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
+ # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
+ config.disable_monkey_patching!
+
+ # This setting enables warnings. It's recommended, but in some cases may
+ # be too noisy due to issues in dependencies.
+ config.warnings = true
+
+ # Many RSpec users commonly either run the entire suite or an individual
+ # file, and it's useful to allow more verbose output when running an
+ # individual spec file.
+ if config.files_to_run.one?
+ # Use the documentation formatter for detailed output,
+ # unless a formatter has already been configured
+ # (e.g. via a command-line flag).
+ config.default_formatter = "doc"
+ end
+
+ # Print the 10 slowest examples and example groups at the
+ # end of the spec run, to help surface which specs are running
+ # particularly slow.
+ config.profile_examples = 10
+
+ # Run specs in random order to surface order dependencies. If you find an
+ # order dependency and want to debug it, you can fix the order by providing
+ # the seed, which is printed after each run.
+ # --seed 1234
+ config.order = :random
+
+ # Seed global randomization in this process using the `--seed` CLI option.
+ # Setting this allows you to use `--seed` to deterministically reproduce
+ # test failures related to randomization by passing the same `--seed` value
+ # as the one that triggered the failure.
+ Kernel.srand config.seed
+=end
+end