{"_id":"5b04101b96d0ae0003bac05f","project":"5496d393f52a630b00519cdd","version":{"_id":"59e70b9ee027ae002e7d2ed2","project":"5496d393f52a630b00519cdd","__v":2,"createdAt":"2017-10-18T08:06:54.462Z","releaseDate":"2017-10-18T08:06:54.462Z","categories":["59e70b9ee027ae002e7d2ed3","59e70b9ee027ae002e7d2ed4","59e70b9ee027ae002e7d2ed5","59e70b9ee027ae002e7d2ed6","59e70b9ee027ae002e7d2ed7","59e70b9ee027ae002e7d2ed8","59e70b9ee027ae002e7d2ed9","59e70b9ee027ae002e7d2eda","59e70b9ee027ae002e7d2edb","59e70b9ee027ae002e7d2edc","59e70b9ee027ae002e7d2edd","59e70b9ee027ae002e7d2ede","59e70b9ee027ae002e7d2edf","5b8661ccdd19310003a3fa0b"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"2.0.10","version":"2.0.10"},"category":{"_id":"59e70b9ee027ae002e7d2eda","version":"59e70b9ee027ae002e7d2ed2","project":"5496d393f52a630b00519cdd","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-12-21T18:49:06.424Z","from_sync":false,"order":8,"slug":"structures","title":"Structures"},"user":"5496d353f52a630b00519cdc","githubsync":"","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-05-22T12:42:03.167Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":14,"body":"[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"1. Signal Structure should always include the timestamp and one or more of the following signals fields:  location, active_wifi, wifi_scan or ibeacon_scan\\n\\n2. Timestamp should match the exact local-time in which the signals were collected from the device. If signals were collected at multiple times, they should be separated to different signal structures with different timestamps.\",\n  \"title\": \"Note\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"h-1\": \"Description\",\n    \"h-2\": \"Type\",\n    \"h-3\": \"Example\",\n    \"0-0\": \"timestamp\\n\\n*(mandatory)*\",\n    \"3-0\": \"wifi_scan\\n*(optional)*\",\n    \"1-0\": \"location\\n\\n*(optional)*\",\n    \"0-1\": \"The time and date of the signal’s data collection. If available, the user time zone should be included.\",\n    \"1-1\": \"Contains location data.\",\n    \"3-1\": \"Contains a JSON array of Wi-Fi networks details.\",\n    \"0-2\": \"ISO-8601\",\n    \"0-3\": \"2013-11-02T08:27:30.189+0200\",\n    \"1-2\": \"[Location Signals Structure](doc:location-signals)\",\n    \"3-2\": \"JSON array of [WiFi Signals Structure](doc:wifi-signals)\",\n    \"2-0\": \"active_wifi\\n*(optional)*\",\n    \"2-1\": \"Details of the connected Wi-Fi network.\",\n    \"2-2\": \"[WiFi Signals Structure](doc:wifi-signals)\",\n    \"4-0\": \"ibeacon_scan\\n*(optional)*\",\n    \"4-1\": \"Contains a JSON array of iBeacons details.\",\n    \"4-2\": \"JSON array of [iBeacon Signals Structure](doc:ibeacon-signals)\"\n  },\n  \"cols\": 4,\n  \"rows\": 5\n}\n[/block]\n\n##Example\nBelow an example of a JSON array with two signals:\n  * Location-Signals collected at 2016-01-31T07:17:44-06:00\n  * WiFi-Scan and Active-WiFi collected at 2016-01-31T07:15:44-06:00 \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[\\n  {\\n    \\\"timestamp\\\": \\\"2016-01-31T07:17:44-06:00\\\",\\n    \\\"location\\\": {\\n      \\\"lat\\\": 38.594593,\\n      \\\"long\\\": -90.276901,\\n      \\\"accuracy\\\": 50,\\n      \\\"speed\\\": 0.87,\\n      \\\"altitude\\\": 433\\n    }\\n  },\\n  {\\n    \\\"timestamp\\\": \\\"2016-01-31T07:15:44-06:00\\\",\\n    \\\"active_wifi\\\": {\\n      \\\"ssid\\\": \\\"Sonic.net-840\\\",\\n      \\\"bssid\\\": \\\"b8:3e:59:3a:45:f7\\\",\\n      \\\"strength\\\": -90\\n    },\\n    \\\"wifi_scan\\\": [\\n      {\\n        \\\"ssid\\\": \\\"Sonic.net-840\\\",\\n        \\\"bssid\\\": \\\"b8:3e:59:3a:45:f7\\\",\\n        \\\"strength\\\": -90,\\n        \\\"age\\\": 0\\n      },\\n      {\\n        \\\"ssid\\\": \\\"Mall-Free-WiFi\\\",\\n        \\\"bssid\\\": \\\"a5:12:59:3a:4a:a2\\\",\\n        \\\"strength\\\": -67,\\n        \\\"age\\\": 3\\n      }\\n    ]\\n  }\\n]\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"signals-structure","type":"basic","title":"Signals Structure"}
[block:callout] { "type": "warning", "body": "1. Signal Structure should always include the timestamp and one or more of the following signals fields: location, active_wifi, wifi_scan or ibeacon_scan\n\n2. Timestamp should match the exact local-time in which the signals were collected from the device. If signals were collected at multiple times, they should be separated to different signal structures with different timestamps.", "title": "Note" } [/block] [block:parameters] { "data": { "h-0": "Field", "h-1": "Description", "h-2": "Type", "h-3": "Example", "0-0": "timestamp\n\n*(mandatory)*", "3-0": "wifi_scan\n*(optional)*", "1-0": "location\n\n*(optional)*", "0-1": "The time and date of the signal’s data collection. If available, the user time zone should be included.", "1-1": "Contains location data.", "3-1": "Contains a JSON array of Wi-Fi networks details.", "0-2": "ISO-8601", "0-3": "2013-11-02T08:27:30.189+0200", "1-2": "[Location Signals Structure](doc:location-signals)", "3-2": "JSON array of [WiFi Signals Structure](doc:wifi-signals)", "2-0": "active_wifi\n*(optional)*", "2-1": "Details of the connected Wi-Fi network.", "2-2": "[WiFi Signals Structure](doc:wifi-signals)", "4-0": "ibeacon_scan\n*(optional)*", "4-1": "Contains a JSON array of iBeacons details.", "4-2": "JSON array of [iBeacon Signals Structure](doc:ibeacon-signals)" }, "cols": 4, "rows": 5 } [/block] ##Example Below an example of a JSON array with two signals: * Location-Signals collected at 2016-01-31T07:17:44-06:00 * WiFi-Scan and Active-WiFi collected at 2016-01-31T07:15:44-06:00 [block:code] { "codes": [ { "code": "[\n {\n \"timestamp\": \"2016-01-31T07:17:44-06:00\",\n \"location\": {\n \"lat\": 38.594593,\n \"long\": -90.276901,\n \"accuracy\": 50,\n \"speed\": 0.87,\n \"altitude\": 433\n }\n },\n {\n \"timestamp\": \"2016-01-31T07:15:44-06:00\",\n \"active_wifi\": {\n \"ssid\": \"Sonic.net-840\",\n \"bssid\": \"b8:3e:59:3a:45:f7\",\n \"strength\": -90\n },\n \"wifi_scan\": [\n {\n \"ssid\": \"Sonic.net-840\",\n \"bssid\": \"b8:3e:59:3a:45:f7\",\n \"strength\": -90,\n \"age\": 0\n },\n {\n \"ssid\": \"Mall-Free-WiFi\",\n \"bssid\": \"a5:12:59:3a:4a:a2\",\n \"strength\": -67,\n \"age\": 3\n }\n ]\n }\n]", "language": "json" } ] } [/block]