Skip to content

Commit f08f25a

Browse files
committed
load data inventory presets from s3
1 parent 56584c8 commit f08f25a

File tree

3 files changed

+9
-285
lines changed

3 files changed

+9
-285
lines changed

code/pages/0_Data inventory.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import logging
22
import re
33
import json
4+
import requests
45

56
from matplotlib_venn import venn2, venn3, venn2_circles, venn3_circles
67
import matplotlib.pyplot as plt
@@ -52,11 +53,15 @@
5253
# Load QUERY_PRESET from json
5354
@st.cache_data()
5455
def load_presets():
55-
with open("data_inventory_QUERY_PRESET.json", "r") as f:
56-
QUERY_PRESET = json.load(f)
56+
# Get QUERY_PRESET and VENN_PRESET from public S3
57+
public_url_root = "https://aind-behavior-data.s3.us-west-2.amazonaws.com/foraging_nwb_bonsai_processed/"
58+
59+
response = requests.get(public_url_root + "data_inventory_QUERY_PRESET.json")
60+
QUERY_PRESET = response.json()
5761

58-
with open("data_inventory_VENN_PRESET.json", "r") as f:
59-
VENN_PRESET = json.load(f)
62+
response = requests.get(public_url_root + "data_inventory_VENN_PRESET.json")
63+
VENN_PRESET = response.json()
64+
6065
return QUERY_PRESET, VENN_PRESET
6166

6267
QUERY_PRESET, VENN_PRESET = load_presets()

data_inventory_QUERY_PRESET.json

Lines changed: 0 additions & 59 deletions
This file was deleted.

data_inventory_VENN_PRESET.json

Lines changed: 0 additions & 222 deletions
This file was deleted.

0 commit comments

Comments
 (0)