Skip to content

zip_distance with vectors not returning correct order of results #20

Description

Using the example given in the README:
#> zipcode_a zipcode_b distance
#> 1 08731 08901 6.9
#> 2 08734 08005 45.1`

You can check a map to verify that the distances for the two pairs of zipcodes is swapped. 08731 > 08901 is actually 45mi, while 08734 > 08005 is 7mi.

You can see it more distinctly using the same repeated values:
zip_distance( zipcode_a = c('08731', '08731'), zipcode_b = c('08731', '08005') )

zipcode_a zipcode_b distance
08731 08731 6.9
08731 08005 0.0

They are also in the wrong order for multiple rows n > 2.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions