Module: SBA::Client::Data

Includes:
Connection
Included in:
SBA::Client
Defined in:
lib/sba/client/data.rb

Instance Method Summary collapse

Instance Method Details

#data_city(state, options = {}) ⇒ Array

Returns Data for all Cities in a State

Examples:

SBA.data_city("ca")

Parameters:

  • state (String)

    Input the two leter postal code for state abbreviation.

  • options (Hash) (defaults to: {})

    A customizable set of options.

Returns:

  • (Array)

See Also:



29
30
31
# File 'lib/sba/client/data.rb', line 29

def data_city(state, options={})
  response = get("geodata/city_data_for_state_of/#{state}.json", options)
end

#data_city_county(state, options = {}) ⇒ Array

Returns Data for all Cities and Counties in a State

Examples:

SBA.data_city_county("ca")

Parameters:

  • state (String)

    Input the two leter postal code for state abbreviation.

  • options (Hash) (defaults to: {})

    A customizable set of options.

Returns:

  • (Array)

See Also:



17
18
19
# File 'lib/sba/client/data.rb', line 17

def data_city_county(state,options={})
  response = get("geodata/city_county_data_for_state_of/#{state}.json", options)
end

#data_county(state, options = {}) ⇒ Array

Returns Data for all Counties in a State

Examples:

SBA.data_county("ca")      

Parameters:

  • state (String)

    Input the two leter postal code for state abbreviation.

  • options (Hash) (defaults to: {})

    A customizable set of options.

Returns:

  • (Array)

See Also:



41
42
43
# File 'lib/sba/client/data.rb', line 41

def data_county(state, options={})
  response = get("geodata/county_data_for_state_of/#{state}.json", options)
end

#data_specific_city(city, state, options = {}) ⇒ Array

Returns Data for a specific City

Examples:

SBA.data_specific_city("ca")

Parameters:

  • city (String)

    Input the name of the city

  • state (String)

    Input the two leter postal code for state abbreviation.

  • options (Hash) (defaults to: {})

    A customizable set of options.

Returns:

  • (Array)

See Also:



54
55
56
# File 'lib/sba/client/data.rb', line 54

def data_specific_city(city, state, options={})
  response = get("geodata/all_data_for_city_of/#{city}/#{state}.json", options)
end

#data_specific_county(county, state, options = {}) ⇒ Array

Returns Data for a specific County

Examples:

SBA.data_specific_county("orange county", "ca")

Parameters:

  • county (String)

    Input the name of the County

  • state (String)

    Input the two leter postal code for state abbreviation.

  • options (Hash) (defaults to: {})

    A customizable set of options.

Returns:

  • (Array)

See Also:



67
68
69
# File 'lib/sba/client/data.rb', line 67

def data_specific_county(county, state, options={})
  response = get("geodata/all_data_for_county_of/#{county}/#{state}.json", options)
end