Real-time visualization Project
The purpose of the visualiztion is to get a deeper look into the spatial distribution of accidents by the severity of the accidents. I think it is interesting to investigate the visibility and temperature conditions according to the severity of the accidents, so I also use two filters for these variables. The use of Nvidia RAPIDS cuxfilter library makes it easy to build a cross-filtering dashboard with several type of visualizations and charts.
The usage of the dashboard is straightforward, all the filtering functions filter the data behind all the charts. In case of a deployed version, the charts can be resized, reorganized and closed.
In order to run the solution locally, the necessary enviroment can be set up with the help of a docker container from the https://rapids.ai/start.html#docker website. It is required to have Cuda installed on the host machine with version 11.2+, an Nvidia GPU with at least 6.0 compute capability, and all the other details can be found on the website.
I used a Google Cloud Compute Engine with an Nvidia Tesla T4 GPU with the Deeplearning VM template in order to get a pre-installed nvidia driver and cuda. I also add a firewall rule in order to able all incoming ports of the VM.
The two lines of code download the container and runs it on the VM:
docker pull rapidsai/rapidsai-core:22.12-cuda11.2-runtime-ubuntu20.04-py3.8
docker run --gpus all -d \
--shm-size=1g --ulimit memlock=-1 \
-p 8888:8888 -p 8787:8787 -p 8786:8786 -p 5001:5001 \
rapidsai/rapidsai-core:22.12-cuda11.2-runtime-ubuntu20.04-py3.8
I run the container in detached mode, and opened the port 5001 in order to reach the Bokeh Server from outside of the VM.
I also used an nginx container as a proxy server to route the port 80 to the container's port 5001.
Documented source code in Colab: https://colab.research.google.com/drive/1nyvc23m5-ssh72JI8Z3Knt6lWh1K3Lqc?usp=sharing