Skip to main content

CSV Reconcile Geo distance scoring plugin

A scoring plugin for csv-reconcile using geodesic distance. See csv-reconcile for details.

Reconciliation

This plugin is used to reconcile values representing points on the globe. It expects those values to be in well-known text format for a point. That is, like so: POINT( longitude latitude ).

The pre-processor automatically strips off literal datatypes when present as well as double quotes.

The CSV column to be reconciled needs to be in the same format. In addition, there must be at most one instance of any id column. For instance, if reconciling against coordinate location for a wikidata item, there must be at most one location per item.

Scoring

The scoring used is more or less arbitrary but has the following properties:

  • The highest score is 100 and occurs when the distance to the reconciliation candidate is zero
  • The lower the score the greater the distance to the reconciliation candidate
  • The score is scaled so that a distance of 10km yields a score of 50

Configuration

The plugin can be controlled via SCOREOPTIONS in the csv-reconcile --config file. SCOREOPTIONS is a Python dictionary and thus has the following form SCOREOPTIONS={ "key1":"value1,"key2":"value2"}.

  • SCALE set distance in kilometers at which a score of 50 occurs. ( Default 10km ) e.g. "SCALE":2
  • COORDRANGE If supplied do a precheck that both the latitude and the longitude of the compared values are within range. This is for performance to avoid the more expensive distance calculation for points farther apart. e.g. "COORDRANGE":"1"

Future enhancements

Some of the current implementation was driven by the current design of csv-reconcile. Both may be updated to accommodate the following:

  • Allow for separate latitude and longitude column in the CSV file
  • Add some scoring options such as the following:
    • Allow for overriding the scaling function
    • etc.

Metadata

Release files for csv-reconcile-geo 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for csv-reconcile-geo 0.1.7
File Size Uploaded
csv-reconcile-geo-0.1.7.tar.gz 4.4 kB Details

Release files / csv-reconcile-geo-0.1.7.tar.gz

Download URL csv-reconcile-geo-0.1.7.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c53dc3801c28852830d9bec9bef73b127d21ced92e5e2125ab5cb10ad81dfc0d
BLAKE2b-256 checksum
How to use checksums
5f13cd4679b2ed5ecadef3e2ac3d8bd727fb9931b416957bc1548f4e6237682e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.6 CPython/3.8.10 Darwin/20.2.0

Release history Release notifications | RSS feed

This release

0.1.7 This release

1 release file

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page