marklogic-community / eauser-geomapper

TEACUP: MarkLogic-based visualization of where early access users are from

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dave is being drawn in Idaho, but he should be somewhere on the east coast of the USA. Look at the geocoding for Dave and discover why this is.

kmcostel opened this issue · comments

This is #140 (it's not just Dave... someone else in Idaho is supposed to belong in California, if I remember correctly..)

In addition to Dave, there are other users displayed on the map in places they should not be in... For example:

  • Mike Knize, Young (Pearson) are also in Idaho even though they do not have zip codes -- why were they also defaulted to be in Idaho?
  • Yoshinobu Ota, Chris Day, Hisao Suenobu are in Florida even though the zip code is 94070 (San Carlos, CA)
  • Mario Briana is in Louisiana even though the zip code is 94070
  • Geert Josten is in Sacramento, CA even though the zip code is 94070

The Idaho Issue
The two parameters used to generate a geocoding URL, are postalCode and country. In Dave's Marketo data, he does not have a postalCode, so his postalCode is 'null'. However, he does have a country (United States of America).

This generates a geocode URL of:
https://maps.googleapis.com/maps/api/geocode/json?address=nullUnitedStatesofAmerica&key=AIzaSyCpdIYWYqgoX2kJCMheF3hcg99LE-jjs_I

As you can see if you click on the link, the Google Maps API response has a lat/long of some random place in Idaho.

I'm guessing that this is the case for everyone else in Idaho? I shall check their URLs. :)
Edit: Yup! All of them have null, United States of America.

Similar to the Idaho Issue, the MarkLogicians are in Florida because of their user inputs:

  • Yoshinobu Ota, Hisao Suenobu: With a postalCode of 94070 and country of Japan, they receive a lat/long of some random place in Florida.
  • Matt Moody, Chris Day: With a postalCode of 94070 and country of Australia, they receive a lat/long of a different place in Florida.

Maybe we can default all postalCodes of 94070 (San Carlos, CA) to receive San Carlos' lat/long, regardless of what country they input?

Also, I noticed an inconsistency with Matt Moody's data... :S

  • In Marketo -- country: United States of America; inferred country: Australia
  • In 'Full Details' page -- details (country): Australia; other Marketo Fields (country): United States of America

To fix this, I will:

  • Default all postalCodes of 94070 to San Carlos, CA (regardless of country)
  • Deport anyone with a null postalCode to the Island Republic of MarkLogic (sorry, Dave)
  • Jim wants a comprehensive .csv file (or some sort of file) that includes every user's country and zip code so that if there are weird bugs like this in the future, they can go ahead and edit the Marketo data