app/Statistics/Google/ChartDistribution.php
private function getBirthChartData(): array
    {
        // Count how many people were born in each country
        $surn_countries = [];
        $b_countries    = $this->placeRepository->statsPlaces('INDI', 'BIRT', 0, true);

        foreach ($b_countries as $country => $count) {
            // Consolidate places (Germany, DEU => DE)
            if (array_key_exists($country, $this->country_to_iso3166)) {
                $country_code = $this->country_to_iso3166[$country];

                if (array_key_exists($country_code, $surn_countries)) {
                    $surn_countries[$country_code] += $count;
                } else {
                    $surn_countries[$country_code] = $count;
                }
            }
        }

        return $this->createChartData($surn_countries);
    }
private function getBirthChartData(): array
    {
        // Count how many people were born in each country
        $surn_countries = [];
        $b_countries    = $this->placeRepository->statsPlaces('INDI', 'BIRT', 0, true);

        foreach ($b_countries as $country => $count) {
            // Consolidate places (Germany, DEU => DE)
            if (array_key_exists($country, $this->country_to_iso3166)) {
                $country_code = $this->country_to_iso3166[$country];

                if (array_key_exists($country_code, $surn_countries)) {
                    $surn_countries[$country_code] += $count;
                } else {
                    $surn_countries[$country_code] = $count;
                }
            }
        }

        return $this->createChartData($surn_countries);
    }
private function getBirthChartData ( ) : array { // Count how many people were born in each country $ surn_countries = [ ] ; $ b_countries = $ this -> placeRepository -> statsPlaces ( 'INDI' , 'BIRT' , 0 , true ) ; foreach ( $ b_countries as $ country => $ count ) { // Consolidate places (Germany, DEU => DE) if ( array_key_exists ( $ country , $ this -> country_to_iso3166 ) ) { $ country_code = $ this -> country_to_iso3166 [ $ country ] ; if ( array_key_exists ( $ country_code , $ surn_countries ) ) { $ surn_countries [ $ country_code ] += $ count ; } else { $ surn_countries [ $ country_code ] = $ count ; } } } return $ this -> createChartData ( $ surn_countries ) ; }
Returns the google geochart data for birth fact.

@return array
Returns the google geochart data for birth fact .