I am developing a web application in Django to manage a parking lot, with a real-time visual display of occupied and free spaces. The application connects to a SQL database that holds the IDs of each parking space and a boolean value (True for occupied, False for free), updated through sensors.
I’m looking for guidance on the best approach to create a visual mapping of these parking spaces using Bokeh.
I was checking out the Texas Hover Map but I’m not sure if ColorMapping would be the right tool, or how to make a map.
Without knowing much about structure of your data and application, here are my thoughts: do you have coordinates associated with each parking space? if so, you can create a dataframe with columns id, x_coordinate, y_coordinate, is_occupied and map True/False for is_occupied to different colors like green/red and plot each space as a circle with appropriate color:
Make sure to use a ColumnDataSource created from this dataframe and use it in your plot. Then you need to have a way to update the CDS in your app when data is updated. Hope this helps.