I created a bunch of time intervals in a file geodatabase with the intention of using them in Torque to create an animation based on those time intervals. However I can't upload a .gdb to my visualisation in CartoDB right? So I exported my .gdb features to shapefiles but, ahhh, shapefiles do not store times! I tried converting my time intervals to integers thinking I was clever but then my animation has annoying pauses when one hour changes to the next such as from 10.59 to 11 and since that is the actual time that I would want to show on the time slider I really can't change it.

For now my animation Time Column is set to the UID which is in sequential order according to the times so it looks alright but its not what I was hoping for. There is no way to see the progression of time on my map. Lastly I am using the Torque CAT option because I have several events happening that start at different times albeit on the same day and sometimes these events overlap as well - so you see I really need to be able to use my time intervals to achieve the desired effect.

  • How about using 1 day = 1.0, where 0.0 is midnight on the start of the day, 0.5 is 12:00 (noon), and 1.0 is midnight at the end of the day? You can even make 2.0 the next day, if your animation spans several days. – Mike T Feb 12 '15 at 2:55
  • Thanks but I need to preserve the actual times. I want to be able to set the 'Time Column' in Torque CAT to use the times to generate the animation and to show on the time slider on the map. – GIS Adjunct in Training Feb 12 '15 at 3:45
  • I am revisiting this with my new class. The slider that is added to the map by default when you use Torque CAT is showing the wrong times. My time column begins like so: 2016-02-09T10:30:00Z. However the slider on the map starts at 02/08/2016 19:00. Obviously the way I have my times formatted is mismatched with what cartodb expects to see. How can I set it up so it starts at 02/08/16 10:30? – GIS Adjunct in Training Feb 2 '16 at 20:32
  • It miiiight have to do with timezones (but these gaps seem large) CartoDB respects the timezones of input data, and any data that omits timezones (I think) it sets to GMT. However, with Torque, it then will be relative to the viewer. So something that happens at noon GMT in your data, if I view the map from NYC really happened at GMT -5, or 7am. It is a tricky thing, to choose whether the map is in the timezone of the data or in the timezone of the viewer. CartoDB, like many other tools, goes with the timezone of the viewer. – andrewxhill Feb 9 '16 at 15:12
  • One other thing, maybe to double check. Go to the table view of your data, click the dropdown on the time column, and do and order by ASC. Make sure that your minimum time isn't really earlier. – andrewxhill Feb 9 '16 at 15:13

Ok so I found a cheat! I created a string field in my feature class (in the .gdb) and copied the values from my date field into the new string field (Ex: 17/02/2015 13:30:45). Then I altered the string so it matched the date format in CartoDB's Data View (2015-02-17T13:30:45Z) which is a SQL format for date-time I presume. I then exported my feature class as a shapefile, zipped it up and brought it into CartoDB for the umpteenth time. Then I changed the data type from string to date in the CartoDB table (data view) and all values were preserved! I was able to select my new date-time field in Torque and here is the result: http://cdb.io/1zYymVG

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.