Search code examples
rzipcode

Distance between two zipcodes using zipcodeR package not working


I am using zipcodeR package to calculate distance between two zip codes. For the most part it is working well but there are some zip codes that it is not able to return the distance for. For example, I am using the following code:

zip_distance("02118", "32610")

It appears that trying to calculate any distance from the zip code "32610" returns an NA

Has anyone else encountered this problem?

Thanks, Siri


Solution

  • The zip code "32610" is not valid as per is_zcta (which returns true if the given ZIP code is also a ZIP code tabulation area)

    is_zcta("32610")
    [1] FALSE