Select to view content in your preferred language

ArcInsights timeseries plot issue

1323
8
04-01-2022 12:00 PM
Ed_
by MVP Regular Contributor
MVP Regular Contributor

I have uploaded a CSV file in Insights which has a bunch of columns including date columns Date, year and month. I am able to create a line graph using year at x-axis. However, when I select the timeseries plot option, I get an error that no date/time field found.

How can I fix this?

SaadullahBaloch_1-1648839625494.png

 

 

Question | Analyze | Visualize
Tags (3)
8 Replies
Scott_Aulen
Esri Contributor

SaadullahBaloch,

It seems that your date columns are being read as String field types and not Date/Time field types.  You can see more here.

Scott

Ed_
by MVP Regular Contributor
MVP Regular Contributor

When I use this method, I get a new Date/Time field columns with <No Data> as shown below. Maybe this because. I don't have days in the Date values.

SaadullahBaloch_0-1648844674456.png

 

Question | Analyze | Visualize
0 Kudos
Ian_Muehlenhaus
Esri Contributor

Hi @Ed_,

Thanks for your question! 

Your columns are probably not automatically set as Time Series. That happens a lot with imported CSV/Excel files, etc. But I have good news! It's normally a fairly straightforward fix! 🙂

I recorded a demo (animated GIF below) showing how you can use the Data Table:

- Add a new field

- Calculate the data field as a time one, using your existing columns

- Create a Time Series table 🙂

The demo I use only has 10 values, so the resulting data table is really comical looking, but it works! 🙂

Please let me know if you run into any issues.

Also, here is the page explaining several of Insights' Date/Time Functions.

I scrolled down to Date Functions to find the Date(...) one. There are other options too, though.

I hope this helps! Thanks again for reaching out and thank you for using ArcGIS Insights! 

Please reach out any time with your questions!

Best,

Ian

  

-------------------
Ian Muehlenhaus
Location Analytics
Ed_
by MVP Regular Contributor
MVP Regular Contributor

@Ian_Muehlenhaus thank you for your quick response and detailed guide. However, since my CSV does not have a day column, I am not able to create timeseries under the new field as show below. 

How can I fix this?

 

SaadullahBaloch_0-1648843613451.png

 

Question | Analyze | Visualize
0 Kudos
Ian_Muehlenhaus
Esri Contributor

Hmmmm... Okay, this may present a bit of a dilemma. I may need to dig around a bit to see if a solution exists. 

I assume, however, since it's Friday where I am, you may be hoping to wrap this up before the weekend begins. So I'll dig around and try to get back to you.

One idea I had was to add an artificial day (e.g., "1" or "15") to each value. 

I'm not sure if this messes up the Time Series, as I haven't had the chance to check but I will. May be worth a shot, though!

Sorry I don't have an immediate answer on this, but I'll look into it and post here if I figure out a solution before I log out for the day. 

Thanks again for posting your question, @Ed_! It's what we're here for. 

And also, of course, for using ArcGIS Insights! 🙂

-------------------
Ian Muehlenhaus
Location Analytics
Ian_Muehlenhaus
Esri Contributor

Hi @Ed_,

Okay, well... The insert a random number (I did "15", because the middle of the month just made sense to me) kind of works.

You might also consider inserting a random number between 1-28 (because of February short changes us 😉 to make the data look more organic. 

I'm attaching a screen shot showing what I did and resulting data table. 

Screen Shot 2022-04-01 at 3.42.00 PM.png

Unfortunately, ArcGIS Insights appears to bin time series data into two-week stretches. The results in my sample case were passable. I'm not sure it will be for your data, though. Sorry if not. 😞

I also recalled this being a topic of conversation on this board before and found the thread where it was addressed. Changing the aggregation period (e.g., weekly to daily or monthly or yearly) is under development for a future release.  

It won't help you this weekend, unfortunately. But we will continue working on this internally for sure. 

Also, I'm fairly new on the team, so hopefully (fingers crossed!) another user or team member has a better solution than the one I came up with. 🙂 One may exist!

Here is the older thread: 
https://community.esri.com/t5/arcgis-insights-questions/can-you-modify-how-the-insights-time-series-...

Thanks again, SaadullahBaloch. Sorry I don't have a perfect solution at this time. 

Have a great weekend!

Ian

-------------------
Ian Muehlenhaus
Location Analytics
0 Kudos
Ed_
by MVP Regular Contributor
MVP Regular Contributor

My data has monthly average data from 2010-21. So should I use random numbers from 1-12 or just 1? 

 

The purpose of the timeseries plot is to create something like this:

SaadullahBaloch_0-1648847715646.png

 

And thank you so much for your quick response. I absolutely love Insights for data analytics, especially because I can also make full use of R in Insights for further spatial and non-spatial analysis.

Cheers,  

Question | Analyze | Visualize
0 Kudos
Ian_Muehlenhaus
Esri Contributor

Hi @Ed_,

I'm so glad you enjoy using Insights and that you're making use of the R-scripting feature. That's awesome! I love that feature myself using Python. 🙂

I think what you're hoping to do may not work yet in Insights, as the timeline is aggregated weekly, not monthly.

Offhand, I don't know of a way to show average by month. 😞 I will definitely promote elevating this enhancement as soon as possible, though. 

I'm attaching one last screenshot of how I put "15" into the Date function to try to get Insights to play nicely.

Sorry this is the best I can do. Again, though, others may be more insightful on this. This just represents my attempt. 

I hate leaving something half finished, but alas, I must go for the weekend. Unfortunately, even on the best days, life can sometimes interfere with data science! 🙂 LOL

Have a great weekend, SaadullahBaloch!

Ian

15isTheDay.gif

-------------------
Ian Muehlenhaus
Location Analytics