Visualize data using pydeck
An example code to visualize using the swiss population data is provided Documentation of pydeck: https://deckgl.readthedocs.io/en/latest/index.html
- Load the data into pandas DataFrame
- An example dataset is provided: 2022statpop, which is the hectral residential population counts in Switzerland (FSO, Statistik der Bevölkerung und Haushalte (STATPOP))
- The DataFrame should have these columns: lat, lon, a column for heights (if using 3D layer like ColumLayer, PolygonLayer, etc.) a column for color
- heights and color are often not from the same column for the best visual effect and providing more information
- Normalization is often needed for height and/or color for the best visual effects
- Consider adjusing these visual results:
- View angle and location via pdk.ViewState
- Background map via pdk.Deck(map_style=...)
- Save the file as html for the best user experience (users can zoome in/out etc.)