-
Notifications
You must be signed in to change notification settings - Fork 0
/
mock.py
56 lines (55 loc) · 1.51 KB
/
mock.py
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# mock_data.py
import json
mock_alerts = [
{
"id": 1,
"device": "Raspberry Pi",
"time_stamp": "2024-10-31T14:20:00Z",
"latitude": "40.7128",
"longitude": "-74.0060",
"location": "New York City",
"detection_time": "2024-10-31T14:20:00Z",
"detection_id": 1234,
"alert_count": 1,
"animal_type": "Deer"
},
{
"id": 2,
"device": "Raspberry Pi",
"time_stamp": "2024-10-31T15:45:00Z",
"latitude": "34.0522",
"longitude": "-118.2437",
"location": "Los Angeles",
"detection_time": "2024-10-31T15:45:00Z",
"detection_id": 5678,
"alert_count": 2,
"animal_type": "Deer"
},
{
"id": 3,
"device": "Raspberry Pi",
"time_stamp": "2024-10-31T15:45:00Z",
"latitude": "34.0522",
"longitude": "-118.2437",
"location": "baltimore",
"detection_time": "2024-10-31T15:45:00Z",
"detection_id": 5678,
"alert_count": 2,
"animal_type": "Deer"
},
{
"id": 4,
"device": "Raspberry Pi",
"time_stamp": "2024-10-31T15:45:00Z",
"latitude": "34.0522",
"longitude": "-118.2437",
"location": "Wyoming",
"detection_time": "2024-10-31T15:45:00Z",
"detection_id": 5678,
"alert_count": 2,
"animal_type": "Deer"
}
]
# Write the mock data to a JSON file
with open('DeerSafeApp/src/mocks/mock_data.json', 'w') as f:
json.dump(mock_alerts, f)