You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy over the newly generated `opflowout.json` file to the `viz/data` subdirectory. Next, run the python script `geninputfile.py` from `viz` folder to load the JSON file in the visualization script. Note, the python script only takes the name of the file `opflowout.json` as an argument but does not open the file so the full file path need not be provided. The visualization tool will expect the file (`opflowout.json`) to be present in `viz/data`forlder. The following code will create/overwrite a file named `viz/src/module_casedata.js`. The `module_casedata.js` file is an application source file to load the data file `opflowout.json`.
49
+
Next, go to the `viz` folder and run the following python script `geninputfile.py` from the `viz` folder to load the JSON file (`path/to/opflowout/opflowout.json`) in the visualization script. It will copy the `json` file to the `viz/data`subdirectory and create/overwrite a file named `viz/src/module_casedata.js`. The `module_casedata.js` file is an application source file to load the data file `opflowout.json`. Note, the visualization tool expects the file (`opflowout.json`) to be present in `viz/data` forlder, so it is copied by this script.
Now this creates the `viz/src/module_casedata.js` file. You are ready to launch the visualization now.
55
+
Now you are ready to launch the visualization now.
56
56
57
-
Note: If you have created the JSON file externally then simply copy it over in the `viz/data` subdirectory and run the `geninputfile.py` script using the above command.
57
+
Note: If you have already created or have the JSON file externally without running the `opflow` command as instructed above, simply run the `geninputfile.py` script using the above command.
58
58
59
59
## Launch visualization
60
60
To launch the visualization, run
@@ -63,7 +63,7 @@ To launch the visualization, run
63
63
yarn start
64
64
```
65
65
66
-
This will open a webpage with the visualization of the given network. If the network is large, it may take a while to load the visualization. The browser may show option to terminate or Wait and you should click on Wait button.
66
+
This will open a webpage (e.g. `http://localhost:5173/`) on the default browser with the visualization of the given network. If the network is large, it may take a while to load the visualization. The browser may show option to terminate or Wait and you should click on Wait button.
67
67
68
68
69
69
The figures show the visualization of the synthetic electric grid. The data for developing this visualization was created by merging the synthetic dataset for the [Eastern](https://electricgrids.engr.tamu.edu/electric-grid-test-cases/activsg70k/), [Western](https://electricgrids.engr.tamu.edu/electric-grid-test-cases/activsg10k/), and [Texas](https://electricgrids.engr.tamu.edu/electric-grid-test-cases/activsg2000/) interconnects from the [Electric Grid Test Case Repository](https://electricgrids.engr.tamu.edu/)
@@ -107,9 +107,10 @@ Behind the scenes, LLM translates natural language queries into SQL queries to r
107
107
* Go to the `viz/backend` subdirectory and use the `pip install -r requirements.txt` command to install all the Python dependencies if already not done in previous steps. (Note: These steps are tested with Python 3.13.)
108
108
109
109
110
-
To use the provided script, first copy the ExaGO output `.json` file to the `viz/data` subdirectory (if not already performed) and simply run the following script in the `viz/backend` subdirectory (replace the example filename with your json filename). This will create three CSV files: `generation.csv`, `bus.csv`, and `tranmission_line.csv`. We are assuming `opflowout.json` is the data json file present in `viz/data` folder.
110
+
To use the provided script, ensure that the ExaGO output `.json` file is in the `viz/data` subdirectory (if not already performed in the previous steps) and run the following script in the `viz/backend` subdirectory (replace the example filename with your json filename). This will create three CSV files: `generation.csv`, `bus.csv`, and `tranmission_line.csv`. We are assuming `opflowout.json` is the data json file present in `viz/data` folder.
@@ -125,9 +126,11 @@ Behind the scenes, LLM translates natural language queries into SQL queries to r
125
126
2. Download PostgreSQL database from this [link](https://www.postgresql.org/download/) and install it.
126
127
127
128
* For MAC using brew you can install postgresql 14 using: `brew install postgresql@14`
128
-
* Start the postgressql service: `rew services start postgresql@14`
129
+
* Start the postgressql service: `brew services start postgresql@14`
129
130
* Create a role: `psql -U "$USER" -d postgres`
131
+
* If your username (`$USER`) starts with numbers `psql` will show error. In this case replace `$USER` to some other username.
130
132
* Execute the create role query: `CREATE ROLE postgres WITH LOGIN SUPERUSER PASSWORD 'ExaGO.2025';` Here `ExaGO.2025` is a password. Change to your preference.
133
+
* If you forget the password, you can update it by running `ALTER USER user_name WITH PASSWORD 'new_password';` (replace `user_name` and `new_password`)
131
134
* Exit to shell by entering `quit` and hitting Enter.
132
135
* From command prompt type: `psql -U postgres -d postgres` If it works and you are in `psql` shell you are done. Exit from the shell using `quit`.
133
136
@@ -144,7 +147,9 @@ Behind the scenes, LLM translates natural language queries into SQL queries to r
144
147
145
148
c. Include US state and county information in your database to support spatial queries that related to state or county.
146
149
147
-
d. To enter the CSV files into database using command prompt do: `PGPASSWORD=ExaGO.2025 ./create_db.sh --db exago_db --schema-sql ./schema.sql --drop --truncate`. Here `exago_70k` is the database name. Use it in the configuration `config.py` file.
150
+
d. To enter the CSV files into database using command prompt do: `PGPASSWORD=ExaGO.2025 ./create_db.sh --db exago_db --schema-sql ./schema.sql --drop --truncate`. Here `exago_db` is the database name. Use it in the configuration `config.py` file.
151
+
152
+
* If you used different user name than `$USER` then use the following command: `PGUSER=user_name PGPASSWORD=ExaGO.2025 ./create_db.sh --db exago_db --schema-sql ./schema.sql --drop --truncate` (replace `user_name` with your user name.)
148
153
149
154
e. This will create a database named `exago_db` with password `ExaGO.2025`. This information will be used to update the `config.py` file.
0 commit comments