LHC_Hidroweb is a Jupyter application for visualize ANA's Inventory and download Rainfall or Flow data from ANA's API.
You can use a ".csv" file from ANA's website, or you can get the latest Inventory file from ANA's API (and later save in your local). Don't forget to add 'Inventario.csv' at the end.
After uploading the Inventory data you can visualize the columns in the inventory.
And finally you can easily download the Rainfall or Flow data with a self drawn contour or use a Shapefile. If you use the Shapefile, the file should be in WGS84.
A quick graph visualization can be done by checking the date period with some data in the Downloaded data.
Follow the process in order to utilize the Interactive Tool.
It is necessary to use Anaconda for the following steps. The use of Anaconda facilitate the download and aplication of the following programs.
-
First, you need to open Anaconda Prompt.
-
Create a new Virtual Environment for avoid possible conflict of packages.
- Deactivate the current environment by
conda deactivate
. - Check the possible environment by
conda env list
. - Create by
conda create --name LHC_Hidroweb python=3.7
. - Check again the environment to make sure the Environment was created
conda env list
. - Activate the environment
conda activate LHC_Hidroweb
.
- Core packages for the Batch download.
- Install
conda install requests
.
- Core packages for the Interactive Map.
conda install -c conda-forge jupyterlab geopandas ipywidgets nodejs ipyleaflet bqplot
conda install numpy pandas
- Add the newly created Virtual Environment to Jupyter
pip install --user ipykernel
python -m ipykernel install --user --name=LHC_Hidroweb
- Install/Activate the widgets for Jupyter-lab
jupyter labextension install @jupyter-widgets/jupyterlab-manager
jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter-leaflet
jupyter labextension install bqplot
- Opening Jupyter-lab
-
jupyter-lab
-
After opened the Jupyter Lab, you need to make sure to use the correct kernel.
- And, if the selected kernel is other than the one just created, selected the correct kernel.
-
Open the View_Map01.ipynb in Jupyter-lab and Run the cells
-
Enjoy the interactive map!