{"id":79981,"date":"2017-10-18T08:00:55","date_gmt":"2017-10-18T08:00:55","guid":{"rendered":"http:\/\/www.esri.com\/arcgis-blog\/products\/product\/uncategorized\/unwinding-the-clock-visualizing-time-with-arcade\/"},"modified":"2024-11-11T12:39:18","modified_gmt":"2024-11-11T20:39:18","slug":"unwinding-the-clock-visualizing-time-with-arcade","status":"publish","type":"blog","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcade\/mapping\/unwinding-the-clock-visualizing-time-with-arcade","title":{"rendered":"Unwinding the Clock: Visualizing Time with Arcade"},"author":6561,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"_searchwp_excluded":""},"categories":[777102,22941],"tags":[32551,32521,24921,31311,27491,28041],"industry":[],"product":[36831,36601],"class_list":["post-79981","blog","type-blog","status-publish","format-standard","hentry","category-arcade","category-mapping","tag-arcade","tag-arcade-expressions","tag-javascript","tag-jsapi3","tag-jsapi4","tag-time","product-js-api-arcgis","product-developers"],"acf":{"short_description":"Recording times and dates can be invaluable during the data collection phase of a project. ","flexible_content":[{"acf_fc_layout":"content","content":"<p>Recording times and dates can be invaluable during the data collection phase of a project. Date data help us answer questions like, \u201cWhen did this incident occur?\u201d, \u201cHow long did it take to accomplish task A?\u201d, or \u201cWhat assets are due for inspection?\u201d <\/p>\n<p>Questions of <strong>when<\/strong> can often be answered by simply displaying the date value. Other times you may need to know <strong>how long<\/strong> or <strong>how old<\/strong>. That&#8217;s where Arcade comes in handy. <a href=\"https:\/\/developers.arcgis.com\/arcade\/guide\/\">Arcade<\/a> is an expression language used to dynamically calculate values for rendering, labeling, and popups with attribute values. Arcade executes on the client, which means you don\u2019t have to create new fields and use the field calculator to generate new values from your existing data. You can  quickly create and explore new data values on the fly.<\/p>\n<p><a href=\"http:\/\/ekenes.github.io\/esri-js-samples\/3\/visualization\/clustering\/\">Check out this app<\/a>, where I used several Arcade expressions to answer time-related questions about <a href=\"https:\/\/data.cityofnewyork.us\/dataset\/311-Service-Requests-From-2015\/57g5-etyj\">311 data in New York City<\/a>. These questions include:<\/p>\n<ul>\n<li>At what time of day was the incident reported (morning, afternoon, evening)?<\/li>\n<li>How long was the incident open at the time of its closure?<\/li>\n<li>Was the incident overdue at the time of closure? If so, by how long?<\/li>\n<\/ul>\n<h2>Date functions in Arcade<\/h2>\n<p>Arcade has several out-of-the-box date functions that simplify the process for answering these questions. Functions such as <a href=\"https:\/\/developers.arcgis.com\/arcade\/function-reference\/date_functions\/#dateadd\">DateAdd()<\/a>, <a href=\"https:\/\/developers.arcgis.com\/arcade\/function-reference\/date_functions\/#datediff\">DateDiff()<\/a>, <a href=\"https:\/\/developers.arcgis.com\/arcade\/function-reference\/date_functions\/#toutc\">toUTC()<\/a>, <a href=\"https:\/\/developers.arcgis.com\/arcade\/function-reference\/date_functions\/#hour\">Hour()<\/a>, <a href=\"https:\/\/developers.arcgis.com\/arcade\/function-reference\/date_functions\/#weekday\">Weekday()<\/a>, and others are available for your convenience when exploring and displaying time data. These functions can be used to quickly make several unique time-based visualizations that show various patterns throughout the city. <\/p>\n<p>In the <a href=\"http:\/\/ekenes.github.io\/esri-js-samples\/3\/visualization\/clustering\/\">311 app<\/a>, the following expressions help us answer the questions listed above. Different patterns emerge depending on filters to the time of day, and the type of incident. <\/p>\n<p><strong>Was the incident overdue at the time of closure? If so, by how long?<\/strong><\/p>\n<pre>\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> closed = $feature.Closed_Date;\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> due = $feature.Due_Date;\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> closureDueDiff = DateDiff(closed, due, <span style=\"color: #d14\">\"days\"<\/span>);\r\nIIF(IsEmpty(closed) || IsEmpty(due), <span style=\"color: #008080\">0<\/span>, closureDueDiff);\r\n<\/pre>\n<p><a href=\"http:\/\/ekenes.github.io\/esri-js-samples\/3\/visualization\/clustering\/\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2017\/10\/1-overdue-clusters.png\" alt=\"\" width=\"1023\" height=\"773\" class=\"alignnone size-full wp-image-88400 noIMGBackground\" \/><\/a><\/p>\n<p><strong>How long was the incident open at the time of its closure?<\/strong><\/p>\n<pre>\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> closed = $feature.Closed_Date;\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> created = $feature.Created_Date;\r\nIIF(IsEmpty(closed) || IsEmpty(created), <span style=\"color: #008080\">0<\/span>, DateDiff(closed, created, <span style=\"color: #d14\">\"days\"<\/span>));\r\n<\/pre>\n<p><a href=\"http:\/\/ekenes.github.io\/esri-js-samples\/3\/visualization\/clustering\/\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2017\/10\/2-age-clusters.png\" alt=\"\" width=\"983\" height=\"769\" class=\"alignnone size-full wp-image-88401 noIMGBackground\" \/><\/a><\/p>\n<p><strong>At what time of day was the incident reported (morning, afternoon, evening)?<\/strong><\/p>\n<pre>\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> t = Hour($feature.Created_Date);\r\nWhen(\r\n  t &gt;= <span style=\"color: #008080\">22<\/span> || t &lt; <span style=\"color: #008080\">6<\/span>, <span style=\"color: #d14\">\"Night\"<\/span>,\r\n  t &gt;= <span style=\"color: #008080\">6<\/span> &amp;&amp; t &lt; <span style=\"color: #008080\">11<\/span>, <span style=\"color: #d14\">\"Morning\"<\/span>,\r\n  t &gt;= <span style=\"color: #008080\">11<\/span> &amp;&amp; t &lt; <span style=\"color: #008080\">13<\/span>, <span style=\"color: #d14\">\"Midday\"<\/span>, \r\n  t &gt;= <span style=\"color: #008080\">13<\/span> &amp;&amp; t &lt; <span style=\"color: #008080\">17<\/span>, <span style=\"color: #d14\">\"Afternoon\"<\/span>,\r\n  t &gt;= <span style=\"color: #008080\">17<\/span> &amp;&amp; t &lt; <span style=\"color: #008080\">22<\/span>, <span style=\"color: #d14\">\"Evening\"<\/span>,\r\n<span style=\"color: #d14\">\"Invalid date\"<\/span> );\r\n<\/pre>\n<p><a href=\"http:\/\/ekenes.github.io\/esri-js-samples\/3\/visualization\/clustering\/\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2017\/10\/3-tod-clusters.png\" alt=\"\" width=\"958\" height=\"769\" class=\"alignnone size-full wp-image-88402\" \/><\/a><\/p>\n<p>Easy, right? Not so fast&#8230;<\/p>\n<h2>Dates are confusing<\/h2>\n<p>Date and time data are <a href=\"https:\/\/www.youtube.com\/watch?v=-5wpm-gesOY\">notoriously difficult<\/a> to work with. If date calculations haven\u2019t caused you to bang your head against the wall or pull your hair out with frustration, then you probably haven\u2019t spent enough time working with them.<\/p>\n<p>A lot of the confusion stems from <a href=\"https:\/\/www.timeanddate.com\/time\/map\/\">time zone offsets<\/a> and locations that observe <a href=\"https:\/\/www.timeanddate.com\/time\/dst\/history.html\">Daylight Savings Time<\/a> (and those that don&#8217;t). Those concepts are further compounded when you consider that the client (browser) interprets the date in the time zone in which it is located regardless of where the data is located. To further add to the confusion, dates can either be published in the time zone in which they were collected, or in <a href=\"https:\/\/www.timeanddate.com\/time\/aboututc.html\">UTC time<\/a>. Is your head spinning yet?<\/p>\n<p>It is important to keep these considerations in mind when attempting to visualize time of day for the location of each feature. For example, see the expression below, which was referenced earlier.<\/p>\n<pre>\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> t = Hour($feature.Created_Date);\r\nWhen(\r\n  t &gt;= <span style=\"color: #008080\">22<\/span> || t &lt; <span style=\"color: #008080\">6<\/span>, <span style=\"color: #d14\">\"Night\"<\/span>,\r\n  t &gt;= <span style=\"color: #008080\">6<\/span> &amp;&amp; t &lt; <span style=\"color: #008080\">11<\/span>, <span style=\"color: #d14\">\"Morning\"<\/span>,\r\n  t &gt;= <span style=\"color: #008080\">11<\/span> &amp;&amp; t &lt; <span style=\"color: #008080\">13<\/span>, <span style=\"color: #d14\">\"Midday\"<\/span>, \r\n  t &gt;= <span style=\"color: #008080\">13<\/span> &amp;&amp; t &lt; <span style=\"color: #008080\">17<\/span>, <span style=\"color: #d14\">\"Afternoon\"<\/span>,\r\n  t &gt;= <span style=\"color: #008080\">17<\/span> &amp;&amp; t &lt; <span style=\"color: #008080\">22<\/span>, <span style=\"color: #d14\">\"Evening\"<\/span>,\r\n<span style=\"color: #d14\">\"Invalid date\"<\/span> );\r\n<\/pre>\n<h2>Publishing times and dates<\/h2>\n<p>Before proceeding to accept this as a valid expression, we need to understand how the data was published (or should be published). Do the recorded times represent the local time where the data was collected? Or do they represent UTC time? Are the data points located in one time zone, or do they span multiple time zones? If the timestamps reflect UTC time, then you&#8217;re good to go. If they represent local times then the timestamps should include the UTC offset. <\/p>\n<p>This is particularly important for data that spans more than one time zone. Even if the data was collected in the same time zone, the offset helps determine if it represents time during Daylight Savings Time or Standard Time. For example, if you collect data in the Eastern Time Zone, then the offset to append to the time would be -4 during Daylight Savings Time and -5 during Standard Time. See the image below for an example of how to indicate this in a CSV file intended for publishing as a hosted feature service in ArcGIS Online.<\/p>\n<p><a href=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2017\/10\/4-table-offsets.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2017\/10\/4-table-offsets.png\" alt=\"\" width=\"919\" height=\"329\" class=\"alignnone size-full wp-image-88403 noIMGBackground\" \/><\/a><\/p>\n<p>However, publishing data from a CSV file to ArcGIS Online simplifies the process for you. If the data is collected in the same time zone but doesn\u2019t include the offset information, you can indicate the time zone offset when you publish the data to ArcGIS Online. <a href=\"https:\/\/blogs.esri.com\/esri\/arcgis\/2017\/06\/23\/mastering-the-space-time-continuum-considerations-for-publishing-date-fields-to-the-web\/\">Check out this blog<\/a>, which goes more in depth about the various things you should consider when publishing time data to ArcGIS Online, whether from CSV or from ArcGIS Pro.<\/p>\n<p><a href=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2017\/10\/5-ago-offset-option.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2017\/10\/5-ago-offset-option.png\" alt=\"\" width=\"719\" height=\"524\" class=\"alignnone size-full wp-image-88404 noIMGBackground\" \/><\/a><\/p>\n<p>When entering date and time data, just remember to either record dates using UTC times or to include the UTC offset in the date field. Consistency is the key. It will make your project much easier to work with later. <a href=\"https:\/\/doc.arcgis.com\/en\/arcgis-online\/reference\/csv-gpx.htm#DATE\">Read the ArcGIS Online documentation for working with date fields<\/a> for more information about the publishing process.<\/p>\n<h2>Time of day \u2013 in one time zone<\/h2>\n<p>In the <a href=\"http:\/\/ekenes.github.io\/esri-js-samples\/3\/visualization\/clustering\/\">311 exploration app<\/a> referenced above, the data was recorded in Eastern time. So we know we can publish the CSV data as a hosted feature service with the appropriate time offset of -4 or -5. Remember, we attempted to visualize incidents based on the time of day in the locations where they were reported. Features are visualized with unique values depending on whether they occurred in the morning, midday, afternoon, evening, or night. Here&#8217;s the starting expression for reference (note that my interpretation of &#8220;time of day&#8221; may be different from yours):<\/p>\n<pre>\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> t = Hour($feature.Created_Date);\r\nWhen(\r\n  t &gt;= <span style=\"color: #008080\">22<\/span> || t &lt; <span style=\"color: #008080\">6<\/span>, <span style=\"color: #d14\">\"Night\"<\/span>,\r\n  t &gt;= <span style=\"color: #008080\">6<\/span> &amp;&amp; t &lt; <span style=\"color: #008080\">11<\/span>, <span style=\"color: #d14\">\"Morning\"<\/span>,\r\n  t &gt;= <span style=\"color: #008080\">11<\/span> &amp;&amp; t &lt; <span style=\"color: #008080\">13<\/span>, <span style=\"color: #d14\">\"Midday\"<\/span>, \r\n  t &gt;= <span style=\"color: #008080\">13<\/span> &amp;&amp; t &lt; <span style=\"color: #008080\">17<\/span>, <span style=\"color: #d14\">\"Afternoon\"<\/span>,\r\n  t &gt;= <span style=\"color: #008080\">17<\/span> &amp;&amp; t &lt; <span style=\"color: #008080\">22<\/span>, <span style=\"color: #d14\">\"Evening\"<\/span>,\r\n<span style=\"color: #d14\">\"Invalid date\"<\/span> );\r\n<\/pre>\n<p>The <code>t<\/code> variable represents the <a href=\"https:\/\/developers.arcgis.com\/arcade\/function-reference\/date_functions\/#hour\">hour<\/a> of the day the incident was created. The <a href=\"https:\/\/developers.arcgis.com\/arcade\/function-reference\/logical_functions\/#when\">When()<\/a> logical function is used to evaluate the hour in several predefined ranges. It then returns a string indicating the relative time of day the incident occurred. <\/p>\n<p>But this is where we need to hit the brakes. It is important to note that Arcade, like JavaScript, interprets dates in the locale of the browser running the app. Since we\u2019re dealing with data collected in New York City, this expression would only display the proper visualization for browsers running the app in the Eastern Time Zone.<\/p>\n<p>If I run this expression in the Pacific Time Zone, I see the visualization on the left (click the images to view larger versions of them). The correct visualization is on the right (as seen in the Eastern Time Zone).<\/p>\n<table>\n<tbody>\n<tr>\n<td style=\"background-color:#DADADA\">Pacific Time Zone<\/td>\n<td style=\"background-color:#DADADA\">Eastern Time Zone<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2017\/10\/6a-ptz-viz.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2017\/10\/6a-ptz-viz-300x183.png\" alt=\"\" width=\"300\" height=\"183\" class=\"alignnone size-medium wp-image-88405\" \/><\/a><\/td>\n<td><a href=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2017\/10\/6b-etz-viz.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2017\/10\/6b-etz-viz-300x201.png\" alt=\"\" width=\"300\" height=\"201\" class=\"alignnone size-medium wp-image-88406\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>It may be confusing initially, but &#8220;time of day&#8221; is always relative to your location. Think about it: 6:30 a.m. EST is &#8220;morning&#8221; for the east coast, but people on the west coast are likely still in bed since it is 3:30 a.m. PST locally. That&#8217;s why the above expression will produce a different visualization for people in different time zones.<\/p>\n<p>We\u2019ll need to modify the expression so it always interprets the dates in Eastern time rather than the local time of the browser, so anyone who views the app anywhere in the world will see the same visualization. To accomplish this we need to convert the time to its UTC equivalent and offset that time based on a fixed offset for Eastern time. Since Eastern Standard Time is 5 hours behind UTC, we could set the offset to a fixed -5.<\/p>\n<pre>\r\n<span style=\"color: #998;font-style: italic\">\/\/ convert the time to Eastern Standard Time<\/span>\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> easternTime = DateAdd(ToUTC($feature.Created_Date), -<span style=\"color: #008080\">5<\/span>, <span style=\"color: #d14\">\"hours\"<\/span>);\r\n<span style=\"color: #998;font-style: italic\">\/\/ Time of day<\/span>\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> t = Hour(easternTime);\r\nWhen(\r\n  t &gt;= <span style=\"color: #008080\">22<\/span> || t &lt; <span style=\"color: #008080\">6<\/span>, <span style=\"color: #d14\">\"Night\"<\/span>,\r\n  t &gt;= <span style=\"color: #008080\">6<\/span> &amp;&amp; t &lt; <span style=\"color: #008080\">11<\/span>, <span style=\"color: #d14\">\"Morning\"<\/span>,\r\n  t &gt;= <span style=\"color: #008080\">11<\/span> &amp;&amp; t &lt; <span style=\"color: #008080\">13<\/span>, <span style=\"color: #d14\">\"Midday\"<\/span>, \r\n  t &gt;= <span style=\"color: #008080\">13<\/span> &amp;&amp; t &lt; <span style=\"color: #008080\">17<\/span>, <span style=\"color: #d14\">\"Afternoon\"<\/span>,\r\n  t &gt;= <span style=\"color: #008080\">17<\/span> &amp;&amp; t &lt; <span style=\"color: #008080\">22<\/span>, <span style=\"color: #d14\">\"Evening\"<\/span>,\r\n<span style=\"color: #d14\">\"Invalid date\"<\/span> );\r\n<\/pre>\n<p>OK. We\u2019re close, but not quite there yet. The only missing component of this expression is acknowledgement of Daylight Savings Time. When Daylight Savings Time is in effect, the Eastern Time Zone is only 4 hours behind UTC. Therefore, we need to account for Eastern Standard Time or Eastern Daylight Time with the appropriate offset. <\/p>\n<p>The threshold for moving from Standard Time to Daylight Time and vice versa is different every year. Since the data in the 311 app only shows incidents from 2015, we can check the date to see if it falls between March 8 and November 1. If it does, then it has an offset of -4. Otherwise, the offset will assume Standard Time (-5).<\/p>\n<pre>\r\n<span style=\"color: #998;font-style: italic\">\/\/ Only valid in 2015<\/span>\r\n<span><span style=\"color: #333;font-weight: bold\">function<\/span> <span style=\"color: #900;font-weight: bold\">toEasternTime<\/span>(<span>localDate<\/span>)<\/span>{\r\n  <span style=\"color: #333;font-weight: bold\">var<\/span> d = toUTC(localDate);\r\n  <span style=\"color: #333;font-weight: bold\">var<\/span> yr = Year(d);\r\n  <span style=\"color: #998;font-style: italic\">\/\/ Eastern time zone offsets from UTC<\/span>\r\n  <span style=\"color: #333;font-weight: bold\">var<\/span> edt = -<span style=\"color: #008080\">4<\/span>;\r\n  <span style=\"color: #333;font-weight: bold\">var<\/span> est = -<span style=\"color: #008080\">5<\/span>;\r\n\r\n  <span style=\"color: #998;font-style: italic\">\/\/ Nov 1, 2015 2:00 a.m. (UTC)<\/span>\r\n  <span style=\"color: #333;font-weight: bold\">var<\/span> stStart = <span style=\"color: #0086b3\">Date<\/span>(<span style=\"color: #008080\">2015<\/span>, <span style=\"color: #008080\">10<\/span>, <span style=\"color: #008080\">1<\/span>, <span style=\"color: #008080\">2<\/span> + Abs(edt));\r\n  <span style=\"color: #998;font-style: italic\">\/\/ Mar 8, 2015 2:00 a.m. (UTC)<\/span>\r\n  <span style=\"color: #333;font-weight: bold\">var<\/span> dtStart = <span style=\"color: #0086b3\">Date<\/span>(<span style=\"color: #008080\">2015<\/span>, <span style=\"color: #008080\">2<\/span>, <span style=\"color: #008080\">8<\/span>, <span style=\"color: #008080\">2<\/span> + Abs(est));\r\n\r\n  <span style=\"color: #333;font-weight: bold\">var<\/span> inDaylightTime = (d &gt;= dtStart) &amp;&amp; (d &lt; stStart);\r\n  <span style=\"color: #333;font-weight: bold\">var<\/span> timeOffset = IIF(inDaylightTime, edt, est);\r\n  <span style=\"color: #333;font-weight: bold\">return<\/span> DateAdd(d, timeOffset, <span style=\"color: #d14\">\"hours\"<\/span>);\r\n}\r\n\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> created = toEasternTime($feature.Created_Date);\r\n\r\n<span style=\"color: #998;font-style: italic\">\/\/ Time of day<\/span>\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> t = Hour(created);\r\nWhen(\r\n  t &gt;= <span style=\"color: #008080\">22<\/span> || t &lt; <span style=\"color: #008080\">6<\/span>, <span style=\"color: #d14\">\"Night\"<\/span>,\r\n  t &gt;= <span style=\"color: #008080\">6<\/span> &amp;&amp; t &lt; <span style=\"color: #008080\">11<\/span>, <span style=\"color: #d14\">\"Morning\"<\/span>,\r\n  t &gt;= <span style=\"color: #008080\">11<\/span> &amp;&amp; t &lt; <span style=\"color: #008080\">13<\/span>, <span style=\"color: #d14\">\"Midday\"<\/span>, \r\n  t &gt;= <span style=\"color: #008080\">13<\/span> &amp;&amp; t &lt; <span style=\"color: #008080\">17<\/span>, <span style=\"color: #d14\">\"Afternoon\"<\/span>,\r\n  t &gt;= <span style=\"color: #008080\">17<\/span> &amp;&amp; t &lt; <span style=\"color: #008080\">22<\/span>, <span style=\"color: #d14\">\"Evening\"<\/span>,\r\n<span style=\"color: #d14\">\"Invalid date\"<\/span> );\r\n<\/pre>\n<p>But what if your data spans multiple years? You could take this expression a step further and add two more functions for determining the starting and ending date of Daylight Savings based on a given year. For example, they could look like this:<\/p>\n<pre>\r\n<span style=\"color: #998;font-style: italic\">\/\/<\/span>\r\n<span style=\"color: #998;font-style: italic\">\/\/ Only valid in the U.S. after 2007<\/span>\r\n<span style=\"color: #998;font-style: italic\">\/\/<\/span>\r\n<span><span style=\"color: #333;font-weight: bold\">function<\/span> <span style=\"color: #900;font-weight: bold\">getStandardTimeStart<\/span>(<span>y<\/span>)<\/span>{\r\n  <span style=\"color: #998;font-style: italic\">\/\/ Daylight savings time ends on the <\/span>\r\n  <span style=\"color: #998;font-style: italic\">\/\/ first Sunday in November<\/span>\r\n  <span style=\"color: #333;font-weight: bold\">var<\/span> st;\r\n\r\n  <span style=\"color: #333;font-weight: bold\">for<\/span>(<span style=\"color: #333;font-weight: bold\">var<\/span> d=<span style=\"color: #008080\">1<\/span>; d&lt;<span style=\"color: #008080\">8<\/span>; d++){\r\n    <span style=\"color: #333;font-weight: bold\">var<\/span> tempDate = <span style=\"color: #0086b3\">Date<\/span>(y, <span style=\"color: #008080\">10<\/span>, d, <span style=\"color: #008080\">2<\/span>);\r\n    st = IIF(Weekday(tempDate)==<span style=\"color: #008080\">0<\/span>, tempDate, st);\r\n  }\r\n\r\n  <span style=\"color: #333;font-weight: bold\">return<\/span> st;\r\n}\r\n\r\n<span><span style=\"color: #333;font-weight: bold\">function<\/span> <span style=\"color: #900;font-weight: bold\">getDaylightTimeStart<\/span>(<span>y<\/span>)<\/span>{\r\n  <span style=\"color: #998;font-style: italic\">\/\/ Daylight savings time starts on the <\/span>\r\n  <span style=\"color: #998;font-style: italic\">\/\/ second Sunday in March<\/span>\r\n  <span style=\"color: #333;font-weight: bold\">var<\/span> dt;\r\n\r\n  <span style=\"color: #333;font-weight: bold\">for<\/span>(<span style=\"color: #333;font-weight: bold\">var<\/span> d=<span style=\"color: #008080\">1<\/span>; d&lt;<span style=\"color: #008080\">15<\/span>; d++){\r\n    <span style=\"color: #333;font-weight: bold\">var<\/span> tempDate = <span style=\"color: #0086b3\">Date<\/span>(y, <span style=\"color: #008080\">2<\/span>, d, <span style=\"color: #008080\">2<\/span>);\r\n    dt = IIF(Weekday(tempDate)==<span style=\"color: #008080\">0<\/span>, tempDate, dt);\r\n  }\r\n\r\n  <span style=\"color: #333;font-weight: bold\">return<\/span> dt;\r\n}\r\n<\/pre>\n<p>See the <a href=\"https:\/\/github.com\/ekenes\/esri-js-samples\/blob\/gh-pages\/3\/visualization\/clustering\/arcade-time-reported.txt\">full expression<\/a> using the above functions on GitHub.<\/p>\n<h2>Time of day \u2013 in multiple time zones<\/h2>\n<p>We took a small expression and expanded it out to properly display time of day taking Daylight Savings into account for data that spans multiple years. But the data in this case only sits in one time zone.<\/p>\n<p>How do you take multiple time zones into account? The expression would certainly have to be much longer, right? The answer to the latter question could be \u201cyes\u201d, but that doesn\u2019t have to be the case if you carefully prepare your data beforehand. For example, if the dataset includes an attribute field that indicates the UTC offset of each feature\u2019s location, then you can just apply the offset to get the local time without making all the caveats in the previous examples.<\/p>\n<p>Take a look at the <a href=\"https:\/\/earthquake.usgs.gov\/data\/comcat\/data-eventterms.php\">metadata for the USGS real-time earthquake data<\/a> for an example of this. Then navigate to a <a href=\"https:\/\/earthquake.usgs.gov\/data\/comcat\/data-eventterms.php#tz\">field named <em><strong>tz<\/strong><\/em><\/a>. Bingo. That\u2019s exactly what we want in this scenario. The <em><strong>tz<\/strong><\/em> field indicates the time zone offset of each earthquake&#8217;s epicenter in <em>minutes<\/em> from UTC time.<\/p>\n<p>So the expressions above would be condensed to look like this:<\/p>\n<pre>\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> localTime = DateAdd(ToUTC($feature.time), $feature.tz, <span style=\"color: #d14\">\"minutes\"<\/span>);\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> t = Hour(localTime);\r\nWhen(\r\n  t &gt;= <span style=\"color: #008080\">22<\/span> || t &lt; <span style=\"color: #008080\">6<\/span>, <span style=\"color: #d14\">\"Night\"<\/span>,\r\n  t &gt;= <span style=\"color: #008080\">6<\/span> &amp;&amp; t &lt; <span style=\"color: #008080\">11<\/span>, <span style=\"color: #d14\">\"Morning\"<\/span>,\r\n  t &gt;= <span style=\"color: #008080\">11<\/span> &amp;&amp; t &lt; <span style=\"color: #008080\">13<\/span>, <span style=\"color: #d14\">\"Midday\"<\/span>, \r\n  t &gt;= <span style=\"color: #008080\">13<\/span> &amp;&amp; t &lt; <span style=\"color: #008080\">17<\/span>, <span style=\"color: #d14\">\"Afternoon\"<\/span>,\r\n  t &gt;= <span style=\"color: #008080\">17<\/span> &amp;&amp; t &lt; <span style=\"color: #008080\">22<\/span>, <span style=\"color: #d14\">\"Evening\"<\/span>,\r\n<span style=\"color: #d14\">\"Invalid date\"<\/span> );\r\n<\/pre>\n<p>Expressions generating time of day visualizations referencing data that spans multiple time zones can be simplified as long as the data contains an attribute field indicating the time zone offset on a feature-by-feature basis. <a href=\"http:\/\/ekenes.github.io\/esri-js-samples\/4\/visualization\/arcade-time-day\/\">Check out this 3D app that employs this logic<\/a>. <\/p>\n<p><a href=\"http:\/\/ekenes.github.io\/esri-js-samples\/4\/visualization\/arcade-time-day\/\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2017\/10\/7-earthquakes.png\" alt=\"\" width=\"1024\" height=\"574\" class=\"alignnone size-full wp-image-88407 noIMGBackground\" \/><\/a><\/p>\n<p>You\u2019ll notice, however, that the time of day categories were reduced to just \u201cday\u201d vs. \u201cnight\u201d to make the visualization easier to decipher. The expression was therefore simplified to the following.<\/p>\n<pre>\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> localTime = DateAdd(ToUTC($feature.time), $feature.tz, <span style=\"color: #d14\">\"minutes\"<\/span>);\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> h = Hour(localTime);\r\nIIF(h &gt;= <span style=\"color: #008080\">7<\/span> &amp;&amp; h &lt; <span style=\"color: #008080\">19<\/span>, <span style=\"color: #d14\">\"day\"<\/span>, <span style=\"color: #d14\">\"night\"<\/span>);\r\n<\/pre>\n<p>Bear in mind that this visualization doesn&#8217;t have any real meaning; time of day does not play a factor in where or how strong earthquakes are when they occur. Nor does it indicate patterns for when future earthquakes will occur in regions prone to them. This is merely a demonstration of how much better it is to include the UTC offset in your data rather than writing custom logic in Arcade to handle it for you. <\/p>\n<p><a href=\"http:\/\/ekenes.github.io\/esri-js-samples\/4\/visualization\/arcade-time-day\/\">Open the app<\/a> and click on a few features. The popup displays the time of the earthquake&#8217;s occurrence in the time zone it occurred, UTC time, and your local time. If you pay close attention, you may notice the offsets only assume Standard Time, so Daylight Savings isn&#8217;t taken into account. If I click an earthquake in California, the local time and my browser time should match. However, since the earthquake occurred during the Daylight Savings timeframe, the time is off an hour. <\/p>\n<p><a href=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2017\/10\/8-popup.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2017\/10\/8-popup.png\" alt=\"\" width=\"343\" height=\"181\" class=\"alignnone size-full wp-image-88408 noIMGBackground\" \/><\/a><\/p>\n<p>We could implement logic for determining if the event occurred during Daylight Time versus Standard Time, but since Daylight Savings is applied differently all over the world (or not used at all), you might want to cut your losses and say the visualization is good enough. \u00af_(\u30c4)_\/\u00af<\/p>\n<p>Sometimes concessions like this are OK as long as you are transparent with your audience regarding the caveats, gotchas, and general issues present in your time visualizations.<\/p>\n"}],"related_articles":"","card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/03\/developers-card-1.jpg","wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/03\/developers-featured-1.jpg","authors":[{"ID":6561,"user_firstname":"Kristian","user_lastname":"Ekenes","nickname":"Kristian Ekenes","user_nicename":"kekenes","display_name":"Kristian Ekenes","user_email":"KEkenes@esri.com","user_url":"https:\/\/github.com\/ekenes","user_registered":"2018-03-02 00:18:32","user_description":"Kristian Ekenes is a Principal Product Engineer at Esri specializing in data visualization on the web. He works on the ArcGIS Maps SDK for JavaScript, ArcGIS Arcade, and Map Viewer in ArcGIS Online. Kristian's work focuses on researching and developing new and innovative data visualization capabilities of geospatial data in web maps, Arcade integration in web maps, and applications of generative AI assistants in web maps. Prior to joining Esri, he worked as a GIS Specialist for an environmental consulting company. Kristian has degrees from Brigham Young University and Arizona State University.","user_avatar":"<img data-del=\"avatar\" src='https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ekenes-zurich-213x200.png' class='avatar pp-user-avatar avatar-96 photo ' height='96' width='96'\/>"}]},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Unwinding the Clock: Visualizing Time with Arcade<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcade\/mapping\/unwinding-the-clock-visualizing-time-with-arcade\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Unwinding the Clock: Visualizing Time with Arcade\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcade\/mapping\/unwinding-the-clock-visualizing-time-with-arcade\" \/>\n<meta property=\"og:site_name\" content=\"ArcGIS Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/esrigis\/\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-11T20:39:18+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@ESRI\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcade\/mapping\/unwinding-the-clock-visualizing-time-with-arcade#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcade\/mapping\/unwinding-the-clock-visualizing-time-with-arcade\"},\"author\":{\"name\":\"Kristian Ekenes\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/5469f723fbfb78138efbb1da56e6aa9b\"},\"headline\":\"Unwinding the Clock: Visualizing Time with Arcade\",\"datePublished\":\"2017-10-18T08:00:55+00:00\",\"dateModified\":\"2024-11-11T20:39:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcade\/mapping\/unwinding-the-clock-visualizing-time-with-arcade\"},\"wordCount\":7,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"keywords\":[\"arcade\",\"arcade expressions\",\"JavaScript\",\"jsapi3\",\"jsapi4\",\"Time\"],\"articleSection\":[\"Arcade\",\"Mapping\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcade\/mapping\/unwinding-the-clock-visualizing-time-with-arcade#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcade\/mapping\/unwinding-the-clock-visualizing-time-with-arcade\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcade\/mapping\/unwinding-the-clock-visualizing-time-with-arcade\",\"name\":\"Unwinding the Clock: Visualizing Time with Arcade\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\"},\"datePublished\":\"2017-10-18T08:00:55+00:00\",\"dateModified\":\"2024-11-11T20:39:18+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcade\/mapping\/unwinding-the-clock-visualizing-time-with-arcade#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcade\/mapping\/unwinding-the-clock-visualizing-time-with-arcade\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcade\/mapping\/unwinding-the-clock-visualizing-time-with-arcade#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.esri.com\/arcgis-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Unwinding the Clock: Visualizing Time with Arcade\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"name\":\"ArcGIS Blog\",\"description\":\"Get insider info from Esri product teams\",\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\",\"name\":\"Esri\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"width\":400,\"height\":400,\"caption\":\"Esri\"},\"image\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/esrigis\/\",\"https:\/\/x.com\/ESRI\",\"https:\/\/www.linkedin.com\/company\/5311\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/5469f723fbfb78138efbb1da56e6aa9b\",\"name\":\"Kristian Ekenes\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ekenes-zurich-213x200.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ekenes-zurich-213x200.png\",\"caption\":\"Kristian Ekenes\"},\"description\":\"Kristian Ekenes is a Principal Product Engineer at Esri specializing in data visualization on the web. He works on the ArcGIS Maps SDK for JavaScript, ArcGIS Arcade, and Map Viewer in ArcGIS Online. Kristian's work focuses on researching and developing new and innovative data visualization capabilities of geospatial data in web maps, Arcade integration in web maps, and applications of generative AI assistants in web maps. Prior to joining Esri, he worked as a GIS Specialist for an environmental consulting company. Kristian has degrees from Brigham Young University and Arizona State University.\",\"sameAs\":[\"https:\/\/github.com\/ekenes\",\"https:\/\/www.linkedin.com\/in\/kristian-ekenes\/\",\"https:\/\/x.com\/kekenes\"],\"gender\":\"male\",\"jobTitle\":\"Principal Product Engineer\",\"worksFor\":\"Esri\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/author\/kekenes\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Unwinding the Clock: Visualizing Time with Arcade","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcade\/mapping\/unwinding-the-clock-visualizing-time-with-arcade","og_locale":"en_US","og_type":"article","og_title":"Unwinding the Clock: Visualizing Time with Arcade","og_url":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcade\/mapping\/unwinding-the-clock-visualizing-time-with-arcade","og_site_name":"ArcGIS Blog","article_publisher":"https:\/\/www.facebook.com\/esrigis\/","article_modified_time":"2024-11-11T20:39:18+00:00","twitter_card":"summary_large_image","twitter_site":"@ESRI","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcade\/mapping\/unwinding-the-clock-visualizing-time-with-arcade#article","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcade\/mapping\/unwinding-the-clock-visualizing-time-with-arcade"},"author":{"name":"Kristian Ekenes","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/5469f723fbfb78138efbb1da56e6aa9b"},"headline":"Unwinding the Clock: Visualizing Time with Arcade","datePublished":"2017-10-18T08:00:55+00:00","dateModified":"2024-11-11T20:39:18+00:00","mainEntityOfPage":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcade\/mapping\/unwinding-the-clock-visualizing-time-with-arcade"},"wordCount":7,"commentCount":0,"publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"keywords":["arcade","arcade expressions","JavaScript","jsapi3","jsapi4","Time"],"articleSection":["Arcade","Mapping"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/arcade\/mapping\/unwinding-the-clock-visualizing-time-with-arcade#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcade\/mapping\/unwinding-the-clock-visualizing-time-with-arcade","url":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcade\/mapping\/unwinding-the-clock-visualizing-time-with-arcade","name":"Unwinding the Clock: Visualizing Time with Arcade","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#website"},"datePublished":"2017-10-18T08:00:55+00:00","dateModified":"2024-11-11T20:39:18+00:00","breadcrumb":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcade\/mapping\/unwinding-the-clock-visualizing-time-with-arcade#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/arcade\/mapping\/unwinding-the-clock-visualizing-time-with-arcade"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcade\/mapping\/unwinding-the-clock-visualizing-time-with-arcade#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.esri.com\/arcgis-blog\/"},{"@type":"ListItem","position":2,"name":"Unwinding the Clock: Visualizing Time with Arcade"}]},{"@type":"WebSite","@id":"https:\/\/www.esri.com\/arcgis-blog\/#website","url":"https:\/\/www.esri.com\/arcgis-blog\/","name":"ArcGIS Blog","description":"Get insider info from Esri product teams","publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization","name":"Esri","url":"https:\/\/www.esri.com\/arcgis-blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","width":400,"height":400,"caption":"Esri"},"image":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/esrigis\/","https:\/\/x.com\/ESRI","https:\/\/www.linkedin.com\/company\/5311\/"]},{"@type":"Person","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/5469f723fbfb78138efbb1da56e6aa9b","name":"Kristian Ekenes","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ekenes-zurich-213x200.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ekenes-zurich-213x200.png","caption":"Kristian Ekenes"},"description":"Kristian Ekenes is a Principal Product Engineer at Esri specializing in data visualization on the web. He works on the ArcGIS Maps SDK for JavaScript, ArcGIS Arcade, and Map Viewer in ArcGIS Online. Kristian's work focuses on researching and developing new and innovative data visualization capabilities of geospatial data in web maps, Arcade integration in web maps, and applications of generative AI assistants in web maps. Prior to joining Esri, he worked as a GIS Specialist for an environmental consulting company. Kristian has degrees from Brigham Young University and Arizona State University.","sameAs":["https:\/\/github.com\/ekenes","https:\/\/www.linkedin.com\/in\/kristian-ekenes\/","https:\/\/x.com\/kekenes"],"gender":"male","jobTitle":"Principal Product Engineer","worksFor":"Esri","url":"https:\/\/www.esri.com\/arcgis-blog\/author\/kekenes"}]}},"text_date":"October 18, 2017","author_name":"Kristian Ekenes","author_page":"https:\/\/www.esri.com\/arcgis-blog\/author\/kekenes","custom_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/03\/developers-featured-1.jpg","primary_product":"ArcGIS Maps SDK for JavaScript","tag_data":[{"term_id":32551,"name":"arcade","slug":"arcade","term_group":0,"term_taxonomy_id":32551,"taxonomy":"post_tag","description":"","parent":0,"count":113,"filter":"raw"},{"term_id":32521,"name":"arcade expressions","slug":"arcade-expressions","term_group":0,"term_taxonomy_id":32521,"taxonomy":"post_tag","description":"","parent":0,"count":27,"filter":"raw"},{"term_id":24921,"name":"JavaScript","slug":"javascript","term_group":0,"term_taxonomy_id":24921,"taxonomy":"post_tag","description":"","parent":0,"count":151,"filter":"raw"},{"term_id":31311,"name":"jsapi3","slug":"jsapi3","term_group":0,"term_taxonomy_id":31311,"taxonomy":"post_tag","description":"","parent":0,"count":19,"filter":"raw"},{"term_id":27491,"name":"jsapi4","slug":"jsapi4","term_group":0,"term_taxonomy_id":27491,"taxonomy":"post_tag","description":"","parent":0,"count":111,"filter":"raw"},{"term_id":28041,"name":"Time","slug":"time","term_group":0,"term_taxonomy_id":28041,"taxonomy":"post_tag","description":"","parent":0,"count":25,"filter":"raw"}],"category_data":[{"term_id":777102,"name":"Arcade","slug":"arcade","term_group":0,"term_taxonomy_id":777102,"taxonomy":"category","description":"","parent":0,"count":98,"filter":"raw"},{"term_id":22941,"name":"Mapping","slug":"mapping","term_group":0,"term_taxonomy_id":22941,"taxonomy":"category","description":"","parent":0,"count":2698,"filter":"raw"}],"product_data":[{"term_id":36831,"name":"ArcGIS Maps SDK for JavaScript","slug":"js-api-arcgis","term_group":0,"term_taxonomy_id":36831,"taxonomy":"product","description":"","parent":36601,"count":363,"filter":"raw"},{"term_id":36601,"name":"Developers","slug":"developers","term_group":0,"term_taxonomy_id":36601,"taxonomy":"product","description":"","parent":0,"count":765,"filter":"raw"}],"primary_product_link":"https:\/\/www.esri.com\/arcgis-blog\/?s=#&products=js-api-arcgis","_links":{"self":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/79981","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/users\/6561"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/comments?post=79981"}],"version-history":[{"count":0,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/79981\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/media?parent=79981"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/categories?post=79981"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/tags?post=79981"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/industry?post=79981"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/product?post=79981"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}