-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsynthetic_data.py
More file actions
40 lines (22 loc) · 935 Bytes
/
synthetic_data.py
File metadata and controls
40 lines (22 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Intel Sight++ Data Science Simulation
# Event-based schema
# {
# "timestamp": "2012-04-23T18:25:43.511Z",
# "deviceId": 1,
# "targetId": 1,
# "queueing": 7,
# "freeSeats": 2,
# "event": "personIn"
# }
#Import modules
import json
# Create data set in noSQL format.
# Function to create synthetic data on an automated basis (e.g. on hourly basis).
# Create data tables and in the end convert it into JSON format.
# Starter code to pass in data in JSON format from noSQL database. This data is converted into a numpy data table.
# Aggregations and calculations are done on the numpy data set. Finally, data is converted back into JSON format and
# inserted into the database.
with open('Intel-Sight-Footfall-DataScienceSimulation\event-schema.json') as f:
data = json.load(f)
for state in data['examples']:
print(state)