diff --git a/jargon.txt b/jargon.txt index 17e7f61d51..706e85800e 100644 --- a/jargon.txt +++ b/jargon.txt @@ -38,6 +38,7 @@ contactPage countryID countryLabel countryURI +cp cron crowdsourced csv diff --git a/templates/statistics.html b/templates/statistics.html index e8b57f85f5..5e754e3569 100644 --- a/templates/statistics.html +++ b/templates/statistics.html @@ -79,10 +79,47 @@

Coverage overview

In the table below we have listed the types of organizations that are covered for each country. The amount of information about those organizations and contact points for them varies and is also improved over time.

- {{- range . -}} - + + + + + + {{- range . -}} + {{- $social_cp_count := 0 -}} + {{- $other_cp := 0 -}} + {{- $country_org_count := 0 -}} + {{- $country := .safeName.String -}} + {{- $orgs := query (join "" "generators/" $country ".rq") -}} + {{- $country_org_count = add (len $orgs) $country_org_count -}} + {{- range $orgs -}} + {{ $social_cp_count = add (len (query "account-data.rq" .qid.String)) $social_cp_count }} + {{- $org_details := index (query "organization-optional.rq" .qid.String) 0 -}} + + {{- if $org_details.email -}} + {{- $other_cp = add1 $other_cp -}} + {{- end -}} + + {{- if $org_details.website -}} + {{- $other_cp = add1 $other_cp -}} + {{- end -}} + + {{- if $org_details.phone -}} + {{- $other_cp = add1 $other_cp -}} + {{- end -}} + + {{- if $org_details.contactPage -}} + {{- $other_cp = add1 $other_cp -}} + {{- end -}} + + {{- if $org_details.citizensInitiatives -}} + {{- $other_cp = add1 $other_cp -}} + {{- end -}} + {{- end -}} + + + {{- end -}}
{{ .name }}CountryContainsOrganizationsContact points
{{ .name }} {{ .description }}{{ $country_org_count }}{{ add $social_cp_count $other_cp }}