app/Statistics/Google/ChartDistribution.php
private function getMarriageChartData(): array
    {
        // Count how many families got marriage in each country
        $surn_countries = [];
        $m_countries    = $this->placeRepository->statsPlaces('FAM');

        // webtrees uses 3 letter country codes and localised country names, but google uses 2 letter codes.
        foreach ($m_countries as $place) {
            // Consolidate places (Germany, DEU => DE)
            if (array_key_exists($place->country, $this->country_to_iso3166)) {
                $country_code = $this->country_to_iso3166[$place->country];

                if (array_key_exists($country_code, $surn_countries)) {
                    $surn_countries[$country_code] += $place->tot;
                } else {
                    $surn_countries[$country_code] = $place->tot;
                }
            }
        }

        return $this->createChartData($surn_countries);
    }
private function getMarriageChartData(): array
    {
        // Count how many families got marriage in each country
        $surn_countries = [];
        $m_countries    = $this->placeRepository->statsPlaces('FAM');

        // webtrees uses 3 letter country codes and localised country names, but google uses 2 letter codes.
        foreach ($m_countries as $place) {
            // Consolidate places (Germany, DEU => DE)
            if (array_key_exists($place->country, $this->country_to_iso3166)) {
                $country_code = $this->country_to_iso3166[$place->country];

                if (array_key_exists($country_code, $surn_countries)) {
                    $surn_countries[$country_code] += $place->tot;
                } else {
                    $surn_countries[$country_code] = $place->tot;
                }
            }
        }

        return $this->createChartData($surn_countries);
    }
private function getMarriageChartData ( ) : array { // Count how many families got marriage in each country $ surn_countries = [ ] ; $ m_countries = $ this -> placeRepository -> statsPlaces ( 'FAM' ) ; // webtrees uses 3 letter country codes and localised country names, but google uses 2 letter codes. foreach ( $ m_countries as $ place ) { // Consolidate places (Germany, DEU => DE) if ( array_key_exists ( $ place -> country , $ this -> country_to_iso3166 ) ) { $ country_code = $ this -> country_to_iso3166 [ $ place -> country ] ; if ( array_key_exists ( $ country_code , $ surn_countries ) ) { $ surn_countries [ $ country_code ] += $ place -> tot ; } else { $ surn_countries [ $ country_code ] = $ place -> tot ; } } } return $ this -> createChartData ( $ surn_countries ) ; }
Returns the google geochart data for marriages.

@return array
Returns the google geochart data for marriages .