Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find new test case for missing postalcode #242

Open
orangejulius opened this issue May 28, 2016 · 1 comment
Open

Find new test case for missing postalcode #242

orangejulius opened this issue May 28, 2016 · 1 comment

Comments

@orangejulius
Copy link
Member

orangejulius commented May 28, 2016

One of our test cases needs a little help, and all that's required is knowledge of some place on Earth that uses postal codes. We're hoping it can be someone from our community!

🌍 What are we testing?

Much of the data we import into Pelias has postal code information, but not all of it. Unfortunately this presents us with a problem: users can perform searches for an address with a postalcode, and we might know about that address, but we might not know its postcode.

This happens fairly frequently right now, and we don't expect to have perfect data everywhere, well...ever. Fortunately, Pelias should be able to find the place a user is looking for, even if they type in the postalcode but its not in the data. To ensure this works, we have a test case for it. But right now it's broken. :(

📈 What changed?

In short, open data got better! A new data source was added for the part of Florida that includes the current test, and it adds postalcodes! Overall this is great, but this specific test requires that we don't have the postalcode for an address, or it doesn't work. We need a new test case.

💌 How to help out

We need people that can find an address in our data that doesn't have a postal code associated with it, and also happen to know what the postal code for that address should actually be. It doesn't have to be in the USA (there are postalcodes all over the world!).

The fastest way to find areas you might know about that have good data coverage might be to look at the OpenAddresses dot map. It's at the bottom of the page and shows a dot for every single address OpenAddresses knows about. We import all OpenAddresses data so it's also a good indicator of our coverage.

After that, try running some queries using our compare app. Here's a link to the address we're currently using. Try typing in some addresses you know about (without the postalcode).

If Pelias doesn't know about the address at all, none of the results will match what you typed in. But if we do know about it, a couple of the results (hopefully at the top, but maybe not) will match. Read through each one, and see if it has a postalcode property with the correct postalcode. If any of them do, then it's the same problem of open data being too good for this test. 🎉. So try another one and hopefully you can find an address that doesn't have a postalcode.

One important sidenote: please don't use any other geocoders that use proprietary data to find a good test case. There's a famous one who's name starts with G and ends with oogle that you may have heard about. Using proprietary data to make open data better is against the terms of service of those tools. It's also not really in the spirit of open data.

💻 What the updated test will look like?

Our tests are written in JSON, so updating them doesn't require writing any code. In fact for this test, you won't need to change the structure of the test at all, just update some of the values.

The test case currently looks like this:

 {
      "id": 2,
      "status": "fail",
      "user": "Julian",
      "type": "dev",
      "notes": "Desired document has no zipcode, but should be 33801. If we ever get better data, find a new test case",
      "in": {
        "text": "440 S Combee Rd, Lakeland, FL 33801"
      },
      "expected": {
        "properties": [
          {
            "name": "440 South Combee Road",
            "country_a": "USA",
            "country": "United States",
            "region": "Florida",
            "region_a": "FL",
            "county": "Polk County",
            "locality": "Crystal Lake",
            "housenumber": "440",
            "street": "South Combee Road"
          }
        ]
      }

Once you've found an address that works, update each of the fields so that it reflects the new address. Pay special attention to the text field (the actual query the test will run), the notes (which is just a helpful sentence for anyone reading the test, and of course the properties section which lists a bunch of fields for the actual address.

Keep the same format, with the postalcode in the query text but not in the properties section. IF you have to remove a field like region or region_a because the address you found doesn't have it, that's ok.

We're happy to help verify that a particular address will work for this test, but we want to make sure someone outside our team submits the actual PR. We get to do enough of them and we'd rather someone newer to the open source community gets the experience! 🏁

@riordan
Copy link
Contributor

riordan commented May 28, 2016

👏

@orangejulius orangejulius changed the title Find new test case for missing Zipcode Find new test case for missing postalcode May 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants