MAPC / myschoolcommute2

Tool to Survey and Analyze Transportation Mode and Behavior
http://masaferoutessurvey.org/
1 stars 3 forks source link

Move Logic from R Scripts into Database Fields #299

Open theryankelly opened 2 years ago

theryankelly commented 2 years ago

As we explored and documented in our FY 21 work, there are several fields that are calculated in the creation of the report. To help keep data consistent, we will use SQL to generate this logic and store the fields in the database. For example, the count of students by grade that take family vehicles in the morning is a field calculated in the report logic {carTripPct}.

Priority Queries run by AECOM and partners that should drive the prioritization of the calculations below: // 1. Average distance (mi) by survey ID // 2. Number of Responses, Number of Students, & Average Distance by Survey ID (requires Excel aggregation) // 3. # of students in walkshed and bike shed by survey ID // 4. Transportation breakdown to/from school, by survey ID

Fields Calculated In Report

theryankelly commented 2 years ago
theryankelly commented 2 years ago

Following up on our call yesterday. Looking back at the prior demo Tableau work we used dates in a few places: Once to get a count of students per year. Shown here we originally interpreted it as the Calendar year. This could also be aligned with the Fiscal Year the date we use when calculating enrollment. image

We also ran into conflicts when looking at month-by-month totals. As some surveys are conducted across months. Looking at one month may underrepresent the responses for a given survey that is split. image

I will also mention the morning vs afternoon split is based on to and from school binary, not a date/time calculation.

TarinAComer commented 2 years ago

Enrollment data is in postgres now. Scripts from Sharepoint have been set up as Views Above views have all been combined into a full View.

Next steps when given approval are to import the above fields into the a full survey view.