{
  "id": 21637,
  "title": "About cliente_tabla.csv duplicates",
  "url": "/competitions/grupo-bimbo-inventory-demand/discussion/21637",
  "author_name": "",
  "post_date": "2016-06-13T11:41:17.523Z",
  "votes": 4,
  "comment_count": 1,
  "views": 620,
  "content": "<p>cliente_tabla.csv contains the names of the clients against a key ID. There are duplicates, and you may wonder why.</p>\n\n<p>It is probably just a merge error for some of them. There are exactly 4862 duplicates by key:</p>\n\n<ul>\n<li>Each pair of duplicate have a normal version of the client name</li>\n<li>Each last duplicate name is previously followed (the line before) by the same client name but with double spaces</li>\n</ul>\n\n<p>Examples (ID: 2858, 3240):</p>\n\n<pre><code>2858    MISC  RAMIREZ\n2858    MISC RAMIREZ\n3240    HNOS  AMADO\n3240    HNOS AMADO\n</code></pre>\n\n<p>To find out the duplicates (if you need them), use the following script:</p>\n\n<pre><code>clients &lt;- fread(&quot;cliente_tabla.csv&quot;)\ncolnames(clients) &lt;- c(&quot;Client_ID&quot;,\n                       &quot;Client_Name&quot;)\nclient_list &lt;- clients %&gt;% count(Client_ID)\nclient_list[n &gt; 1]\n</code></pre>\n\n<p>Also, some clients may appear several times if they have several homes. Some competitors might also have the same name. This is normal in a country to have a business running under the same name as another one, or to have multiple homes (although you probably pay more local taxes in the latter :p). Regarding the latter, you have 35328 client names that are duplicated (not Client ID, i.e we do not take into account the double spaces) which you should not worry at all. In total, there are 311155 different clients (when including double space errors).</p>\n\n<p>One client name appears 281670 times, which is &quot;NO IDENTIFICADO&quot;. Regarding those who appear more than 2000 times:</p>\n\n<pre><code>      Client_Name      n\n            (chr)  (int)\n1          LUPITA   4863\n2     LA PASADITA   2426\n3            MARY   3016\n4    LA VENTANITA   2267\n5 NO IDENTIFICADO 281670\n</code></pre>\n\n<p>Run the following script to find the duplicate client names:</p>\n\n<pre><code>clients &lt;- fread(&quot;cliente_tabla.csv&quot;)\ncolnames(clients) &lt;- c(&quot;Client_ID&quot;,\n                       &quot;Client_Name&quot;)\nclient_list2 &lt;- clients %&gt;% count(Client_Name)\nclient_list2[n &gt; 1]\n</code></pre>\n\n<p>Lupita is a well known mexican restaurant. Having it showing itself 4863 times in the data set is normal.</p>\n\n<p>What I wonder is about the exploitation of this set of information. Such as:</p>\n\n<ul>\n<li>Grouping by business sector? Restaurant, shop..? Probably unfeasible due to the amount of clients you are looking at (~310K)</li>\n<li>Grouping by business type? (Limited, not limited, local, etc.) Probably not feasible too.</li>\n</ul>",
  "messages": [
    {
      "id": "123670",
      "postDate": "06/13/2016 11:41:17",
      "content": "<p>cliente_tabla.csv contains the names of the clients against a key ID. There are duplicates, and you may wonder why.</p>\n\n<p>It is probably just a merge error for some of them. There are exactly 4862 duplicates by key:</p>\n\n<ul>\n<li>Each pair of duplicate have a normal version of the client name</li>\n<li>Each last duplicate name is previously followed (the line before) by the same client name but with double spaces</li>\n</ul>\n\n<p>Examples (ID: 2858, 3240):</p>\n\n<pre><code>2858    MISC  RAMIREZ\n2858    MISC RAMIREZ\n3240    HNOS  AMADO\n3240    HNOS AMADO\n</code></pre>\n\n<p>To find out the duplicates (if you need them), use the following script:</p>\n\n<pre><code>clients &lt;- fread(&quot;cliente_tabla.csv&quot;)\ncolnames(clients) &lt;- c(&quot;Client_ID&quot;,\n                       &quot;Client_Name&quot;)\nclient_list &lt;- clients %&gt;% count(Client_ID)\nclient_list[n &gt; 1]\n</code></pre>\n\n<p>Also, some clients may appear several times if they have several homes. Some competitors might also have the same name. This is normal in a country to have a business running under the same name as another one, or to have multiple homes (although you probably pay more local taxes in the latter :p). Regarding the latter, you have 35328 client names that are duplicated (not Client ID, i.e we do not take into account the double spaces) which you should not worry at all. In total, there are 311155 different clients (when including double space errors).</p>\n\n<p>One client name appears 281670 times, which is &quot;NO IDENTIFICADO&quot;. Regarding those who appear more than 2000 times:</p>\n\n<pre><code>      Client_Name      n\n            (chr)  (int)\n1          LUPITA   4863\n2     LA PASADITA   2426\n3            MARY   3016\n4    LA VENTANITA   2267\n5 NO IDENTIFICADO 281670\n</code></pre>\n\n<p>Run the following script to find the duplicate client names:</p>\n\n<pre><code>clients &lt;- fread(&quot;cliente_tabla.csv&quot;)\ncolnames(clients) &lt;- c(&quot;Client_ID&quot;,\n                       &quot;Client_Name&quot;)\nclient_list2 &lt;- clients %&gt;% count(Client_Name)\nclient_list2[n &gt; 1]\n</code></pre>\n\n<p>Lupita is a well known mexican restaurant. Having it showing itself 4863 times in the data set is normal.</p>\n\n<p>What I wonder is about the exploitation of this set of information. Such as:</p>\n\n<ul>\n<li>Grouping by business sector? Restaurant, shop..? Probably unfeasible due to the amount of clients you are looking at (~310K)</li>\n<li>Grouping by business type? (Limited, not limited, local, etc.) Probably not feasible too.</li>\n</ul>",
      "rawMarkdown": "cliente_tabla.csv contains the names of the clients against a key ID. There are duplicates, and you may wonder why.\r\n\r\nIt is probably just a merge error for some of them. There are exactly 4862 duplicates by key:\r\n\r\n* Each pair of duplicate have a normal version of the client name\r\n* Each last duplicate name is previously followed (the line before) by the same client name but with double spaces\r\n\r\nExamples (ID: 2858, 3240):\r\n\r\n    2858\tMISC  RAMIREZ\r\n    2858\tMISC RAMIREZ\r\n    3240\tHNOS  AMADO\r\n    3240\tHNOS AMADO\r\n\r\nTo find out the duplicates (if you need them), use the following script:\r\n\r\n    clients <- fread(\"cliente_tabla.csv\")\r\n    colnames(clients) <- c(\"Client_ID\",\r\n                           \"Client_Name\")\r\n    client_list <- clients %>% count(Client_ID)\r\n    client_list[n > 1]\r\n\r\nAlso, some clients may appear several times if they have several homes. Some competitors might also have the same name. This is normal in a country to have a business running under the same name as another one, or to have multiple homes (although you probably pay more local taxes in the latter :p). Regarding the latter, you have 35328 client names that are duplicated (not Client ID, i.e we do not take into account the double spaces) which you should not worry at all. In total, there are 311155 different clients (when including double space errors).\r\n\r\nOne client name appears 281670 times, which is \"NO IDENTIFICADO\". Regarding those who appear more than 2000 times:\r\n\r\n          Client_Name      n\r\n                (chr)  (int)\r\n    1          LUPITA   4863\r\n    2     LA PASADITA   2426\r\n    3            MARY   3016\r\n    4    LA VENTANITA   2267\r\n    5 NO IDENTIFICADO 281670\r\n\r\nRun the following script to find the duplicate client names:\r\n\r\n    clients <- fread(\"cliente_tabla.csv\")\r\n    colnames(clients) <- c(\"Client_ID\",\r\n                           \"Client_Name\")\r\n    client_list2 <- clients %>% count(Client_Name)\r\n    client_list2[n > 1]\r\n\r\nLupita is a well known mexican restaurant. Having it showing itself 4863 times in the data set is normal.\r\n\r\nWhat I wonder is about the exploitation of this set of information. Such as:\r\n\r\n* Grouping by business sector? Restaurant, shop..? Probably unfeasible due to the amount of clients you are looking at (~310K)\r\n* Grouping by business type? (Limited, not limited, local, etc.) Probably not feasible too.",
      "votes": null
    },
    {
      "id": "124321",
      "postDate": "06/17/2016 06:15:39",
      "content": "<p>&quot;NO IDENTIFICADO&quot; (translates to &quot;Not identified&quot;) and &quot;SIN NOMBRE&quot; (&quot;No name&quot;) could be, IMO, categorized as NaN.</p>",
      "rawMarkdown": "\"NO IDENTIFICADO\" (translates to \"Not identified\") and \"SIN NOMBRE\" (\"No name\") could be, IMO, categorized as NaN.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 124321,
      "author_name": "gcmartinelli",
      "author_url": "",
      "post_date": "06/17/2016 06:15:39",
      "content": "<p>&quot;NO IDENTIFICADO&quot; (translates to &quot;Not identified&quot;) and &quot;SIN NOMBRE&quot; (&quot;No name&quot;) could be, IMO, categorized as NaN.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "123670": "cliente_tabla.csv contains the names of the clients against a key ID. There are duplicates, and you may wonder why.\r\n\r\nIt is probably just a merge error for some of them. There are exactly 4862 duplicates by key:\r\n\r\n* Each pair of duplicate have a normal version of the client name\r\n* Each last duplicate name is previously followed (the line before) by the same client name but with double spaces\r\n\r\nExamples (ID: 2858, 3240):\r\n\r\n    2858\tMISC  RAMIREZ\r\n    2858\tMISC RAMIREZ\r\n    3240\tHNOS  AMADO\r\n    3240\tHNOS AMADO\r\n\r\nTo find out the duplicates (if you need them), use the following script:\r\n\r\n    clients <- fread(\"cliente_tabla.csv\")\r\n    colnames(clients) <- c(\"Client_ID\",\r\n                           \"Client_Name\")\r\n    client_list <- clients %>% count(Client_ID)\r\n    client_list[n > 1]\r\n\r\nAlso, some clients may appear several times if they have several homes. Some competitors might also have the same name. This is normal in a country to have a business running under the same name as another one, or to have multiple homes (although you probably pay more local taxes in the latter :p). Regarding the latter, you have 35328 client names that are duplicated (not Client ID, i.e we do not take into account the double spaces) which you should not worry at all. In total, there are 311155 different clients (when including double space errors).\r\n\r\nOne client name appears 281670 times, which is \"NO IDENTIFICADO\". Regarding those who appear more than 2000 times:\r\n\r\n          Client_Name      n\r\n                (chr)  (int)\r\n    1          LUPITA   4863\r\n    2     LA PASADITA   2426\r\n    3            MARY   3016\r\n    4    LA VENTANITA   2267\r\n    5 NO IDENTIFICADO 281670\r\n\r\nRun the following script to find the duplicate client names:\r\n\r\n    clients <- fread(\"cliente_tabla.csv\")\r\n    colnames(clients) <- c(\"Client_ID\",\r\n                           \"Client_Name\")\r\n    client_list2 <- clients %>% count(Client_Name)\r\n    client_list2[n > 1]\r\n\r\nLupita is a well known mexican restaurant. Having it showing itself 4863 times in the data set is normal.\r\n\r\nWhat I wonder is about the exploitation of this set of information. Such as:\r\n\r\n* Grouping by business sector? Restaurant, shop..? Probably unfeasible due to the amount of clients you are looking at (~310K)\r\n* Grouping by business type? (Limited, not limited, local, etc.) Probably not feasible too.",
    "124321": "\"NO IDENTIFICADO\" (translates to \"Not identified\") and \"SIN NOMBRE\" (\"No name\") could be, IMO, categorized as NaN."
  },
  "source": "meta"
}