Found 3 bookmarks
Newest
7 Geospatial Data Visualization – Geospatial Data Science with R
7 Geospatial Data Visualization – Geospatial Data Science with R
Emphasizing clarity, accuracy, and purpose-driven design, the guide covers how to create compelling static and interactive visualizations tailored to diverse analytical and communicative objectives. Throughout, we will adhere to best practices in cartographic design to ensure that each visualization conveys its intended message clearly and truthfully.
Successful geospatial visualization demands attention to several core principles that ensure the resulting map or graphic is both informative and comprehensible. Visualizations must balance aesthetic considerations with functional accuracy to effectively convey spatial information.
Clarity and Simplicity Clarity in geospatial visualization means the core message of a map is immediately apparent to viewers. Overloading a map with too much information or too many design elements can confuse rather than enlighten. Designers should strive for minimalism—include only the critical spatial features and data relevant to the map’s purpose. An expert data visualization principle is to “remove any elements that do not contribute to understanding the data”, such as excessive labels, grid lines, or decorative clutter. By simplifying the visual display, we direct the audience’s attention to the most important patterns or locations. Key guidelines for simplicity include: Limit the number of thematic layers shown on a single map. Use intuitive symbols and clear labeling for features. Avoid excessive annotation or unnecessary visual noise. In practice, a clean design with ample white space and straightforward symbology will enhance comprehension and engagement. The goal is a map that communicates rather than overwhelms.
Appropriate Color Schemes: Choose color palettes that are perceptually uniform and appropriate for the data. Avoid using arbitrary or excessively bright colors that could mislead or cause eye strain. Instead, use scientifically derived colormaps like viridis or plasma, which are designed to be uniform and colorblind-friendly. For example, a sequential palette (light to dark in one hue) makes sense for a unipolar data range (e.g., population density), whereas a diverging palette (two hues fading to a neutral midpoint) is best for data that have a meaningful center (e.g., above/below average comparisons). Ensure that the colors have sufficient contrast against each other and the map background for readability – legend text and boundary lines should also be clearly visible. (A poorly chosen palette or low-contrast colors can render a map useless to colorblind viewers or even to those in print vs. screen viewing.) Maintain consistency in color use across multiple maps; if one map shows intensity of something in red, another map in the report should ideally use red for that same intensity concept.
Clear Legends and Annotations: Provide explanatory legends, titles, and annotations to guide the viewer. A well-crafted legend is crucial for interpreting a map’s symbology – it should be clear, concise, and not overly cluttered. Viewers should not struggle to match colors or symbols to their meaning. As a cartography guide points out, a confusing legend can undermine your visualization, whereas a clear legend “guides [readers] seamlessly through your data story”. Tips include: place the legend in an unobtrusive but noticeable location (often corners work well), use intuitive labels (e.g., “Population (millions)” rather than “Pop_val”), and avoid too many categories. Additionally, titles and subtitles are important: they frame what the map is about. A good title might state the what/where/when (e.g., “Population Distribution by Region, 2020”) so the audience immediately knows the context. Annotations like callout labels or arrows can highlight key insights (e.g., “Area X has the highest value”). However, avoid excessive text on the map itself; maintain a balance so the map doesn’t become a textbook diagram unless that’s intended. The goal is to inform without overwhelming.
·warin.ca·
7 Geospatial Data Visualization – Geospatial Data Science with R
UNCHARTED DATA: Using Crosstalk to Add User-Interactivity
UNCHARTED DATA: Using Crosstalk to Add User-Interactivity
Linking an interactive plot and table together with the crosstalk package.
Using Crosstalk to Add User-Interactivity
The goal is to link the reactable table I created to a plotly chart and provide additional filter options that control both the table and the chart.
An important note: in order to use crosstalk, you must create a shared dataset and call that dataset within both plotly and reactable. Otherwise, your dataset will not communicate and filter with eachother. The code to do this is SharedData$new(dataset).
If you expand the code below, you’ll see that the code to build a table in reactable is quite extensive. I will not go into the details in this post, but do recommend a couple great tutorials that I used to create the interactive table such as this tutorial from Greg Lin, and this from Tom Mock which really helped me understand how to use CSS and Google fonts to enhance the visual appeal of the table (see the “Additional CSS Used for Table” section below for more info).
If you have ever built something in Shiny before, you’ll notice that the crosstalk filters are very similar. You can add a filter to any existing column in the dataset. As you can see in the code below, I used a mixture of filter_checkbox and filter_select depending on how many unique options were available in the column you’re filtering. My rule of thumb is if there are more than five options to choose from it’s probably better to put them into a list in filter_select like I did with the Division filtering as to not take up too much space on the page.
For the layout of the data visualization, I used bscols to place the crosstalk filters side-by-side with the interactive plotly chart. I then placed the reactable table underneath and added a legend to the table using tags from the htmltools package. The final result is shown below. Feel free to click around and the filters and you will notice that both the plot and the table will filter accordingly. Another option is to drag and click on the plot and you will see the table underneath mimic the teams shown.
·uncharteddata.netlify.app·
UNCHARTED DATA: Using Crosstalk to Add User-Interactivity