biolab / orange3-geo

:tangerine: :earth_africa: Orange add-on for dealing with geography and geo-location
GNU General Public License v3.0
25 stars 28 forks source link

Example in Choropleth help function needs updating #162

Closed wvdvegte closed 1 year ago

wvdvegte commented 1 year ago
Geo version

0.3.2

Orange version

3.34.1

Expected behavior

Following the example description in the Chorpleth help page results in charts where rows are mapped to countries

Actual behavior

Apparently, the HDI dataset has changed: it gives country names rather than coordinates, so it won't work as input

Suggested change

Additional step in example description: add Geo Transform before Choropleth to get coordinates from country names (Another option would be to make Choropleth understand country names directly. If Geo Transform can recognize them, then why not Choropleth?)

janezd commented 1 year ago

When you say Geo Transform, you mean Geo Coding? But Geo Coding is in the workflow on that page, and it adds the coordinates - it works for me. (We are talking about this page, right? https://orangedatamining.com/widget-catalog/geo/choroplethmap/)

Why doesn't Choropleth do it? We are hesitant to pile too much functionality into a single widget, if this same functionality is provided in another, specialized widget. Also because it would usually burden the interface. For Choropleth, it would mean one or two additional options - those that are now set in Geo Coding. There are exceptions to this rule, but they are simpler and typically without user intervention -- e.g. many widgets that require discrete variables would accept numeric ones and apply some trivial discretization).

wvdvegte commented 1 year ago

Sorry, yes, I meant Geocoding. Yes, your reasoning makes sense, but it means that the example has to be updated by adding the extra step for inserting Geocoding. Somehow it seemed a bit cumbersome if you have to convert a country name to the coordinates of its center before you can display it on a map as an area which has again that same country name.

janezd commented 1 year ago

I'm still confused about the issue. Documentation says: "(...) Choropleth widget requires latitude and longitude pairs, so we will use Geocoding to extract this information. We used the attribute Country and found lat/lon pairs that Choropleth can use." Are we looking at the same page?

You are right that it seems strange that you need to encode the country into coordinates to later color the entire country. But Choropleth does more than that: it receives different points within a country or another level of detail, and aggregates data from all that points - e.g., given locations of all traffic accidents in a region, it can show the percentage of intoxicated drivers.

To avoid country names, it would need a radio button by which we'd choose whether it's given coordinates or names. Under these two options with have the current two combo boxes for choice of coordinates, and under the second we'd have a combo to choose country name. Or region name, depending on level of detail. That's what I meant by burdening the user interface of the widget.

wvdvegte commented 1 year ago

Sorry, completely overlooked it ... yes it's there after all.

wvdvegte commented 1 year ago

Just one last suggestion: it might be useful to have an example that uses the more advanced functionalities of Choropleth, if a common dataset is available that supports it.

janezd commented 1 year ago

Good idea. Done, here: https://github.com/biolab/orange3-geo/pull/161/commits/ff23008179d3435c3373450c537072226f1f2664.