{exp:playa:parents channel="guidereview" entry_id="{stash:entry_id}" limit="1"} {!-- CLASSIFICATION TYPE --} {exp:stash:set name="guidereview-{stash:entry_id}-{stash:gr-type}-authority-review-ta" trim="yes"} {exp:switchee var="{exp:stash:classification_url}"} {case value="dining"} {exp:ce_str:ing php}{/exp:ce_str:ing} {/case} {case default="yes"} {exp:ce_str:ing php}{/exp:ce_str:ing} {/case} {/exp:switchee} {/exp:stash:set} {exp:stash:set name="guidereview-{stash:entry_id}-{stash:gr-type}-authority-review-yelp" trim="yes"} {exp:switchee var="{exp:stash:classification_url}"} {case value="dining"} {exp:ce_str:ing php}{/exp:ce_str:ing} {/case} {case default="yes"} {exp:ce_str:ing php}{/exp:ce_str:ing} {/case} {/exp:switchee} {/exp:stash:set} {exp:stash:set name="guidereview-{stash:entry_id}-{stash:gr-type}-authority-review-google" trim="yes"} {exp:switchee var="{exp:stash:classification_url}"} {case value="dining"} {exp:ce_str:ing php}{/exp:ce_str:ing} {/case} {case default="yes"} {exp:ce_str:ing php}{/exp:ce_str:ing} {/case} {/exp:switchee} {/exp:stash:set} {exp:stash:set name="guidereview-{stash:entry_id}-{stash:gr-type}-authority-totals" trim="yes"} {exp:ce_str:ing php}{/exp:ce_str:ing} {/exp:stash:set} {!-- TRIP ADVISOR --} {!-- Calculate the top 2% --} {exp:stash:set name="guidereview-{stash:entry_id}-{stash:gr-type}-data-ta-top" trim="yes"} {exp:ce_str:ing php}{/exp:ce_str:ing} {/exp:stash:set} {!-- Calculate the volume distribution --} {exp:stash:set name="guidereview-{stash:entry_id}-{stash:gr-type}-data-ta-volume" trim="yes"} {exp:ce_str:ing php}{/exp:ce_str:ing} {/exp:stash:set} {exp:stash:set name="guidereview-{stash:entry_id}-{stash:gr-type}-total-ta" trim="yes"} {exp:ce_str:ing php}{/exp:ce_str:ing} {/exp:stash:set} {exp:stash:set name="guidereview-{stash:entry_id}-{stash:gr-type}-total-ta" trim="yes"} {exp:ce_str:ing php}{/exp:ce_str:ing} {/exp:stash:set} {!-- GOOGLE --} {!-- Calculate the top 2% --} {exp:stash:set name="guidereview-{stash:entry_id}-{stash:gr-type}-data-google-top" trim="yes"} {exp:ce_str:ing php}{/exp:ce_str:ing} {/exp:stash:set} {!-- Calculate the volume distribution --} {exp:stash:set name="guidereview-{stash:entry_id}-{stash:gr-type}-data-google-volume" trim="yes"} {exp:ce_str:ing php}{/exp:ce_str:ing} {/exp:stash:set} {exp:stash:set name="guidereview-{stash:entry_id}-{stash:gr-type}-total-google" trim="yes"} {exp:ce_str:ing php}{/exp:ce_str:ing} {/exp:stash:set} {!-- YELP --} {!-- Calculate the top 2% --} {exp:stash:set name="guidereview-{stash:entry_id}-{stash:gr-type}-data-yelp-top" trim="yes"} {exp:ce_str:ing php}{/exp:ce_str:ing} {/exp:stash:set} {!-- Calculate the volume distribution --} {exp:stash:set name="guidereview-{stash:entry_id}-{stash:gr-type}-data-yelp-volume" trim="yes"} {exp:ce_str:ing php}{/exp:ce_str:ing} {/exp:stash:set} {exp:stash:set name="guidereview-{stash:entry_id}-{stash:gr-type}-total-yelp" trim="yes"} {exp:ce_str:ing php}{/exp:ce_str:ing} {/exp:stash:set} {!-- FINAL CRUNCH OF NUMBERS --} {exp:stash:set trim="yes" name="math-{stash:entry_id}" type="snippet" parse_tags="yes"} {exp:ce_str:ing php} {/exp:ce_str:ing} {/exp:stash:set} {!-- SET THE VARIABLES --} {exp:stash:set parse_tags="yes" trim="yes"} {stash:gr_date} {if '{guidereview_date format="%n"}'=='12' || '{guidereview_date format="%n"}'=='1' || '{guidereview_date format="%n"}'=='2'}Winter{if:elseif '{guidereview_date format="%n"}'=='3' || '{guidereview_date format="%n"}'=='4' || '{guidereview_date format="%n"}'=='5'}Spring{if:elseif '{guidereview_date format="%n"}'=='6' || '{guidereview_date format="%n"}'=='7' || '{guidereview_date format="%n"}'=='8'}Summer{if:elseif '{guidereview_date format="%n"}'=='9' || '{guidereview_date format="%n"}'=='10' || '{guidereview_date format="%n"}'=='11'}Fall{if:else}FY{/if} {guidereview_date format="%Y"} {/stash:gr_date} {stash:gr_grade} {exp:ce_str:ing php} {/exp:ce_str:ing} {/stash:gr_grade} {stash:gr_grade_upper} {exp:ce_str:ing php} {/exp:ce_str:ing} {/stash:gr_grade_upper} {stash:gr_total} {guidereview_data:sum col="quantity_all"} {/stash:gr_total} {stash:gr_stars} {exp:ce_str:ing php} {/exp:ce_str:ing} {/stash:gr_stars} {/exp:stash:set} {/exp:playa:parents}