@extends('layouts.app') @section('title', 'Analytics') @section('heading', 'Analytics') @section('subtitle', 'Tone over time, topic and outlet trends, compared with last week') @section('content')
@foreach([7, 14, 30, 90] as $d){{ $d }} days@endforeach
@foreach($compare as $m)
{{ $m['label'] }} ยท this week{{ $m['now'] }} {{ $m['change'] === null ? 'no data last week' : (($m['change'] >= 0 ? '+' : '').$m['change'].'% vs last week ('.$m['prev'].')') }}
@endforeach

Tone over time

Topics

Outlets

Outlet tone table

@foreach($outlets as $o)@endforeach
OutletStoriesNegativePositiveNegative share
{{ $o['name'] }}{{ $o['total'] }}{{ $o['negative'] }}{{ $o['positive'] }}{{ $o['total'] ? round($o['negative'] / $o['total'] * 100) : 0 }}%
@endsection @push('scripts') @include('partials.charts') @endpush