Select to view content in your preferred language

Line Graph Multiple Series

2316
5
Jump to solution
04-11-2022 01:50 PM
DavidMieksztyn
Emerging Contributor

I am attempting to create a line chart from a dataset where I would have multiple series (lines) in the chart. I can do this in excel by customizing the data ranges and designating exactly what I want the x and y axis to be, and what the series should draw from. See the chart below that I produce in excel:

linechartseries.PNG

 

 

In this example I am able to create a number of series (categories) and display the year and the total number of jobs on the different axes. 

However, in Insights, I seem to be constrained to only show one series at a time with a drop down menu on the left hand side to choose to look at a different series one at a time. How can I display multiple series all at once in Insights?

linechartseries_insights.PNG

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Scott_Aulen
Esri Contributor

David,

Perfect thanks. The industry category data you currently have is organized in wide format.  That is to say you have industry category variables (Transportation/Management/Educational/etc.) in separate columns.  To create the multi-series line chart you need to convert these categories to tall format.  This is often referred to as pivoting the data and you have multiple options to achieve this.

Depending on the number of categories, you can do this somewhat easily in Excel or you can use the scripting console within Insights and use either Python or R.  I've attached a document that details this process (excuse any formatting issues, I'm in the process of converting this to a blog post but wanted to go ahead and send to you).

You want your final table to look something like this.  This would allow you to chart Number Variable (y axis) by Year (x axis) and symbolize by Industry Category.

Industry CategoryYearNumber Variable

Unclassified Industry

201945
Unclassified Industry202050
Unclassified Industry202154
Transportation and Warehousing201924
Transportation and Warehousing202030
Transportation and Warehousing202165
Educational Services201940
Educational Services202038
Educational Services2021 42

 

Let me know if this helps.

Scott

View solution in original post

0 Kudos
5 Replies
Scott_Aulen
Esri Contributor

David,

I think this is likely due to the structure (ie, Wide vs Tall) of your data.  Can you send a screenshot of how your table is arranged?

Scott

0 Kudos
DavidMieksztyn
Emerging Contributor

Hi Scott, 

 

Here is a screen shot of the spreadsheet, just a section of it (there are more columns, ie, the series I am looking to have all on the chart all at the same time):

tableexample.PNG

 

0 Kudos
Scott_Aulen
Esri Contributor

David,

Perfect thanks. The industry category data you currently have is organized in wide format.  That is to say you have industry category variables (Transportation/Management/Educational/etc.) in separate columns.  To create the multi-series line chart you need to convert these categories to tall format.  This is often referred to as pivoting the data and you have multiple options to achieve this.

Depending on the number of categories, you can do this somewhat easily in Excel or you can use the scripting console within Insights and use either Python or R.  I've attached a document that details this process (excuse any formatting issues, I'm in the process of converting this to a blog post but wanted to go ahead and send to you).

You want your final table to look something like this.  This would allow you to chart Number Variable (y axis) by Year (x axis) and symbolize by Industry Category.

Industry CategoryYearNumber Variable

Unclassified Industry

201945
Unclassified Industry202050
Unclassified Industry202154
Transportation and Warehousing201924
Transportation and Warehousing202030
Transportation and Warehousing202165
Educational Services201940
Educational Services202038
Educational Services2021 42

 

Let me know if this helps.

Scott

0 Kudos
DavidMieksztyn
Emerging Contributor

Thank you Scott for showing Wide v Tall tables! That worked right away for Insights! 

0 Kudos
Scott_Aulen
Esri Contributor

Great, glad it was helpful.

0 Kudos