-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathtest.py
More file actions
33 lines (29 loc) · 724 Bytes
/
test.py
File metadata and controls
33 lines (29 loc) · 724 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
from datachile import ChileCube
client = ChileCube()
x = client.get_all([
[
"casen_household",
{
"drilldowns": [
["Geography", "Geography", "Region"],
["Walls Material", "Walls Material", "Walls Material"]
],
"measures": ["Expansion Factor Comuna"]
}
],
[
"crimes",
{
"drilldowns": [
["Geography", "Geography", "Region"],
["Crime", "Crime", "Crime Group"]
],
"measures": ["Number of records"]
}
]
])
print(x)
'''from json import dumps
file = open("data.json", "w")
file.write(dumps(query1["data"]))
file.close()'''