Render different shape based on categorical field in the dataframe

This is probably relevant by updating the function and using apply_when