Select to view content in your preferred language

Data Expression and Selectors

93
3
a week ago
Labels (1)
Chris_Kell
Occasional Contributor

Hello Friends,

The background: My student layer is one row per student, with the expected demographic columns for region, school, gender, race, grade level, services, etc.  There is also a absence_description column detailing the students attendance rate.  

I've been asked to provide visualizations that summarize absence description by region, and another visualization by school.  But, they want selectors to chose values for the demographic field values listed above.  Since selectors filter the data after the data expression can this be accomplished?  How?

Thanks

Chris

0 Kudos
3 Replies
HollyTorpey_LSA
Frequent Contributor

Whether you use a layer or a featureset produced by a data expression, the selectors should be able to filter the data. What dashboard elements are you using to visualize the data? At what point are you getting stuck?

- Holly
0 Kudos
Chris_Kell
Occasional Contributor
Hi Holly,

Thanks for reaching out.

The data expression serves as the input to the selector. For the selector to filter the data expression the expression must return a common field to the desired selector. This won't always be my case. Let me describe the data, and the requirement.

I have 47,000 unique student rows. Each row contains common demographic information, school region and attendance status column. My requirement is to aggregate the attendance description to the region level. While allowing the user to filter on race, gender, and grade level. Since the data expression doesn't return those values, the selector has nothing to interact with.

In terms of a table the featureset looks like:
Region No Attendance Perfect Att. Satisfactory At-Risk Chronic
1 700 500 2000 500 700
2 250 750 2500 250 550

I've tried to redesign the returned featureset to allow for the aggregation and needed demographic fields but haven't been able to come up with anything to be used by any widget.

0 Kudos
HollyTorpey_LSA
Frequent Contributor

So it sounds like you are using your data expression to aggregate the data in advance. I think (assuming I understand your data, which might be a big assumption!) that you should let the dashboard aggregate the data. How do you want to present the aggregated data? A table? A map? A chart? A bunch of indicators? In any of these scenarios, I would add the element in question to my dashboard and then set your data source to your student table. Then configure the dashboard element to aggregate the data.

So if you are using a serial chart, for example, you would set the Layer to your student table, then after "Categories from," select "Grouped values." Then choose region as your Category field. For the statistic, choose count and leave the field as ObjectID. You could split by the Gender field if you want, to save your viewers a step. I wouldn't split by anything that has a large number of different values, though. There are lots of other configuration parameters that you can play with to make your chart look the way you want.

Next you would add selectors for your other demographics, like race and grade level. In the selector settings, after Categories from, choose Grouped Values. Select your student table as the Layer. Then for the Category field, you'll choose either race or grade level. Make sure the number of categories is large enough to accommodate all the different values that could appear. Then in the Actions section, expand Filter and toggle the switch on for your chart. Since you're using the same data source, that's all you should have to do.

Hope that helps!

- Holly
0 Kudos