tyrauber / census_api

A Ruby Gem for querying the US Census Bureau API
MIT License
30 stars 9 forks source link

[Distant future] Built-in field reference #6

Open beechnut opened 11 years ago

beechnut commented 11 years ago

I'm imagining adding a CensusApi::FieldFinder module that lets people search for fields with a certain string in them, for example:

@finder = CensusApi::FieldFinder.new
@finder.find_table 'population'

This would return all the tables whose names include 'population', and their symbols for use in a text-based Client#find:

[
  {name: 'Institutionalized Population', code: 'PC02', symbol: :institutionalized_pop},
  {name: 'Noninstitutionalized Population', code: 'PC07', symbol: :noninstitutionalized_pop},
  ...
]