Icon

04 Geospatial data - Exercise

Switch


Next nodes don't get executed if no product is selected.

Select one category

With the Value Selection Widget, the user can select a category and filter the relative products.

Select one product and retrieve similar products

The metanode performs a similarity search to find products that are similar to the selected one.

Score over time

These nodes calculate the average review score over time to be plotted it in a Line Plot.

NGram Frequency

The nodes of the Text Processing extension are used to calculate the frequency of bigrams (2 consecutive words) and create a Tag Cloud.

Report

The component contains the visualization nodes. The views are arranged in a composite view that gets exported to a PDF report.

Step 1.1. Get Boundary maps

  1. Count the number of reviews and calculate the mean review score for each Country using the GroupBy node.

  2. Get the boundary map of each country.

    1. Use a Table Row to Variable Loop Start node to iterate through each country.

    2. Add a OSM Boundary Map node to retrieve the boundary map for the current country in the loop (overwrite the setting with the Review Country flow variable)

    3. Close the loop with a Loop End node.


Step 1.2. Join and Rename

  1. Join the table from the GroupBy node with the boundary maps (geometry column). Use a Value Lookup or a Joiner node, matching the columns Review Country and name.

  2. Rename the columns to

    1. Review Country

    2. Average Rating

    3. Number of Reviews

    4. Country Geometry


Step 1.3. Visualize Choropleth Map

  1. Create the choropleth map with the Geospatial View node.

    • Select Country Geometry as geometry column.

    • Use the Average Rating column as marker color column.

    • Make sure to include Average Rating and Number of Reviews in the marker tooltips and popups.

  2. Add a title to the view with a Text View node and rearrange it in the composite view of the component with the Layout Editor.


Create 2gramsand count frequency
NGram Creator
Empty Table Switch
Select category
Value Selection Widget
Plot 2grams andtheir frequencies
Tag Cloud (JavaScript) (legacy)
Product analysisReport
Report
Filter productsfrom selected category
Row Filter
Show productsin selected Category
Table View
Missing Value
Retrieve reviewsfor selected andsimilar products
Joiner
Avg review scoreover time
Pivot
Table Title
Variable Expression
Selected + similarproducts
Concatenate
Insert oneProduct ID
Autocomplete Text Widget
Trim Summary
String Format Manager
Filter out wordswith less than 3 chars
N Chars Filter
Component Output
Convert reviews toDocument type
Strings to Document
Analyse
Refresh Button Widget
Remove stopwords
Stop Word Filter
Remove punctuation
Punctuation Erasure
Report PDF Writer
Filter reviewsfor selected product
Row Filter
Output 1: Similar productsOutput 2: Selected product
Similar products
Input 1: Productsinput 2: Reviews
Component Input
Report Template Creator
Number Rounder

Nodes

Extensions

Links