Skip to content

khalidalshamsi123/EnergyDataVisualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

energy-data-centre-visualisation

Getting started

Prerequisites

Clone the repository

git clone --recursive https://git.cardiff.ac.uk/c21052928/energy-data-centre-visualisation.git

Download the dataset

You have to download and unzip the following 7z files from our S3 bucket:

You must unzip them to a directory and set the DATA_DIR environment variable to that directory.

You may prefer setting it up on the environment variable your IDE, or you can do it on the command line:

On Linux/MacOS:

export DATA_DIR=/path/to/dataset

On Windows:

$env:DATA_DIR = "/path/to/dataset"

Install dependencies for the frontend

cd into the frontend directory, then run:

pnpm install

Set environment variables for the frontend

For the contact form to work, can use and create the following .env file:

NUXT_MAILHOST=smtp.ethereal.email
NUXT_MAILPORT=587
[email protected]
NUXT_MAILPASSWORD=pZqtzKbprNDherKFEU
[email protected]

Alternatively, you can set them manually as environment variables.

Run the frontend

cd into the frontend directory, then run:

pnpm dev

You can then access the frontend at http://localhost:3000.

Run the frontend in production mode

cd into the frontend directory, then run:

pnpm build
node .output/server/index.mjs

You can then access the frontend at http://localhost:3000.

Install dependencies for the backend

cd into the backend directory, then run:

pip install -r requirements.txt

Set environment variables for the backend

Assuming you have already set the DATA_DIR environment variable, you must also set the following environment variables:

  • REDIS_URI - The URI of the Redis server, for example, redis://localhost:6379.

Initialise the database

Assuming you have already set the DATA_DIR and REDIS_URI environment variables set,

cd into the backend directory, then run:

python initialise_csv.py

Run the backend

Assuming you have already set the DATA_DIR and REDIS_URI environment variables set,

cd into the backend directory, then run:

uvicorn main:app --reload

This will start the backend server on port 8000 while binding to localhost.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published