{
  "id": 21833,
  "title": "Location Help",
  "url": "/competitions/facebook-v-predicting-check-ins/discussion/21833",
  "author_name": "",
  "post_date": "2016-06-21T23:55:49.360Z",
  "votes": null,
  "comment_count": 2,
  "views": 360,
  "content": "<p>Hopefully this helps others on a path(please let me know if this is the wrong path)!\nI think I might have figured out the coordinates of the 100k locations, simply put it's the x and y coordinates at 5 meters (accuracy) or less.  (my assumption is that accuracy is in meters, and the x and y coordinates are in kilometers 10x10 kilometers is 6x6 miles just about the same size as San Francisco).  I chose 5 meters b/c supposedly that is the generally accuracy of phone GPS's.</p>\n\n<p>Once you have this you can than layer on all of the other data points with their innacuracies and assign each location an amount of checkins.</p>\n\n<p>library(data.table)\ntrain &lt;- read.csv(train.file, stringsAsFactors=F)\ntest &lt;- read.csv(test.file, stringsAsFactors=F)\ntrainDT&lt;-as.data.table(train)</p>\n\n#\n\n<h2>ESTABLISH EXACT LOCATION OF PLACES</h2>\n\n#\n\n<p>placeid_loc&lt;-trainDT[accuracy&lt; 5 &amp; time &gt; 0,.(x= median(x),y= median(y),accuracy=median(accuracy), time= max(time)),by = place_id]\nplaceid_loc</p>",
  "messages": [
    {
      "id": "124752",
      "postDate": "06/21/2016 23:55:49",
      "content": "<p>Hopefully this helps others on a path(please let me know if this is the wrong path)!\nI think I might have figured out the coordinates of the 100k locations, simply put it's the x and y coordinates at 5 meters (accuracy) or less.  (my assumption is that accuracy is in meters, and the x and y coordinates are in kilometers 10x10 kilometers is 6x6 miles just about the same size as San Francisco).  I chose 5 meters b/c supposedly that is the generally accuracy of phone GPS's.</p>\n\n<p>Once you have this you can than layer on all of the other data points with their innacuracies and assign each location an amount of checkins.</p>\n\n<p>library(data.table)\ntrain &lt;- read.csv(train.file, stringsAsFactors=F)\ntest &lt;- read.csv(test.file, stringsAsFactors=F)\ntrainDT&lt;-as.data.table(train)</p>\n\n#\n\n<h2>ESTABLISH EXACT LOCATION OF PLACES</h2>\n\n#\n\n<p>placeid_loc&lt;-trainDT[accuracy&lt; 5 &amp; time &gt; 0,.(x= median(x),y= median(y),accuracy=median(accuracy), time= max(time)),by = place_id]\nplaceid_loc</p>",
      "rawMarkdown": "Hopefully this helps others on a path(please let me know if this is the wrong path)!\r\nI think I might have figured out the coordinates of the 100k locations, simply put it's the x and y coordinates at 5 meters (accuracy) or less.  (my assumption is that accuracy is in meters, and the x and y coordinates are in kilometers 10x10 kilometers is 6x6 miles just about the same size as San Francisco).  I chose 5 meters b/c supposedly that is the generally accuracy of phone GPS's.\r\n\r\nOnce you have this you can than layer on all of the other data points with their innacuracies and assign each location an amount of checkins.\r\n\r\nlibrary(data.table)\r\ntrain <- read.csv(train.file, stringsAsFactors=F)\r\ntest <- read.csv(test.file, stringsAsFactors=F)\r\ntrainDT<-as.data.table(train)\r\n\r\n#################################\r\n##ESTABLISH EXACT LOCATION OF PLACES##\r\n#################################\r\n\r\nplaceid_loc<-trainDT[accuracy< 5 & time > 0,.(x= median(x),y= median(y),accuracy=median(accuracy), time= max(time)),by = place_id]\r\nplaceid_loc",
      "votes": null
    },
    {
      "id": "124754",
      "postDate": "06/22/2016 01:06:17",
      "content": "<p>Hi tmamiya</p>\n\n<p>It looks to me like larger values of accuracy are more indicative.</p>\n\n<p>Have a look at the plots of x and y vs accuracy for a few place_ids here:</p>\n\n<p><a href=\"https://www.kaggle.com/srimalj/facebook-v-predicting-check-ins/accuracy/output\">https://www.kaggle.com/srimalj/facebook-v-predicting-check-ins/accuracy/output</a></p>\n\n<p>It looks like the x values for lower accuracy values are more scattered.</p>\n\n<p>Something like the 50% of data with the largest accuracy values seem to focus better on x,y locations.</p>\n\n<p>I'm not sure what units accuracy is in but if it was the distance to the place, then we should observe the inverse of the above.</p>\n\n<p>Also x values seem to be more scattered than the y values - there were probably roads along the x  values where peopled would move about?</p>",
      "rawMarkdown": "Hi tmamiya\r\n\r\nIt looks to me like larger values of accuracy are more indicative.\r\n\r\nHave a look at the plots of x and y vs accuracy for a few place_ids here:\r\n\r\nhttps://www.kaggle.com/srimalj/facebook-v-predicting-check-ins/accuracy/output\r\n\r\nIt looks like the x values for lower accuracy values are more scattered.\r\n\r\nSomething like the 50% of data with the largest accuracy values seem to focus better on x,y locations.\r\n\r\nI'm not sure what units accuracy is in but if it was the distance to the place, then we should observe the inverse of the above.\r\n\r\nAlso x values seem to be more scattered than the y values - there were probably roads along the x  values where peopled would move about?",
      "votes": null
    },
    {
      "id": "124767",
      "postDate": "06/22/2016 05:03:38",
      "content": "<p>I think it took the median value of x and y, so it does not matter</p>",
      "rawMarkdown": "I think it took the median value of x and y, so it does not matter",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 124754,
      "author_name": "srimalj",
      "author_url": "",
      "post_date": "06/22/2016 01:06:17",
      "content": "<p>Hi tmamiya</p>\n\n<p>It looks to me like larger values of accuracy are more indicative.</p>\n\n<p>Have a look at the plots of x and y vs accuracy for a few place_ids here:</p>\n\n<p><a href=\"https://www.kaggle.com/srimalj/facebook-v-predicting-check-ins/accuracy/output\">https://www.kaggle.com/srimalj/facebook-v-predicting-check-ins/accuracy/output</a></p>\n\n<p>It looks like the x values for lower accuracy values are more scattered.</p>\n\n<p>Something like the 50% of data with the largest accuracy values seem to focus better on x,y locations.</p>\n\n<p>I'm not sure what units accuracy is in but if it was the distance to the place, then we should observe the inverse of the above.</p>\n\n<p>Also x values seem to be more scattered than the y values - there were probably roads along the x  values where peopled would move about?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 124767,
      "author_name": "arthurlu",
      "author_url": "",
      "post_date": "06/22/2016 05:03:38",
      "content": "<p>I think it took the median value of x and y, so it does not matter</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "124752": "Hopefully this helps others on a path(please let me know if this is the wrong path)!\r\nI think I might have figured out the coordinates of the 100k locations, simply put it's the x and y coordinates at 5 meters (accuracy) or less.  (my assumption is that accuracy is in meters, and the x and y coordinates are in kilometers 10x10 kilometers is 6x6 miles just about the same size as San Francisco).  I chose 5 meters b/c supposedly that is the generally accuracy of phone GPS's.\r\n\r\nOnce you have this you can than layer on all of the other data points with their innacuracies and assign each location an amount of checkins.\r\n\r\nlibrary(data.table)\r\ntrain <- read.csv(train.file, stringsAsFactors=F)\r\ntest <- read.csv(test.file, stringsAsFactors=F)\r\ntrainDT<-as.data.table(train)\r\n\r\n#################################\r\n##ESTABLISH EXACT LOCATION OF PLACES##\r\n#################################\r\n\r\nplaceid_loc<-trainDT[accuracy< 5 & time > 0,.(x= median(x),y= median(y),accuracy=median(accuracy), time= max(time)),by = place_id]\r\nplaceid_loc",
    "124754": "Hi tmamiya\r\n\r\nIt looks to me like larger values of accuracy are more indicative.\r\n\r\nHave a look at the plots of x and y vs accuracy for a few place_ids here:\r\n\r\nhttps://www.kaggle.com/srimalj/facebook-v-predicting-check-ins/accuracy/output\r\n\r\nIt looks like the x values for lower accuracy values are more scattered.\r\n\r\nSomething like the 50% of data with the largest accuracy values seem to focus better on x,y locations.\r\n\r\nI'm not sure what units accuracy is in but if it was the distance to the place, then we should observe the inverse of the above.\r\n\r\nAlso x values seem to be more scattered than the y values - there were probably roads along the x  values where peopled would move about?",
    "124767": "I think it took the median value of x and y, so it does not matter"
  },
  "source": "meta"
}