-
Notifications
You must be signed in to change notification settings - Fork 2
Description
We will define, for each reservoir, a vertical bar chart that will display the following historical data:
-
Current stored water (in cubic hectometers).
-
Stored water in the current month 10 years ago (in cubic hectometers).
-
Stored water in the current month of the previous year (in cubic hectometers).
Create a component inside the reservoir pod at: src/front/pods/embalse/components and use it in the pod below the location map.
To obtain the data you need, we have this repository:
https://github.com/Lemoncode/embalse-info-script-historicos
Follow the steps in the README, then copy the result of the script from the .mql file and run the code in the MongoDB extension for Visual Studio or in MongoDB Compass.
These two files will create two documents in the database with all the data populated.
Create two API methods to fetch the information and display it in the vertical bar:
- For stored water from 10 years ago: reservoir name, month, and year.
- For stored water from last year: reservoir name and month.
The second part of the task will be to create a console runner using the previous script so that it runs once a year.
packages/db/src/console-runners
An example of what the "vertical bar" would look like. Note: This is an approximation.:
