3meters / proxibase

Patchr web service
1 stars 0 forks source link

Foursquare places missing for Southworth Ferry Terminal #245

Closed Jaymassena closed 10 years ago

Jaymassena commented 10 years ago
  1. Ran nukePlaces on a local snapshot of the production db.
  2. Called the service: http://ariseditions.com:8080/v1/places/near?ll=47.512314,-122.496649&log=1

The foursquare call always returns four places: Vashon Island Ferry Terminal 2064646400 Blake Island State Park 3609028844 Port Vashon 2066504182 Metro Bus Stop #46769 2065533000

  1. Call foursquare service directly: https://api.foursquare.com/v2/venues/search?ll=47.512314,-122.496649&radius=250&limit=20&oauth_token=M2PBRSX05IFNYVPKPNVAGQKKLRPZDM4NERYSWSTLXL4WGDLJ&v=20140630

I used an oauth token generated for my own foursquare account.

The call returns places that are missing from the places/near call including the following and others. Some are getting filtered out by the checkin filter but others look to me like they should make it.

Southworth Ferry Terminal

{ "categories" : [ { "icon" : { "prefix" : "https://ss1.4sqi.net/img/categories_v2/travel/ferry_pier_", "suffix" : ".png" }, "id" : "4e74f6cabd41c4836eac4c31", "name" : "Pier", "pluralName" : "Pier", "primary" : true, "shortName" : "Pier" } ], "contact" : { }, "hereNow" : { "count" : 0, "groups" : [ ], "summary" : "0 people here" }, "id" : "4b4fca1bf964a5207a1527e3", "location" : { "address" : "11564 SE State Highway 160", "cc" : "US", "city" : "Southworth", "country" : "United States", "distance" : 58, "formattedAddress" : [ "11564 SE State Highway 160", "Southworth, WA 98386" ], "lat" : 47.5120703345804, "lng" : -122.49734401702881, "postalCode" : "98386", "state" : "WA" }, "name" : "Southworth Ferry Terminal", "referralId" : "v-1404150289", "specials" : { "count" : 0, "items" : [ ] }, "stats" : { "checkinsCount" : 3094, "tipCount" : 3, "usersCount" : 1031 }, "url" : "http://www.wsdot.wa.gov/ferries/vesselwatch/terminaldetail.aspx?terminalid=20", "verified" : false }

Tillicum Village (on nearby Blake Island)

      { "categories" : [ { "icon" : { "prefix" : "https://ss1.4sqi.net/img/categories_v2/arts_entertainment/default_",
                  "suffix" : ".png"
                },
              "id" : "4bf58dd8d48988d1f2931735",
              "name" : "Performing Arts Venue",
              "pluralName" : "Performing Arts Venues",
              "primary" : true,
              "shortName" : "Performing Arts"
            } ],
        "contact" : {  },
        "hereNow" : { "count" : 0,
            "groups" : [  ],
            "summary" : "0 people here"
          },
        "id" : "4ae4b8c7f964a520769d21e3",
        "location" : { "address" : "Blake Island",
            "cc" : "US",
            "city" : "Seattle",
            "country" : "United States",
            "distance" : 3460,
            "formattedAddress" : [ "Blake Island",
                "Seattle, WA"
              ],
            "lat" : 47.54212074763928,
            "lng" : -122.4836540222168,
            "state" : "WA"
          },
        "name" : "Tillicum Village",
        "referralId" : "v-1404150289",
        "specials" : { "count" : 0,
            "items" : [  ]
          },
        "stats" : { "checkinsCount" : 570,
            "tipCount" : 9,
            "usersCount" : 484
          },
        "verified" : false
      }

Southworth grocery (Right at entrance to ferry lot)

      { "categories" : [ { "icon" : { "prefix" : "https://ss1.4sqi.net/img/categories_v2/food/deli_",
                  "suffix" : ".png"
                },
              "id" : "4bf58dd8d48988d146941735",
              "name" : "Deli / Bodega",
              "pluralName" : "Delis / Bodegas",
              "primary" : true,
              "shortName" : "Deli / Bodega"
            } ],
        "contact" : {  },
        "hereNow" : { "count" : 0,
            "groups" : [  ],
            "summary" : "0 people here"
          },
        "id" : "4d1bda07fd7bb60c544e99e1",
        "location" : { "address" : "3985 Cherry St SE",
            "cc" : "US",
            "city" : "Southworth",
            "country" : "United States",
            "distance" : 233,
            "formattedAddress" : [ "3985 Cherry St SE",
                "Southworth, WA 98386"
              ],
            "lat" : 47.512278725609704,
            "lng" : -122.4997567792807,
            "postalCode" : "98386",
            "state" : "WA"
          },
        "name" : "Southworth Grocery",
        "referralId" : "v-1404150289",
        "specials" : { "count" : 0,
            "items" : [  ]
          },
        "stats" : { "checkinsCount" : 44,
            "tipCount" : 1,
            "usersCount" : 26
          },
        "verified" : false
     }
georgesnelling commented 10 years ago

We throw out foursquare places that don't have a phone number because we have no way to dedupe them.

Jaymassena commented 10 years ago

Sorry, I saw the later line of code that let through places with 500 checkins even if they didn't have a phone number and missed the earlier line:

 // We dedupe on phone number
  if (isFullVenue && !(venue.contact && venue.contact.phone)) return

  // popularity filter
  if (isFullVenue) {
    if (!(venue.stats && venue.stats.checkinsCount)) return
    if (venue.stats.checkinsCount < 20) return
    if ((venue.stats.checkinsCount < 500) && !(venue.contact && venue.contact.phone)) return
  }
georgesnelling commented 10 years ago

Closing not a bug for now.