{
  "id": 440868,
  "title": "timestamp differences in R",
  "url": "/competitions/child-mind-institute-detect-sleep-states/discussion/440868",
  "author_name": "",
  "post_date": "2023-09-16T14:06:42.346210100Z",
  "votes": 6,
  "comment_count": 4,
  "views": 0,
  "content": "<p>Working on my EDA I compared my data with several notebooks. I live in Germany in I am working with R. For the events file my first timestamp gives: <br>\n2018-08-15 02:26:00    <br>\nMarlia Prata <a href=\"https://www.kaggle.com/mpwolke\" target=\"_blank\">@mpwolke</a> <a href=\"https://www.kaggle.com/code/mpwolke/zzzs-wake-up-kagglers\" target=\"_blank\">notebook</a> gives: 2018-08-14 22:26:00 <br>\nAll timestamps have 4 hours difference. I can see the 4 hours difference after the timestamp according to ISO 8601 in Marilia's notebook:<br>\n2018-08-14T22:26:00<strong>-0400</strong>,<br>\nbut not when I read the data with read_parquet from the library(arrow).<br>\nIt's easy to add 4 hours, but any other solutions?<br>\nThanks Peter</p>",
  "messages": [
    {
      "id": "2441886",
      "postDate": "09/16/2023 14:06:42",
      "content": "<p>Working on my EDA I compared my data with several notebooks. I live in Germany in I am working with R. For the events file my first timestamp gives: <br>\n2018-08-15 02:26:00    <br>\nMarlia Prata <a href=\"https://www.kaggle.com/mpwolke\" target=\"_blank\">@mpwolke</a> <a href=\"https://www.kaggle.com/code/mpwolke/zzzs-wake-up-kagglers\" target=\"_blank\">notebook</a> gives: 2018-08-14 22:26:00 <br>\nAll timestamps have 4 hours difference. I can see the 4 hours difference after the timestamp according to ISO 8601 in Marilia's notebook:<br>\n2018-08-14T22:26:00<strong>-0400</strong>,<br>\nbut not when I read the data with read_parquet from the library(arrow).<br>\nIt's easy to add 4 hours, but any other solutions?<br>\nThanks Peter</p>",
      "rawMarkdown": "Working on my EDA I compared my data with several notebooks. I live in Germany in I am working with R. For the events file my first timestamp gives: \n2018-08-15 02:26:00\t\nMarlia Prata @mpwolke [notebook](https://www.kaggle.com/code/mpwolke/zzzs-wake-up-kagglers) gives: 2018-08-14 22:26:00 \nAll timestamps have 4 hours difference. I can see the 4 hours difference after the timestamp according to ISO 8601 in Marilia's notebook:\n2018-08-14T22:26:00**-0400**,\nbut not when I read the data with read_parquet from the library(arrow).\nIt's easy to add 4 hours, but any other solutions?\nThanks Peter",
      "votes": null
    },
    {
      "id": "2442137",
      "postDate": "09/16/2023 18:39:44",
      "content": "<p>Hi Peter,</p>\n<h1>Ryan Holbrook posted that 1 day ago: (INCORRECTLY OFFSET BY AN HOUR.)</h1>\n<p>\"There were some series affected by a bug in DST handling that caused events after a time change to be incorrectly offset by an hour. Apparently, this only affected series in which a DST occurred (that is, when the time zone offset changed from \"-400\" to \"-500\"), which is 36 series in the training set (perhaps 6% of all events).\"<br>\n<a href=\"https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/discussion/440697\" target=\"_blank\">https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/discussion/440697</a></p>\n<p>those results are on my Notebook (I Published at the beginning of the competition). However, I copied  Chun Fu that was the 1st to deliver the timestamp's parsing:</p>\n<p>By Chun Fu <a href=\"https://www.kaggle.com/code/patrick0302/viz-of-sleeping-time-series\" target=\"_blank\">https://www.kaggle.com/code/patrick0302/viz-of-sleeping-time-series</a> </p>\n<p>Those guys below, dealed with timestamps successfully too. I didn't check if there were difference of time on their work.</p>\n<p>CMI Sleep Visualization - By Connor<br>\n<a href=\"https://www.kaggle.com/code/clane9/cmi-sleep-visualization\" target=\"_blank\">https://www.kaggle.com/code/clane9/cmi-sleep-visualization</a></p>\n<p>Sleeping patterns - EDA - By Robert Kwiatkowski<br>\n<a href=\"https://www.kaggle.com/code/datark1/sleeping-patterns-eda\" target=\"_blank\">https://www.kaggle.com/code/datark1/sleeping-patterns-eda</a></p>\n<p>Xgboost Notebook Updated - By Anmar Ahmadi Qazi<br>\n<a href=\"https://www.kaggle.com/code/ammarahmadqazi/xgboost-notebook-updated\" target=\"_blank\">https://www.kaggle.com/code/ammarahmadqazi/xgboost-notebook-updated</a></p>\n<p>204_Preprocessing_Data - By Alvaro Rodriguez<br>\n<a href=\"https://www.kaggle.com/code/alvrod/204-preprocessing-data\" target=\"_blank\">https://www.kaggle.com/code/alvrod/204-preprocessing-data</a></p>\n<p>You're welcome Peter,</p>\n<p>Kind Regards,<br>\nMarília</p>",
      "rawMarkdown": "Hi Peter,\n\n#Ryan Holbrook posted that 1 day ago: (INCORRECTLY OFFSET BY AN HOUR.)\n\n\"There were some series affected by a bug in DST handling that caused events after a time change to be incorrectly offset by an hour. Apparently, this only affected series in which a DST occurred (that is, when the time zone offset changed from \"-400\" to \"-500\"), which is 36 series in the training set (perhaps 6% of all events).\"\nhttps://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/discussion/440697\n\nthose results are on my Notebook (I Published at the beginning of the competition). However, I copied  Chun Fu that was the 1st to deliver the timestamp's parsing:\n\nBy Chun Fu https://www.kaggle.com/code/patrick0302/viz-of-sleeping-time-series \n\nThose guys below, dealed with timestamps successfully too. I didn't check if there were difference of time on their work.\n\nCMI Sleep Visualization - By Connor\nhttps://www.kaggle.com/code/clane9/cmi-sleep-visualization\n\nSleeping patterns - EDA - By Robert Kwiatkowski\nhttps://www.kaggle.com/code/datark1/sleeping-patterns-eda\n\nXgboost Notebook Updated - By Anmar Ahmadi Qazi\nhttps://www.kaggle.com/code/ammarahmadqazi/xgboost-notebook-updated\n\n204_Preprocessing_Data - By Alvaro Rodriguez\nhttps://www.kaggle.com/code/alvrod/204-preprocessing-data\n\nYou're welcome Peter,\n\nKind Regards,\nMarília",
      "votes": null
    },
    {
      "id": "2442148",
      "postDate": "09/16/2023 18:59:47",
      "content": "<p>Hi Marilia,<br>\nThanks for your help. That make it more complicated for me. Reading the parquet file, I don't see the offset. If their are different offsets as you mentioned, I must figure out how to detect them. On the flip side submission requires only step not time. <br>\nKind regards<br>\nPeter<br>\nP.S. Still searching for the apostroph i on my Mac to get your name correct😘</p>",
      "rawMarkdown": "Hi Marilia,\nThanks for your help. That make it more complicated for me. Reading the parquet file, I don't see the offset. If their are different offsets as you mentioned, I must figure out how to detect them. On the flip side submission requires only step not time. \nKind regards\nPeter\nP.S. Still searching for the apostroph i on my Mac to get your name correct😘",
      "votes": null
    },
    {
      "id": "2442158",
      "postDate": "09/16/2023 19:14:19",
      "content": "<p>You can write without the accent ´   </p>\n<p>Sometimes (purchases) I avoid to type the accent cause computers don't understand, then it appears \"Marlia\" or something like that. And I'm afraid that the parcel won't be delivered. So even myself, write Marilia without the accent.</p>",
      "rawMarkdown": "You can write without the accent ´   \n\nSometimes (purchases) I avoid to type the accent cause computers don't understand, then it appears \"Marlia\" or something like that. And I'm afraid that the parcel won't be delivered. So even myself, write Marilia without the accent.",
      "votes": null
    },
    {
      "id": "2442314",
      "postDate": "09/16/2023 22:18:51",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/pehahn\" target=\"_blank\">@pehahn</a>. The ISO 8601 timestamp below is in the time zone \"EDT(-4h)\" and represents the local time 2018-08-14 22:26:00. For this sleep task, I think it would be better to use 22:26 local time.</p>\n<blockquote>\n  <p>2018-08-14T22:26:00-0400</p>\n</blockquote>",
      "rawMarkdown": "Hi @pehahn. The ISO 8601 timestamp below is in the time zone \"EDT(-4h)\" and represents the local time 2018-08-14 22:26:00. For this sleep task, I think it would be better to use 22:26 local time.\n\n> 2018-08-14T22:26:00-0400",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2442137,
      "author_name": "mpwolke",
      "author_url": "",
      "post_date": "09/16/2023 18:39:44",
      "content": "<p>Hi Peter,</p>\n<h1>Ryan Holbrook posted that 1 day ago: (INCORRECTLY OFFSET BY AN HOUR.)</h1>\n<p>\"There were some series affected by a bug in DST handling that caused events after a time change to be incorrectly offset by an hour. Apparently, this only affected series in which a DST occurred (that is, when the time zone offset changed from \"-400\" to \"-500\"), which is 36 series in the training set (perhaps 6% of all events).\"<br>\n<a href=\"https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/discussion/440697\" target=\"_blank\">https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/discussion/440697</a></p>\n<p>those results are on my Notebook (I Published at the beginning of the competition). However, I copied  Chun Fu that was the 1st to deliver the timestamp's parsing:</p>\n<p>By Chun Fu <a href=\"https://www.kaggle.com/code/patrick0302/viz-of-sleeping-time-series\" target=\"_blank\">https://www.kaggle.com/code/patrick0302/viz-of-sleeping-time-series</a> </p>\n<p>Those guys below, dealed with timestamps successfully too. I didn't check if there were difference of time on their work.</p>\n<p>CMI Sleep Visualization - By Connor<br>\n<a href=\"https://www.kaggle.com/code/clane9/cmi-sleep-visualization\" target=\"_blank\">https://www.kaggle.com/code/clane9/cmi-sleep-visualization</a></p>\n<p>Sleeping patterns - EDA - By Robert Kwiatkowski<br>\n<a href=\"https://www.kaggle.com/code/datark1/sleeping-patterns-eda\" target=\"_blank\">https://www.kaggle.com/code/datark1/sleeping-patterns-eda</a></p>\n<p>Xgboost Notebook Updated - By Anmar Ahmadi Qazi<br>\n<a href=\"https://www.kaggle.com/code/ammarahmadqazi/xgboost-notebook-updated\" target=\"_blank\">https://www.kaggle.com/code/ammarahmadqazi/xgboost-notebook-updated</a></p>\n<p>204_Preprocessing_Data - By Alvaro Rodriguez<br>\n<a href=\"https://www.kaggle.com/code/alvrod/204-preprocessing-data\" target=\"_blank\">https://www.kaggle.com/code/alvrod/204-preprocessing-data</a></p>\n<p>You're welcome Peter,</p>\n<p>Kind Regards,<br>\nMarília</p>",
      "votes": null,
      "replies": [
        {
          "id": 2442148,
          "author_name": "pehahn",
          "author_url": "",
          "post_date": "09/16/2023 18:59:47",
          "content": "<p>Hi Marilia,<br>\nThanks for your help. That make it more complicated for me. Reading the parquet file, I don't see the offset. If their are different offsets as you mentioned, I must figure out how to detect them. On the flip side submission requires only step not time. <br>\nKind regards<br>\nPeter<br>\nP.S. Still searching for the apostroph i on my Mac to get your name correct😘</p>",
          "votes": null,
          "replies": [
            {
              "id": 2442158,
              "author_name": "mpwolke",
              "author_url": "",
              "post_date": "09/16/2023 19:14:19",
              "content": "<p>You can write without the accent ´   </p>\n<p>Sometimes (purchases) I avoid to type the accent cause computers don't understand, then it appears \"Marlia\" or something like that. And I'm afraid that the parcel won't be delivered. So even myself, write Marilia without the accent.</p>",
              "votes": null,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2442314,
      "author_name": "mitsuyasuhoshino",
      "author_url": "",
      "post_date": "09/16/2023 22:18:51",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/pehahn\" target=\"_blank\">@pehahn</a>. The ISO 8601 timestamp below is in the time zone \"EDT(-4h)\" and represents the local time 2018-08-14 22:26:00. For this sleep task, I think it would be better to use 22:26 local time.</p>\n<blockquote>\n  <p>2018-08-14T22:26:00-0400</p>\n</blockquote>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2441886": "Working on my EDA I compared my data with several notebooks. I live in Germany in I am working with R. For the events file my first timestamp gives: \n2018-08-15 02:26:00\t\nMarlia Prata @mpwolke [notebook](https://www.kaggle.com/code/mpwolke/zzzs-wake-up-kagglers) gives: 2018-08-14 22:26:00 \nAll timestamps have 4 hours difference. I can see the 4 hours difference after the timestamp according to ISO 8601 in Marilia's notebook:\n2018-08-14T22:26:00**-0400**,\nbut not when I read the data with read_parquet from the library(arrow).\nIt's easy to add 4 hours, but any other solutions?\nThanks Peter",
    "2442137": "Hi Peter,\n\n#Ryan Holbrook posted that 1 day ago: (INCORRECTLY OFFSET BY AN HOUR.)\n\n\"There were some series affected by a bug in DST handling that caused events after a time change to be incorrectly offset by an hour. Apparently, this only affected series in which a DST occurred (that is, when the time zone offset changed from \"-400\" to \"-500\"), which is 36 series in the training set (perhaps 6% of all events).\"\nhttps://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/discussion/440697\n\nthose results are on my Notebook (I Published at the beginning of the competition). However, I copied  Chun Fu that was the 1st to deliver the timestamp's parsing:\n\nBy Chun Fu https://www.kaggle.com/code/patrick0302/viz-of-sleeping-time-series \n\nThose guys below, dealed with timestamps successfully too. I didn't check if there were difference of time on their work.\n\nCMI Sleep Visualization - By Connor\nhttps://www.kaggle.com/code/clane9/cmi-sleep-visualization\n\nSleeping patterns - EDA - By Robert Kwiatkowski\nhttps://www.kaggle.com/code/datark1/sleeping-patterns-eda\n\nXgboost Notebook Updated - By Anmar Ahmadi Qazi\nhttps://www.kaggle.com/code/ammarahmadqazi/xgboost-notebook-updated\n\n204_Preprocessing_Data - By Alvaro Rodriguez\nhttps://www.kaggle.com/code/alvrod/204-preprocessing-data\n\nYou're welcome Peter,\n\nKind Regards,\nMarília",
    "2442148": "Hi Marilia,\nThanks for your help. That make it more complicated for me. Reading the parquet file, I don't see the offset. If their are different offsets as you mentioned, I must figure out how to detect them. On the flip side submission requires only step not time. \nKind regards\nPeter\nP.S. Still searching for the apostroph i on my Mac to get your name correct😘",
    "2442158": "You can write without the accent ´   \n\nSometimes (purchases) I avoid to type the accent cause computers don't understand, then it appears \"Marlia\" or something like that. And I'm afraid that the parcel won't be delivered. So even myself, write Marilia without the accent.",
    "2442314": "Hi @pehahn. The ISO 8601 timestamp below is in the time zone \"EDT(-4h)\" and represents the local time 2018-08-14 22:26:00. For this sleep task, I think it would be better to use 22:26 local time.\n\n> 2018-08-14T22:26:00-0400"
  },
  "source": "meta"
}