-
Copy
bin/env.templateto.envand fill in your IndyKite credentials:cp bin/env.template .env
-
Install dependencies:
pip install -r requirements.txt
These scripts are for loading data into IndyKite. post_nodes_rels.py just loads the framework data. load_emissions.py is used to load
the emissions files.
Posts nodes or relationships from a JSON file to IndyKite.
Usage:
python bin/post_nodes_rels.py <json_file> [--type nodes|relationships]Examples:
# Auto-detect type (nodes or relationships)
python bin/post_nodes_rels.py data/nodes.json
python bin/post_nodes_rels.py data/relationships.json
# Explicitly specify type
python bin/post_nodes_rels.py data/nodes.json --type nodes
python bin/post_nodes_rels.py data/relationships.json --type relationshipsLoads emissions data from a CSV file into IndyKite.
Usage:
python bin/load_emissions.py [csv_file] [--batch-size N] [--max-threads N]Examples:
# Use CSV file path from .env file
python bin/load_emissions.py
# Specify CSV file directly
python bin/load_emissions.py data/some_emissions_file.csv
# Customize batch size and thread count
python bin/load_emissions.py data/sample.csv --batch-size 100 --max-threads 4Requirements:
- CSV file with emissions data
INDYKITE_HOSTandINDYKITE_TOKENset in.envfile
Requirements:
- JSON file with nodes or relationships
INDYKITE_HOSTandINDYKITE_TOKENset in.envfile- For relationships: nodes must exist in IndyKite first