{
  "id": 20216,
  "title": "Do the mappings of user_location_country_id and  hotel_country_id resolve to the same country ?",
  "url": "/competitions/expedia-hotel-recommendations/discussion/20216",
  "author_name": "",
  "post_date": "2016-04-18T09:30:41.717Z",
  "votes": 1,
  "comment_count": 16,
  "views": 1801,
  "content": "<p>For example, I would like to determine if a search/booking was domestic or international</p>\n\n<p>Regards</p>\n\n<p>Steve</p>",
  "messages": [
    {
      "id": "115351",
      "postDate": "04/18/2016 09:30:41",
      "content": "<p>For example, I would like to determine if a search/booking was domestic or international</p>\n\n<p>Regards</p>\n\n<p>Steve</p>",
      "rawMarkdown": "For example, I would like to determine if a search/booking was domestic or international\r\n\r\nRegards\r\n\r\nSteve",
      "votes": null
    },
    {
      "id": "115352",
      "postDate": "04/18/2016 09:39:12",
      "content": "<p>You may check the distance when countries match or not.</p>",
      "rawMarkdown": "You may check the distance when countries match or not.",
      "votes": null
    },
    {
      "id": "115465",
      "postDate": "04/18/2016 19:16:49",
      "content": "<p>For the vast majority of cases mappings of user_location_country_id and hotel_country_id resolve to the same country.</p>\n\n<p>Adam</p>",
      "rawMarkdown": "For the vast majority of cases mappings of user_location_country_id and hotel_country_id resolve to the same country.\r\n\r\nAdam",
      "votes": null
    },
    {
      "id": "115845",
      "postDate": "04/20/2016 12:56:23",
      "content": "<p>[quote=Marcin P&#281;kalski;115352]</p>\n\n<p>You may check the distance when countries match or not.</p>\n\n<p>[/quote]</p>\n\n<p>I tried to do that, but found that distances did not match for most of the time. Two things came to my mind to explain this:</p>\n\n<ul>\n<li>Ids are not the same;</li>\n<li>The location of users from one country is not the destination for users going to theirs country (e.g: NY people may like to travel to Paris, but people from Paris may prefer to travel to California);</li>\n</ul>\n\n<p>Here is a sample of the source-destination (and the opposite) with the average distance for each case:</p>\n\n<pre>(000 - 001) =  2465.6 | (001 - 000) =  1533.5\n(000 - 046) =  4089.5 | (046 - 000) =  1826.3\n(000 - 063) =  6130.7 | (063 - 000) =  1767.0\n(000 - 077) =  4556.7 | (077 - 000) =  8451.5\n(000 - 141) =  2106.9 | (141 - 000) =  2558.5\n(000 - 182) =  1886.3 | (182 - 000) =  6525.7\n(001 - 000) =  1533.5 | (000 - 001) =  2465.6\n(001 - 046) =   267.7 | (046 - 001) =  1911.5\n(001 - 055) =  4672.5 | (055 - 001) =  2326.6\n(001 - 063) =  9721.0 | (063 - 001) =  1839.2\n(001 - 066) =  4564.1 | (066 - 001) =  6526.3\n(001 - 069) =  2330.9 | (069 - 001) =  2329.4\n(001 - 077) =   834.2 | (077 - 001) =  8518.8\n(001 - 182) =  5639.8 | (182 - 001) =  6332.6\n(001 - 205) =  2655.1 | (205 - 001) =  6013.2\n(016 - 077) =  4771.2 | (077 - 016) =  1219.0\n(031 - 077) =  1329.3 | (077 - 031) = 10496.2\n(035 - 077) =  2687.9 | (077 - 035) = 11174.9\n(035 - 182) =  6031.0 | (182 - 035) =  3071.9\n(043 - 046) =  1922.5 | (046 - 043) =  5408.2\n(043 - 077) =  2279.1 | (077 - 043) =  6619.5\n(043 - 182) =  3857.4 | (182 - 043) =  4963.9\n(046 - 000) =  1826.3 | (000 - 046) =  4089.5\n(046 - 001) =  1911.5 | (001 - 046) =   267.7\n(046 - 043) =  5408.2 | (043 - 046) =  1922.5\n(046 - 055) =  4976.5 | (055 - 046) =   886.1\n(046 - 063) =  9825.3 | (063 - 046) =   059.8\n(046 - 066) =  4599.8 | (066 - 046) =  4866.4\n(046 - 069) =  1779.9 | (069 - 046) =   501.2\n(046 - 077) =   982.7 | (077 - 046) =  9912.3\n(046 - 141) =  5717.2 | (141 - 046) =   818.4\n(046 - 182) =  5623.9 | (182 - 046) =  5846.2\n(046 - 202) =  2613.4 | (202 - 046) =  6059.4\n(046 - 205) =  2911.3 | (205 - 046) =  4265.1\n...\n</pre>",
      "rawMarkdown": "[quote=Marcin Pękalski;115352]\r\n\r\nYou may check the distance when countries match or not.\r\n\r\n[/quote]\r\n\r\nI tried to do that, but found that distances did not match for most of the time. Two things came to my mind to explain this:\r\n\r\n- Ids are not the same;\r\n- The location of users from one country is not the destination for users going to theirs country (e.g: NY people may like to travel to Paris, but people from Paris may prefer to travel to California);\r\n\r\nHere is a sample of the source-destination (and the opposite) with the average distance for each case:\r\n<pre>(000 - 001) =  2465.6 | (001 - 000) =  1533.5\r\n(000 - 046) =  4089.5 | (046 - 000) =  1826.3\r\n(000 - 063) =  6130.7 | (063 - 000) =  1767.0\r\n(000 - 077) =  4556.7 | (077 - 000) =  8451.5\r\n(000 - 141) =  2106.9 | (141 - 000) =  2558.5\r\n(000 - 182) =  1886.3 | (182 - 000) =  6525.7\r\n(001 - 000) =  1533.5 | (000 - 001) =  2465.6\r\n(001 - 046) =   267.7 | (046 - 001) =  1911.5\r\n(001 - 055) =  4672.5 | (055 - 001) =  2326.6\r\n(001 - 063) =  9721.0 | (063 - 001) =  1839.2\r\n(001 - 066) =  4564.1 | (066 - 001) =  6526.3\r\n(001 - 069) =  2330.9 | (069 - 001) =  2329.4\r\n(001 - 077) =   834.2 | (077 - 001) =  8518.8\r\n(001 - 182) =  5639.8 | (182 - 001) =  6332.6\r\n(001 - 205) =  2655.1 | (205 - 001) =  6013.2\r\n(016 - 077) =  4771.2 | (077 - 016) =  1219.0\r\n(031 - 077) =  1329.3 | (077 - 031) = 10496.2\r\n(035 - 077) =  2687.9 | (077 - 035) = 11174.9\r\n(035 - 182) =  6031.0 | (182 - 035) =  3071.9\r\n(043 - 046) =  1922.5 | (046 - 043) =  5408.2\r\n(043 - 077) =  2279.1 | (077 - 043) =  6619.5\r\n(043 - 182) =  3857.4 | (182 - 043) =  4963.9\r\n(046 - 000) =  1826.3 | (000 - 046) =  4089.5\r\n(046 - 001) =  1911.5 | (001 - 046) =   267.7\r\n(046 - 043) =  5408.2 | (043 - 046) =  1922.5\r\n(046 - 055) =  4976.5 | (055 - 046) =   886.1\r\n(046 - 063) =  9825.3 | (063 - 046) =   059.8\r\n(046 - 066) =  4599.8 | (066 - 046) =  4866.4\r\n(046 - 069) =  1779.9 | (069 - 046) =   501.2\r\n(046 - 077) =   982.7 | (077 - 046) =  9912.3\r\n(046 - 141) =  5717.2 | (141 - 046) =   818.4\r\n(046 - 182) =  5623.9 | (182 - 046) =  5846.2\r\n(046 - 202) =  2613.4 | (202 - 046) =  6059.4\r\n(046 - 205) =  2911.3 | (205 - 046) =  4265.1\r\n...\r\n</pre>",
      "votes": null
    },
    {
      "id": "115848",
      "postDate": "04/20/2016 13:09:28",
      "content": "<p>Ups, yes, you're right, my bad.</p>\n\n<p>The underlying country names are the same, but the way these names were hashed is different. It means that you cannot use user_location_country_id and hotel_country_id to infer if a trip was domestic or international.</p>\n\n<p>Sorry about that.</p>\n\n<p>Adam</p>",
      "rawMarkdown": "Ups, yes, you're right, my bad.\r\n\r\nThe underlying country names are the same, but the way these names were hashed is different. It means that you cannot use user_location_country_id and hotel_country_id to infer if a trip was domestic or international.\r\n\r\nSorry about that.\r\n\r\nAdam",
      "votes": null
    },
    {
      "id": "115851",
      "postDate": "04/20/2016 13:17:18",
      "content": "<p>Thanks for clarification Adam!</p>\n\n<p>One more question: the same is valid for fields <code>srch_destination_id</code> and <code>user_location_city</code> (ids did not match)?</p>",
      "rawMarkdown": "Thanks for clarification Adam!\r\n\r\nOne more question: the same is valid for fields `srch_destination_id` and `user_location_city` (ids did not match)?",
      "votes": null
    },
    {
      "id": "115852",
      "postDate": "04/20/2016 13:20:05",
      "content": "<p>Correct, in general these ids don't match (in this case the underlying names were different in the first place).</p>\n\n<p>Adam</p>",
      "rawMarkdown": "Correct, in general these ids don't match (in this case the underlying names were different in the first place).\r\n\r\nAdam",
      "votes": null
    },
    {
      "id": "116181",
      "postDate": "04/22/2016 12:47:13",
      "content": "<p>Two more questions:</p>\n\n<p>Do ids match between different <strong>site_names</strong>?</p>\n\n<p>Similar question about continents, would Europe in <strong>posa_continent</strong> have the same id like Europe in <strong>hotel_continent</strong>?</p>",
      "rawMarkdown": "Two more questions:\r\n\r\nDo ids match between different **site_names**?\r\n\r\nSimilar question about continents, would Europe in **posa_continent** have the same id like Europe in **hotel_continent**?",
      "votes": null
    },
    {
      "id": "116182",
      "postDate": "04/22/2016 12:53:10",
      "content": "<ol>\n<li>Not sure I understand.</li>\n<li>No, but you can assume that posa_continent sorted by popularity (e.g. # of bookings) match to hotel_continent sorted by popularity (e.g. # of bookings).</li>\n</ol>",
      "rawMarkdown": "1. Not sure I understand.\r\n2. No, but you can assume that posa_continent sorted by popularity (e.g. # of bookings) match to hotel_continent sorted by popularity (e.g. # of bookings).",
      "votes": null
    },
    {
      "id": "116184",
      "postDate": "04/22/2016 13:00:47",
      "content": "<ol>\n<li>if you take expedia.co.uk and expedia.com, would they have the same id for Germany, or country encoding was prepared separately and then the data were unioned into one set?</li>\n</ol>",
      "rawMarkdown": "1. if you take expedia.co.uk and expedia.com, would they have the same id for Germany, or country encoding was prepared separately and then the data were unioned into one set?",
      "votes": null
    },
    {
      "id": "116186",
      "postDate": "04/22/2016 13:03:21",
      "content": "<p>expedia.de will have a different encoding than &quot;Germany&quot;, and expedia.co.uk will have a different encoding than &quot;UK&quot;.</p>",
      "rawMarkdown": "expedia.de will have a different encoding than \"Germany\", and expedia.co.uk will have a different encoding than \"UK\".",
      "votes": null
    },
    {
      "id": "116207",
      "postDate": "04/22/2016 14:31:15",
      "content": "<p>I see we have a problem in communication. :) </p>\n\n<p>So lets look an example here</p>\n\n<pre><code>site_name   |   srch_destination_id\n1           |    3\n2           |    3\n</code></pre>\n\n<p>is 3 in the srch_destination_id the same country for both site_name 1 and 2?\nor in one case it could be UK and in another Germany.</p>",
      "rawMarkdown": "I see we have a problem in communication. :) \r\n\r\nSo lets look an example here\r\n\r\n    site_name   |   srch_destination_id\r\n    1           |    3\r\n    2           |    3\r\n\r\nis 3 in the srch_destination_id the same country for both site_name 1 and 2?\r\nor in one case it could be UK and in another Germany.",
      "votes": null
    },
    {
      "id": "116209",
      "postDate": "04/22/2016 14:40:41",
      "content": "<p>First, srch_destination_id in general is not a country, it's usually something like &quot;New York&quot;, &quot;London&quot;, etc.\nAlso, you can look for the same srch_destination_id (e.g. &quot;London&quot;) from different site_name (e.g. expedia.com and expedia.co.uk).</p>\n\n<p>Does it answer your question?</p>",
      "rawMarkdown": "First, srch_destination_id in general is not a country, it's usually something like \"New York\", \"London\", etc.\r\nAlso, you can look for the same srch_destination_id (e.g. \"London\") from different site_name (e.g. expedia.com and expedia.co.uk).\r\n\r\nDoes it answer your question?",
      "votes": null
    },
    {
      "id": "116216",
      "postDate": "04/22/2016 15:13:11",
      "content": "<p>You answered the question I wrote, but I wanted to ask about something different. :D</p>\n\n<p>I mixed up the columns. :(\nI wanted to ask about <strong>user_location_country</strong> not  <strong>srch_destination_id</strong>.</p>",
      "rawMarkdown": "You answered the question I wrote, but I wanted to ask about something different. :D\r\n\r\nI mixed up the columns. :(\r\nI wanted to ask about **user_location_country** not  **srch_destination_id**.",
      "votes": null
    },
    {
      "id": "116218",
      "postDate": "04/22/2016 15:15:58",
      "content": "<p>So the answer will be similar: user_location_country is something like (e.g. &quot;UK&quot;, &quot;Germany&quot;) and from a given user_location_country you can search different srch_destination_id (e.g. &quot;New York&quot;, &quot;London&quot;).</p>",
      "rawMarkdown": "So the answer will be similar: user_location_country is something like (e.g. \"UK\", \"Germany\") and from a given user_location_country you can search different srch_destination_id (e.g. \"New York\", \"London\").",
      "votes": null
    },
    {
      "id": "117213",
      "postDate": "04/27/2016 22:29:22",
      "content": "<p>[quote=Adam;116186]</p>\n\n<p>expedia.de will have a different encoding than &quot;Germany&quot;, and expedia.co.uk will have a different encoding than &quot;UK&quot;.</p>\n\n<p>[/quote]</p>\n\n<p>Hi Adam,</p>\n\n<p>The above statement is a bit confusing and hence unclear.\nSo I have a simple query. Say for example:</p>\n\n<pre><code>Original Data: (Data hidden from us)\nsite_name: 1 (&quot;expedia.co.uk&quot;) | srch_destination_id: 3 (&quot;London&quot;), ...\nsite_name: 2 (&quot;expedia.de&quot;)    | srch_destination_id: 3 (&quot;New York&quot;), ...\n\nTraining/Testing Data: (Data that we have)\nsite_name | srch_destination_id\n1         | 3\n2         | 3\n</code></pre>\n\n<p>Now  as we can see different sites have their own conventions of categorizing the data. For &quot;expedia.co.uk&quot; &quot;srch_destination_id&quot;'s category 3 is &quot;London&quot; but for &quot;expedia.com&quot; &quot;srch_destination_id&quot;'s category 3 is &quot;New York&quot;. So I would like to know whether these category (here &quot;srch_destination_id&quot;) values is site specific or constant across all sites? </p>",
      "rawMarkdown": "[quote=Adam;116186]\r\n\r\nexpedia.de will have a different encoding than \"Germany\", and expedia.co.uk will have a different encoding than \"UK\".\r\n\r\n[/quote]\r\n\r\nHi Adam,\r\n\r\nThe above statement is a bit confusing and hence unclear.\r\nSo I have a simple query. Say for example:\r\n\r\n    Original Data: (Data hidden from us)\r\n    site_name: 1 (\"expedia.co.uk\") | srch_destination_id: 3 (\"London\"), ...\r\n    site_name: 2 (\"expedia.de\")    | srch_destination_id: 3 (\"New York\"), ...\r\n\r\n    Training/Testing Data: (Data that we have)\r\n    site_name | srch_destination_id\r\n    1         | 3\r\n    2         | 3\r\n\r\nNow  as we can see different sites have their own conventions of categorizing the data. For \"expedia.co.uk\" \"srch_destination_id\"'s category 3 is \"London\" but for \"expedia.com\" \"srch_destination_id\"'s category 3 is \"New York\". So I would like to know whether these category (here \"srch_destination_id\") values is site specific or constant across all sites?",
      "votes": null
    },
    {
      "id": "117255",
      "postDate": "04/28/2016 06:43:32",
      "content": "<p>All categories are constant across all sites, i.e. &quot;srch_destination_id&quot;'s category 3 is &quot;New York&quot; no matter what are the other attributes. </p>",
      "rawMarkdown": "All categories are constant across all sites, i.e. \"srch_destination_id\"'s category 3 is \"New York\" no matter what are the other attributes.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 115352,
      "author_name": "mpekalski",
      "author_url": "",
      "post_date": "04/18/2016 09:39:12",
      "content": "<p>You may check the distance when countries match or not.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 115465,
      "author_name": "adamwoz",
      "author_url": "",
      "post_date": "04/18/2016 19:16:49",
      "content": "<p>For the vast majority of cases mappings of user_location_country_id and hotel_country_id resolve to the same country.</p>\n\n<p>Adam</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 115845,
      "author_name": "bguberfain",
      "author_url": "",
      "post_date": "04/20/2016 12:56:23",
      "content": "<p>[quote=Marcin P&#281;kalski;115352]</p>\n\n<p>You may check the distance when countries match or not.</p>\n\n<p>[/quote]</p>\n\n<p>I tried to do that, but found that distances did not match for most of the time. Two things came to my mind to explain this:</p>\n\n<ul>\n<li>Ids are not the same;</li>\n<li>The location of users from one country is not the destination for users going to theirs country (e.g: NY people may like to travel to Paris, but people from Paris may prefer to travel to California);</li>\n</ul>\n\n<p>Here is a sample of the source-destination (and the opposite) with the average distance for each case:</p>\n\n<pre>(000 - 001) =  2465.6 | (001 - 000) =  1533.5\n(000 - 046) =  4089.5 | (046 - 000) =  1826.3\n(000 - 063) =  6130.7 | (063 - 000) =  1767.0\n(000 - 077) =  4556.7 | (077 - 000) =  8451.5\n(000 - 141) =  2106.9 | (141 - 000) =  2558.5\n(000 - 182) =  1886.3 | (182 - 000) =  6525.7\n(001 - 000) =  1533.5 | (000 - 001) =  2465.6\n(001 - 046) =   267.7 | (046 - 001) =  1911.5\n(001 - 055) =  4672.5 | (055 - 001) =  2326.6\n(001 - 063) =  9721.0 | (063 - 001) =  1839.2\n(001 - 066) =  4564.1 | (066 - 001) =  6526.3\n(001 - 069) =  2330.9 | (069 - 001) =  2329.4\n(001 - 077) =   834.2 | (077 - 001) =  8518.8\n(001 - 182) =  5639.8 | (182 - 001) =  6332.6\n(001 - 205) =  2655.1 | (205 - 001) =  6013.2\n(016 - 077) =  4771.2 | (077 - 016) =  1219.0\n(031 - 077) =  1329.3 | (077 - 031) = 10496.2\n(035 - 077) =  2687.9 | (077 - 035) = 11174.9\n(035 - 182) =  6031.0 | (182 - 035) =  3071.9\n(043 - 046) =  1922.5 | (046 - 043) =  5408.2\n(043 - 077) =  2279.1 | (077 - 043) =  6619.5\n(043 - 182) =  3857.4 | (182 - 043) =  4963.9\n(046 - 000) =  1826.3 | (000 - 046) =  4089.5\n(046 - 001) =  1911.5 | (001 - 046) =   267.7\n(046 - 043) =  5408.2 | (043 - 046) =  1922.5\n(046 - 055) =  4976.5 | (055 - 046) =   886.1\n(046 - 063) =  9825.3 | (063 - 046) =   059.8\n(046 - 066) =  4599.8 | (066 - 046) =  4866.4\n(046 - 069) =  1779.9 | (069 - 046) =   501.2\n(046 - 077) =   982.7 | (077 - 046) =  9912.3\n(046 - 141) =  5717.2 | (141 - 046) =   818.4\n(046 - 182) =  5623.9 | (182 - 046) =  5846.2\n(046 - 202) =  2613.4 | (202 - 046) =  6059.4\n(046 - 205) =  2911.3 | (205 - 046) =  4265.1\n...\n</pre>",
      "votes": null,
      "replies": []
    },
    {
      "id": 115848,
      "author_name": "adamwoz",
      "author_url": "",
      "post_date": "04/20/2016 13:09:28",
      "content": "<p>Ups, yes, you're right, my bad.</p>\n\n<p>The underlying country names are the same, but the way these names were hashed is different. It means that you cannot use user_location_country_id and hotel_country_id to infer if a trip was domestic or international.</p>\n\n<p>Sorry about that.</p>\n\n<p>Adam</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 115851,
      "author_name": "bguberfain",
      "author_url": "",
      "post_date": "04/20/2016 13:17:18",
      "content": "<p>Thanks for clarification Adam!</p>\n\n<p>One more question: the same is valid for fields <code>srch_destination_id</code> and <code>user_location_city</code> (ids did not match)?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 115852,
      "author_name": "adamwoz",
      "author_url": "",
      "post_date": "04/20/2016 13:20:05",
      "content": "<p>Correct, in general these ids don't match (in this case the underlying names were different in the first place).</p>\n\n<p>Adam</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 116181,
      "author_name": "mpekalski",
      "author_url": "",
      "post_date": "04/22/2016 12:47:13",
      "content": "<p>Two more questions:</p>\n\n<p>Do ids match between different <strong>site_names</strong>?</p>\n\n<p>Similar question about continents, would Europe in <strong>posa_continent</strong> have the same id like Europe in <strong>hotel_continent</strong>?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 116182,
      "author_name": "adamwoz",
      "author_url": "",
      "post_date": "04/22/2016 12:53:10",
      "content": "<ol>\n<li>Not sure I understand.</li>\n<li>No, but you can assume that posa_continent sorted by popularity (e.g. # of bookings) match to hotel_continent sorted by popularity (e.g. # of bookings).</li>\n</ol>",
      "votes": null,
      "replies": []
    },
    {
      "id": 116184,
      "author_name": "mpekalski",
      "author_url": "",
      "post_date": "04/22/2016 13:00:47",
      "content": "<ol>\n<li>if you take expedia.co.uk and expedia.com, would they have the same id for Germany, or country encoding was prepared separately and then the data were unioned into one set?</li>\n</ol>",
      "votes": null,
      "replies": []
    },
    {
      "id": 116186,
      "author_name": "adamwoz",
      "author_url": "",
      "post_date": "04/22/2016 13:03:21",
      "content": "<p>expedia.de will have a different encoding than &quot;Germany&quot;, and expedia.co.uk will have a different encoding than &quot;UK&quot;.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 116207,
      "author_name": "mpekalski",
      "author_url": "",
      "post_date": "04/22/2016 14:31:15",
      "content": "<p>I see we have a problem in communication. :) </p>\n\n<p>So lets look an example here</p>\n\n<pre><code>site_name   |   srch_destination_id\n1           |    3\n2           |    3\n</code></pre>\n\n<p>is 3 in the srch_destination_id the same country for both site_name 1 and 2?\nor in one case it could be UK and in another Germany.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 116209,
      "author_name": "adamwoz",
      "author_url": "",
      "post_date": "04/22/2016 14:40:41",
      "content": "<p>First, srch_destination_id in general is not a country, it's usually something like &quot;New York&quot;, &quot;London&quot;, etc.\nAlso, you can look for the same srch_destination_id (e.g. &quot;London&quot;) from different site_name (e.g. expedia.com and expedia.co.uk).</p>\n\n<p>Does it answer your question?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 116216,
      "author_name": "mpekalski",
      "author_url": "",
      "post_date": "04/22/2016 15:13:11",
      "content": "<p>You answered the question I wrote, but I wanted to ask about something different. :D</p>\n\n<p>I mixed up the columns. :(\nI wanted to ask about <strong>user_location_country</strong> not  <strong>srch_destination_id</strong>.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 116218,
      "author_name": "adamwoz",
      "author_url": "",
      "post_date": "04/22/2016 15:15:58",
      "content": "<p>So the answer will be similar: user_location_country is something like (e.g. &quot;UK&quot;, &quot;Germany&quot;) and from a given user_location_country you can search different srch_destination_id (e.g. &quot;New York&quot;, &quot;London&quot;).</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 117213,
      "author_name": "guppsy",
      "author_url": "",
      "post_date": "04/27/2016 22:29:22",
      "content": "<p>[quote=Adam;116186]</p>\n\n<p>expedia.de will have a different encoding than &quot;Germany&quot;, and expedia.co.uk will have a different encoding than &quot;UK&quot;.</p>\n\n<p>[/quote]</p>\n\n<p>Hi Adam,</p>\n\n<p>The above statement is a bit confusing and hence unclear.\nSo I have a simple query. Say for example:</p>\n\n<pre><code>Original Data: (Data hidden from us)\nsite_name: 1 (&quot;expedia.co.uk&quot;) | srch_destination_id: 3 (&quot;London&quot;), ...\nsite_name: 2 (&quot;expedia.de&quot;)    | srch_destination_id: 3 (&quot;New York&quot;), ...\n\nTraining/Testing Data: (Data that we have)\nsite_name | srch_destination_id\n1         | 3\n2         | 3\n</code></pre>\n\n<p>Now  as we can see different sites have their own conventions of categorizing the data. For &quot;expedia.co.uk&quot; &quot;srch_destination_id&quot;'s category 3 is &quot;London&quot; but for &quot;expedia.com&quot; &quot;srch_destination_id&quot;'s category 3 is &quot;New York&quot;. So I would like to know whether these category (here &quot;srch_destination_id&quot;) values is site specific or constant across all sites? </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 117255,
      "author_name": "adamwoz",
      "author_url": "",
      "post_date": "04/28/2016 06:43:32",
      "content": "<p>All categories are constant across all sites, i.e. &quot;srch_destination_id&quot;'s category 3 is &quot;New York&quot; no matter what are the other attributes. </p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "115351": "For example, I would like to determine if a search/booking was domestic or international\r\n\r\nRegards\r\n\r\nSteve",
    "115352": "You may check the distance when countries match or not.",
    "115465": "For the vast majority of cases mappings of user_location_country_id and hotel_country_id resolve to the same country.\r\n\r\nAdam",
    "115845": "[quote=Marcin Pękalski;115352]\r\n\r\nYou may check the distance when countries match or not.\r\n\r\n[/quote]\r\n\r\nI tried to do that, but found that distances did not match for most of the time. Two things came to my mind to explain this:\r\n\r\n- Ids are not the same;\r\n- The location of users from one country is not the destination for users going to theirs country (e.g: NY people may like to travel to Paris, but people from Paris may prefer to travel to California);\r\n\r\nHere is a sample of the source-destination (and the opposite) with the average distance for each case:\r\n<pre>(000 - 001) =  2465.6 | (001 - 000) =  1533.5\r\n(000 - 046) =  4089.5 | (046 - 000) =  1826.3\r\n(000 - 063) =  6130.7 | (063 - 000) =  1767.0\r\n(000 - 077) =  4556.7 | (077 - 000) =  8451.5\r\n(000 - 141) =  2106.9 | (141 - 000) =  2558.5\r\n(000 - 182) =  1886.3 | (182 - 000) =  6525.7\r\n(001 - 000) =  1533.5 | (000 - 001) =  2465.6\r\n(001 - 046) =   267.7 | (046 - 001) =  1911.5\r\n(001 - 055) =  4672.5 | (055 - 001) =  2326.6\r\n(001 - 063) =  9721.0 | (063 - 001) =  1839.2\r\n(001 - 066) =  4564.1 | (066 - 001) =  6526.3\r\n(001 - 069) =  2330.9 | (069 - 001) =  2329.4\r\n(001 - 077) =   834.2 | (077 - 001) =  8518.8\r\n(001 - 182) =  5639.8 | (182 - 001) =  6332.6\r\n(001 - 205) =  2655.1 | (205 - 001) =  6013.2\r\n(016 - 077) =  4771.2 | (077 - 016) =  1219.0\r\n(031 - 077) =  1329.3 | (077 - 031) = 10496.2\r\n(035 - 077) =  2687.9 | (077 - 035) = 11174.9\r\n(035 - 182) =  6031.0 | (182 - 035) =  3071.9\r\n(043 - 046) =  1922.5 | (046 - 043) =  5408.2\r\n(043 - 077) =  2279.1 | (077 - 043) =  6619.5\r\n(043 - 182) =  3857.4 | (182 - 043) =  4963.9\r\n(046 - 000) =  1826.3 | (000 - 046) =  4089.5\r\n(046 - 001) =  1911.5 | (001 - 046) =   267.7\r\n(046 - 043) =  5408.2 | (043 - 046) =  1922.5\r\n(046 - 055) =  4976.5 | (055 - 046) =   886.1\r\n(046 - 063) =  9825.3 | (063 - 046) =   059.8\r\n(046 - 066) =  4599.8 | (066 - 046) =  4866.4\r\n(046 - 069) =  1779.9 | (069 - 046) =   501.2\r\n(046 - 077) =   982.7 | (077 - 046) =  9912.3\r\n(046 - 141) =  5717.2 | (141 - 046) =   818.4\r\n(046 - 182) =  5623.9 | (182 - 046) =  5846.2\r\n(046 - 202) =  2613.4 | (202 - 046) =  6059.4\r\n(046 - 205) =  2911.3 | (205 - 046) =  4265.1\r\n...\r\n</pre>",
    "115848": "Ups, yes, you're right, my bad.\r\n\r\nThe underlying country names are the same, but the way these names were hashed is different. It means that you cannot use user_location_country_id and hotel_country_id to infer if a trip was domestic or international.\r\n\r\nSorry about that.\r\n\r\nAdam",
    "115851": "Thanks for clarification Adam!\r\n\r\nOne more question: the same is valid for fields `srch_destination_id` and `user_location_city` (ids did not match)?",
    "115852": "Correct, in general these ids don't match (in this case the underlying names were different in the first place).\r\n\r\nAdam",
    "116181": "Two more questions:\r\n\r\nDo ids match between different **site_names**?\r\n\r\nSimilar question about continents, would Europe in **posa_continent** have the same id like Europe in **hotel_continent**?",
    "116182": "1. Not sure I understand.\r\n2. No, but you can assume that posa_continent sorted by popularity (e.g. # of bookings) match to hotel_continent sorted by popularity (e.g. # of bookings).",
    "116184": "1. if you take expedia.co.uk and expedia.com, would they have the same id for Germany, or country encoding was prepared separately and then the data were unioned into one set?",
    "116186": "expedia.de will have a different encoding than \"Germany\", and expedia.co.uk will have a different encoding than \"UK\".",
    "116207": "I see we have a problem in communication. :) \r\n\r\nSo lets look an example here\r\n\r\n    site_name   |   srch_destination_id\r\n    1           |    3\r\n    2           |    3\r\n\r\nis 3 in the srch_destination_id the same country for both site_name 1 and 2?\r\nor in one case it could be UK and in another Germany.",
    "116209": "First, srch_destination_id in general is not a country, it's usually something like \"New York\", \"London\", etc.\r\nAlso, you can look for the same srch_destination_id (e.g. \"London\") from different site_name (e.g. expedia.com and expedia.co.uk).\r\n\r\nDoes it answer your question?",
    "116216": "You answered the question I wrote, but I wanted to ask about something different. :D\r\n\r\nI mixed up the columns. :(\r\nI wanted to ask about **user_location_country** not  **srch_destination_id**.",
    "116218": "So the answer will be similar: user_location_country is something like (e.g. \"UK\", \"Germany\") and from a given user_location_country you can search different srch_destination_id (e.g. \"New York\", \"London\").",
    "117213": "[quote=Adam;116186]\r\n\r\nexpedia.de will have a different encoding than \"Germany\", and expedia.co.uk will have a different encoding than \"UK\".\r\n\r\n[/quote]\r\n\r\nHi Adam,\r\n\r\nThe above statement is a bit confusing and hence unclear.\r\nSo I have a simple query. Say for example:\r\n\r\n    Original Data: (Data hidden from us)\r\n    site_name: 1 (\"expedia.co.uk\") | srch_destination_id: 3 (\"London\"), ...\r\n    site_name: 2 (\"expedia.de\")    | srch_destination_id: 3 (\"New York\"), ...\r\n\r\n    Training/Testing Data: (Data that we have)\r\n    site_name | srch_destination_id\r\n    1         | 3\r\n    2         | 3\r\n\r\nNow  as we can see different sites have their own conventions of categorizing the data. For \"expedia.co.uk\" \"srch_destination_id\"'s category 3 is \"London\" but for \"expedia.com\" \"srch_destination_id\"'s category 3 is \"New York\". So I would like to know whether these category (here \"srch_destination_id\") values is site specific or constant across all sites?",
    "117255": "All categories are constant across all sites, i.e. \"srch_destination_id\"'s category 3 is \"New York\" no matter what are the other attributes."
  },
  "source": "meta"
}