Visualization API research
See original GitHub issueProposal
UPDATED
Based on the information provided in this thread, I add here the final conclusions:
- Add Style helpers (from Layer helpers, in cartoframes.viz.styles)
- basic_style
- color_bins_style
- color_category_style
- color_continuous_style
- size_bins_style
- size_category_style
- size_continuous_style
- Add default UI component helpers
- default_legend
- default_widget
- default_popup
- Allow legends/widgets/popups=True/False to enable the defaults to the Layer
- Add title, description, footer to the Layer
- Refactor Layer helper methods? Should we remove them?
from cartoframes.viz import Layer, size_continuous_style
Layer(
source='starbucks_points',
style=size_continuous_style(
value='revenue',
color='white',
opacity='0.2',
stroke_color='blue',
size=[20, 80]
),
legends=True,
title='Revenue $'
)
from cartoframes.viz import Layer, size_continuous_style, default_legend
Layer(
source='starbucks_points',
style=size_continuous_style(
value='revenue',
color='white',
opacity='0.2',
stroke_color='blue',
size=[20, 80]
),
legends=[
....,
default_legend(title='Revenue $'),
....
]
)
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
mathisonian/awesome-visualization-research - GitHub
Awesome visualization research. Awesome. A curated list of data visualizations research papers, books, blog posts, and other readings.
Read more >Best Data Visualization Software with API 2022 - GetApp
View the best Data Visualization software with API in 2022. ... Review performance or research data with customizable tables and charts right on...
Read more >Visualizing API Usage Examples at Scale - People @EECS
We implemented this interactive visualization for a set of Java APIs and found that, in a lab study, it helped users. (1) answer...
Read more >Data visualization resources - Forsta
Visualization APIs. Visualization APIs Easily integrate data sources to create ... The new golden age for research agencies ... Data hub for market...
Read more >A Complete Overview of the Best Data Visualization Tools
Data visualization tools provide designers with an easier way to create visual ... Drag and drop editor; API for importing additional data sources....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Below are some initial thoughts/ideas on how we can unify our current visualization patterns. The first section talks about enhancements needed to the style class of the Layer to remove the dependency on VL syntax and the second section (thematic maps) focuses on how we can 1) extend current viz layer helpers to be more flexible in widgets and popups and 2) how we can make the cartographic thinking we’ve built into the helpers easily accessible in the Layer
Non-thematic maps
These maps are ones where users aren’t symbolizing an attribute in their data but simply symbolizing a dataset where all features are equal. Whether to modify the defaults or present the results of an analysis, these maps are currently not served by our viz layer helpers and in order to make, a user has to know VL syntax. This will also eliminate the styling confusion (
strokeWidth: / width=
andwidth: / size=
, etc.) that a user needs to know in our current implementation.In this case, we will assume the user will add their own Legend, Widgets and Popups so the main thing here is to simplify how the Style is defined.
Example proposal:
Add table to a Layer and get default symbology:
Modify/customize a basic style:
To discuss:
Related tickets:
Thematic Maps
This is when a user wants to symbolize on a numeric, categorical, or time-based attribute. In this case, with our current implementation, a user can use a viz layer helper but if they have started their workflow at the Layer level and added other components like Widgets and Popups, they have to in essence start from scratch. In addition, our current implementation of the viz layer only supports mapping and adding related components for one attribute (except in the case where a user chooses to animate by another attribute using the option
animate='attribute_name'
).Therefore, the workflow for a thematic maps should not be limited to only one attribute and through our discussions there are two potential paths to make this kind of map both of which we should address.
Path 1: Use a viz layer helper
From our internal research, what we have seen is that viz layer helpers are too limited in their offerings. Specifically with regards to Widgets and Popups in the cases where users want to add additional information to the map to support their analysis.
For this path, we would add the ability to add more/different Widgets and Popups. The Legend would be the same default that we provide as part of the benefit of using a viz layer is to get default cartography which the Legend is an important part of.
We should discuss the different options for this to happen…one way is for the viz layers to accept additional information using the popup and widget classes inside of the helper layer definition. The benefit of this is if a user is working at the Layer level and already has popups and widgets defined, that they could easily switch the Layer to something like
size_continuous_layer
and not lose all of that other work.The thinking here is what @elenatorro has tested and looks like:
To discuss:
default_popup=True
if set, you get our default popup and if not, you can add your custom popups with the popup class and same for the widgets. Should we think about the same thing for legends? We provide a default legend but if the user wants to take advantage of the Legend API and setsdefault_legend=False
what would happen with thetitle
,footer
anddescription
parameters if already set?Path 2: Make a thematic map at the Layer
The second way a user could make a thematic map is to stay inside the default Layer. Currently, this requires even more advanced VL syntax (ramps, etc.) and the biggest issue is that people are missing out and not able to take advantage of the built-in thinking as a tradeoff for more control with widgets and popups.
In this case, we could use the
style
class to bring in all the style-related parameters from the helpers and continue with the pattern where users could use the legend/widget/popup apis to add the other components to the map.In essence, this would be a blend of the previous 2 examples:
Look forward to discussing these ideas together!
cc @elenatorro @Jesus89 @cmongut
You’re right, it also has some breaking changes. Let’s discuss if we keep them in the issue I mentioned once if finish the rest of the issues 👍 thanks!