Coder Social home page Coder Social logo

soniameller / energy-consumption-dashboard Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 455 KB

Intuitive web platform designed to monitor and analyze energy usage across various locations. Featuring an interactive map, users can visualize energy consumption data geographically, identify trends, and make informed decisions.

TypeScript 87.30% SCSS 8.21% HTML 1.06% JavaScript 3.43%

energy-consumption-dashboard's Introduction

Builtrix Challenge

Screenshot or GIF

๐Ÿš€ Setup Instructions

0. Prerequisites

  • Ensure you have Node.js version 16 or higher installed.
  • Create a a Mapbox access token
  • Create a .env file in the root repository and add the required variables:
NX_DATABASE_STORAGE=builtrix_development.sqlite
NX_REACT_APP_MAPBOX_TOKEN=[YOUR_MAPBOX_TOKEN]

1. Clone the repository

git clone <repository-url>

2. Install dependencies

npm install

3. Start the development server

npx nx serve server

4. Seed the database

After you start the server, a builtrix_development.sqlite file will be generated in the root directory of the repository. To populate this SQLite database with data (a process known as "seeding"), follow these steps:

  1. Download and install DB Browser for SQLite.
  2. Open DB Browser and click on "Open Database".
  3. Navigate to the root directory of the repository and select the builtrix_development.sqlite file.
  4. Go to File > Import > Table from CSV file.
    Note: The order of importing data is important. Start with the metadata table, followed by the smart_meter table, and finally the energy_source_breakdown table.

If you encounter any issues with these steps, first verify that the builtrix_development.sqlite file exists in the root directory and that its name matches the NX_DATABASE_STORAGE value in your .env file. If the problem persists, please contact me. I can provide a pre-populated database file that you can simply replace in the root directory.

5. Start the client

npx nx serve client

๐Ÿ› ๏ธ Technologies Used

  • Nx Monorepo for its streamlined monorepo management, facilitating efficient code sharing and scalable architecture.
  • Typescript for enhancing code reliability and developer productivity.
  • Sqlite for its simplicity and ease of setup for development purposes.
  • Material UI for its easy-to-customize components, which speed up UI development and keep the design consistent.
  • Mapbox for providing interactive maps and location features as suggested.
  • Mui Charts for creating consistent, easy-to-use charts, leveraging the existing use of Material-UI in the project.

๐ŸŽฏ Objectives

  • Building clickable geo-location on map
  • Aggregated data of energy consumption
  • Energy Source Breakdown (pie chart): Couldn't reach the development on time
  • Implement a simple authentication system: Couldn't reach the development on time but I could share previous projects in which I implemented authentications systems
  • Filter
  • Hover for metadata

๐Ÿ”ฎ Future Enhancements

  • Complete the required development
  • Add selected building to the url to make the selection sharable
  • Better implement queries to save the filter data from the selected buildings
  • Error handling

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.