Skip to content

Write geocode score to column#161

Open
raph-topo wants to merge 1 commit intobetagouv:mainfrom
raph-topo:geocode-score
Open

Write geocode score to column#161
raph-topo wants to merge 1 commit intobetagouv:mainfrom
raph-topo:geocode-score

Conversation

@raph-topo
Copy link

No description provided.

Copy link
Collaborator

@fflorent fflorent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

Waiting for @CamilleLegeron review before merging.

@raph-topo
Copy link
Author

PS : regarding

// TODO : check pertinance of score rules
export const isDoubtfulResults = (dataFromApi: NormalizedGeocodeResult[]) => {
return dataFromApi[0]?.score < 0.6;
};

In combination with saving the result score to a column and a manual error checking (that's what the score is there for), I found it adequate to lower the threshold to 0.4, and might lower even more.

@fflorent
Copy link
Collaborator

@raph-topo A doubtful result is still displayed with a choice banner, right? I don't know how much doubtful results there usually are.

I can imagine allowing to customize the threshold to lower it (through an env variable) and let anyone willing to lower this value deploy their own instance. Or an option to let the user change this value ("Open configuration" in the widget menu), but that's more work.

@raph-topo
Copy link
Author

@fflorent Good you mention that… In fact, lowering the threshold applies to recherche globale & recherche spécifique. For the former, responses below the score are not returned. For the latter, it shows available alternatives only below that threshold. So that's sort of opposite behaviour. I've had good results with 40 on old surveys, with it finding reliably way renames like « X rue du Fol Penser » to « X Rue des Folles Pensees ».

Agree, it could be helpful to set 2 different scores, and/or set them in the UI (Grist widget config). The onEditOptions & onOptions blocks would only be 5 lines, but one would have to add a few UI elements (separator, label, input).

},
SCORE: {
name: "score",
title: "Score (destination)",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we show the user the score, I think we need to explain a little more about where it comes from, and that it is not calculated by the widget but by the Address API, and that it is a reliability score.
Maybe add a description here ?
Or some explanation in app/geocode/Instructions.tsx ?
Only ideas

@CamilleLegeron
Copy link
Collaborator

Only on proposal, otherwise LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants