Visualization of UNDP energy related projects.
- Load and display data for around xxx different projects.
- Interactively filter according to categories and regions.
- Display different statistics
- Display data on a map
- It includes country profiles with a dashboard showing different indicators
Link for the visualization https://energy-hub-country-profiles.netlify.app/
Pages Where the Visualization is Used The visualization is in development at this moment and it's therefore not being used
Link for stylesheets
- React: Used as MVC framework.
- CRACO: Used to configure different scripts (See Available Scripts for more details)
- styled-components: Utilizes tagged template literals and the power of CSS, allows to write actual CSS code to style the components in JS/TS.
- Various D3 Libraries: Used for visualizations, adding interaction and reading the csv data file.
- AntD: For UI elements like dropdown, buttons, checkbox, and slider.
- lodash: Used for manipulating and iterating arrays and objects.
This project uses npm
. For installation you will need to install node
and npm
, if you don't already have it. node
and npm
can be installed from here.
To install the project, sinply clone the the repo and them run npm install
in the project folder. You can use terminal on Mac and Command Prompt on Windows.
Run the terminal or command prompt and then run the following
git clone https://github.com/UNDP-Data/Energy-Hub-Dashboard/
cd Energy-Hub-Dashboard
npm install
To start the project locally, you can run npm run start
in the project folder in terminal or command prompt.
This will run the app in development mode. Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits. You will also see any lint errors in the console.
This project uses ESLint integrated with prettier, which verifies and formats your code so you don't have to do it manually. You should have your editor set up to display lint errors and automatically fix those which it is possible to fix. See http://eslint.org/docs/user-guide/integrations.
This project is build in Visual Studio Code, therefore the project is already set up to work with. Install it from here and then install this eslint plugin and you should be good to go.
Craco is used to add a cofiguration layer for CRA. The primary function is to stop the build
to have optimized chunks of the built script. This make the using the script in the Wordpress easier. The configuration file for Craco is placed in the root folder and called craco.config.js
npm run build
: Executescraco build
and builds the app without chunking the main js script file.npm run start
: Executescraco start
and start the local server for local deployment.npm install
: Installs all the dependencies.
This project uses ESLint integrated with prettier, which verifies and formats your code so you don't have to do it manually. You should have your editor set up to display lint errors and automatically fix those which it is possible to fix. See http://eslint.org/docs/user-guide/integrations.
This project is build in Visual Studio Code, therefore the project is already set up to work with. Install it from here and then install this eslint plugin and you should be good to go.
Latest updates by Roxana Torre