Class: Vicary::Census::Exposure

Inherits:
Struct
  • Object
show all
Defined in:
lib/vicary/census.rb

Overview

How much of the US surname population the single-token tiers claim.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bearers_exposedObject

Returns the value of attribute bearers_exposed

Returns:

  • (Object)

    the current value of bearers_exposed



63
64
65
# File 'lib/vicary/census.rb', line 63

def bearers_exposed
  @bearers_exposed
end

#bearers_totalObject

Returns the value of attribute bearers_total

Returns:

  • (Object)

    the current value of bearers_total



63
64
65
# File 'lib/vicary/census.rb', line 63

def bearers_total
  @bearers_total
end

#bearers_via_demonymObject

Returns the value of attribute bearers_via_demonym

Returns:

  • (Object)

    the current value of bearers_via_demonym



63
64
65
# File 'lib/vicary/census.rb', line 63

def bearers_via_demonym
  @bearers_via_demonym
end

#bearers_via_placeObject

Returns the value of attribute bearers_via_place

Returns:

  • (Object)

    the current value of bearers_via_place



63
64
65
# File 'lib/vicary/census.rb', line 63

def bearers_via_place
  @bearers_via_place
end

#bearers_via_shortObject

Returns the value of attribute bearers_via_short

Returns:

  • (Object)

    the current value of bearers_via_short



63
64
65
# File 'lib/vicary/census.rb', line 63

def bearers_via_short
  @bearers_via_short
end

#surnames_matchedObject

Returns the value of attribute surnames_matched

Returns:

  • (Object)

    the current value of surnames_matched



63
64
65
# File 'lib/vicary/census.rb', line 63

def surnames_matched
  @surnames_matched
end

#surnames_scoredObject

Returns the value of attribute surnames_scored

Returns:

  • (Object)

    the current value of surnames_scored



63
64
65
# File 'lib/vicary/census.rb', line 63

def surnames_scored
  @surnames_scored
end

Instance Method Details

#demonym_rateObject



90
91
92
# File 'lib/vicary/census.rb', line 90

def demonym_rate
  100.0 * bearers_via_demonym / bearers_total
end

#distinct_rateObject



94
95
96
# File 'lib/vicary/census.rb', line 94

def distinct_rate
  100.0 * surnames_matched / surnames_scored
end

#place_rateObject



86
87
88
# File 'lib/vicary/census.rb', line 86

def place_rate
  100.0 * bearers_via_place / bearers_total
end

#rateObject

Population-weighted exposure, as a percentage. The headline.



78
79
80
# File 'lib/vicary/census.rb', line 78

def rate
  100.0 * bearers_exposed / bearers_total
end

#short_rateObject



82
83
84
# File 'lib/vicary/census.rb', line 82

def short_rate
  100.0 * bearers_via_short / bearers_total
end