Food Access Sort Example

This example shows filtering by state and then sorting by population.

$ python3 sort_food_access.py
Please select one of the following choices:
1. Filter by state
2. Filter by population
3. Sort by state
4. Sort by population
5. Reset list
0. Quit

Enter selection: 1
State name? Pennsylvania

================================================================================
|          County |        State |Total Pop| LFA Pop| Income | Senior | Vehicle|
--------------------------------------------------------------------------------
|    Adams County | Pennsylvania |   101407|   74543|  16482 |  11683 |    1025|
| Allegheny Count | Pennsylvania |  1223348|  360847|  73796 |  60871 |   11955|
| Armstrong Count | Pennsylvania |    68941|   49539|  14184 |   8942 |     987|
|   Beaver County | Pennsylvania |   170539|  101884|  26180 |  18088 |    2986|
|  Bedford County | Pennsylvania |    49762|   39571|  13177 |   7133 |     688|
|    Berks County | Pennsylvania |   411442|  171068|  33537 |  25109 |    2301|
|    Blair County | Pennsylvania |   127089|   49681|  13587 |   8153 |    1040|
| Bradford County | Pennsylvania |    62622|   45404|  14654 |   7666 |     887|
|    Bucks County | Pennsylvania |   625249|  281829|  36183 |  38535 |    3239|
|   Butler County | Pennsylvania |   183862|  121305|  23464 |  18296 |    1980|
|  Cambria County | Pennsylvania |   143679|   78431|  21873 |  14190 |    1959|
|  Cameron County | Pennsylvania |     5085|    2546|    855 |    562 |      76|
|   Carbon County | Pennsylvania |    65249|   42129|  11806 |   7618 |     573|
|   Centre County | Pennsylvania |   153990|   82815|  17772 |  11869 |    1326|
|  Chester County | Pennsylvania |   498886|  290909|  41396 |  36666 |    3998|
|  Clarion County | Pennsylvania |    39988|   28661|   9677 |   4957 |     784|
| Clearfield Coun | Pennsylvania |    81642|   54190|  19007 |   8793 |    1099|
|  Clinton County | Pennsylvania |    39238|   24684|   7046 |   4348 |     621|
| Columbia County | Pennsylvania |    67295|   35563|   9281 |   6349 |     478|
| Crawford County | Pennsylvania |    88765|   64723|  20763 |  10636 |    1704|
| Cumberland Coun | Pennsylvania |   235406|  111339|  22850 |  15390 |    1757|
|  Dauphin County | Pennsylvania |   268100|  119222|  27655 |  16408 |    2702|
| Delaware County | Pennsylvania |   558979|   91418|  13478 |  14085 |    1903|
|      Elk County | Pennsylvania |    31946|   18757|   4862 |   3459 |     409|
|     Erie County | Pennsylvania |   280566|  151710|  52494 |  21048 |    6816|
|  Fayette County | Pennsylvania |   136606|   86829|  31594 |  14905 |    2281|
|   Forest County | Pennsylvania |     7716|    6413|   2310 |   1227 |     116|
| Franklin County | Pennsylvania |   149618|   94842|  24005 |  15784 |    1629|
|   Fulton County | Pennsylvania |    14845|   12129|   3787 |   2056 |     250|
|   Greene County | Pennsylvania |    38686|   27989|   8881 |   4349 |     822|
| Huntingdon Coun | Pennsylvania |    45913|   30302|   9714 |   5331 |     490|
|  Indiana County | Pennsylvania |    88880|   59857|  19709 |   9879 |    1868|
| Jefferson Count | Pennsylvania |    45200|   28884|   9568 |   5023 |     751|
|  Juniata County | Pennsylvania |    24636|   21730|   7575 |   3645 |     661|
| Lackawanna Coun | Pennsylvania |   214437|   65809|  15055 |  11356 |    1384|
| Lancaster Count | Pennsylvania |   519445|  252187|  61332 |  34381 |    9337|
| Lawrence County | Pennsylvania |    91108|   51400|  15335 |   8998 |    1417|
|  Lebanon County | Pennsylvania |   133568|   59371|  13433 |  10482 |     925|
|   Lehigh County | Pennsylvania |   349497|  120765|  18423 |  16152 |    1572|
|  Luzerne County | Pennsylvania |   320918|  121689|  29670 |  20999 |    2422|
| Lycoming County | Pennsylvania |   116111|   65178|  19138 |  10370 |    1693|
|   McKean County | Pennsylvania |    43450|   24050|   7365 |   4138 |     414|
|   Mercer County | Pennsylvania |   116638|   77853|  24060 |  13806 |    2062|
|  Mifflin County | Pennsylvania |    46682|   29663|  10279 |   5050 |    1047|
|   Monroe County | Pennsylvania |   169842|  129419|  32398 |  15976 |    1677|
| Montgomery Coun | Pennsylvania |   799874|  267253|  32463 |  41502 |    3738|
|  Montour County | Pennsylvania |    18267|   12179|   2779 |   2284 |     335|
| Northampton Cou | Pennsylvania |   297735|  117015|  21743 |  18913 |    1805|
| Northumberland  | Pennsylvania |    94528|   44926|  12370 |   7839 |     932|
|    Perry County | Pennsylvania |    45969|   38642|   9264 |   5173 |     691|
| Philadelphia Co | Pennsylvania |  1526006|   16422|   4766 |   3091 |     506|
|     Pike County | Pennsylvania |    57369|   50685|  12926 |   7869 |     670|
|   Potter County | Pennsylvania |    17457|   12305|   4234 |   2390 |     222|
| Schuylkill Coun | Pennsylvania |   148289|   72060|  18370 |  12386 |    1441|
|   Snyder County | Pennsylvania |    39702|   27465|   9099 |   4024 |     708|
| Somerset County | Pennsylvania |    77742|   65359|  21338 |  11566 |    1819|
| Sullivan County | Pennsylvania |     6428|    5664|   1974 |   1375 |      83|
| Susquehanna Cou | Pennsylvania |    43356|   34887|  10313 |   6287 |     539|
|    Tioga County | Pennsylvania |    41981|   34494|  12118 |   5875 |     708|
|    Union County | Pennsylvania |    44947|   32320|  11676 |   4170 |     699|
|  Venango County | Pennsylvania |    54984|   36193|  11084 |   6606 |     708|
|   Warren County | Pennsylvania |    41815|   26423|   8654 |   4866 |     528|
| Washington Coun | Pennsylvania |   207820|  144480|  35865 |  24710 |    3973|
|    Wayne County | Pennsylvania |    52822|   44884|  12043 |   8606 |     573|
| Westmoreland Co | Pennsylvania |   365169|  221245|  51360 |  39801 |    4809|
|  Wyoming County | Pennsylvania |    28276|   26113|   7526 |   4069 |     404|
|     York County | Pennsylvania |   434972|  229511|  43668 |  30681 |    2634|
--------------------------------------------------------------------------------

Please select one of the following choices:
1. Filter by state
2. Filter by population
3. Sort by state
4. Sort by population
5. Reset list
0. Quit

Enter selection: 4

================================================================================
|          County |        State |Total Pop| LFA Pop| Income | Senior | Vehicle|
--------------------------------------------------------------------------------
|  Cameron County | Pennsylvania |     5085|    2546|    855 |    562 |      76|
| Sullivan County | Pennsylvania |     6428|    5664|   1974 |   1375 |      83|
|   Forest County | Pennsylvania |     7716|    6413|   2310 |   1227 |     116|
|   Fulton County | Pennsylvania |    14845|   12129|   3787 |   2056 |     250|
|   Potter County | Pennsylvania |    17457|   12305|   4234 |   2390 |     222|
|  Montour County | Pennsylvania |    18267|   12179|   2779 |   2284 |     335|
|  Juniata County | Pennsylvania |    24636|   21730|   7575 |   3645 |     661|
|  Wyoming County | Pennsylvania |    28276|   26113|   7526 |   4069 |     404|
|      Elk County | Pennsylvania |    31946|   18757|   4862 |   3459 |     409|
|   Greene County | Pennsylvania |    38686|   27989|   8881 |   4349 |     822|
|  Clinton County | Pennsylvania |    39238|   24684|   7046 |   4348 |     621|
|   Snyder County | Pennsylvania |    39702|   27465|   9099 |   4024 |     708|
|  Clarion County | Pennsylvania |    39988|   28661|   9677 |   4957 |     784|
|   Warren County | Pennsylvania |    41815|   26423|   8654 |   4866 |     528|
|    Tioga County | Pennsylvania |    41981|   34494|  12118 |   5875 |     708|
| Susquehanna Cou | Pennsylvania |    43356|   34887|  10313 |   6287 |     539|
|   McKean County | Pennsylvania |    43450|   24050|   7365 |   4138 |     414|
|    Union County | Pennsylvania |    44947|   32320|  11676 |   4170 |     699|
| Jefferson Count | Pennsylvania |    45200|   28884|   9568 |   5023 |     751|
| Huntingdon Coun | Pennsylvania |    45913|   30302|   9714 |   5331 |     490|
|    Perry County | Pennsylvania |    45969|   38642|   9264 |   5173 |     691|
|  Mifflin County | Pennsylvania |    46682|   29663|  10279 |   5050 |    1047|
|  Bedford County | Pennsylvania |    49762|   39571|  13177 |   7133 |     688|
|    Wayne County | Pennsylvania |    52822|   44884|  12043 |   8606 |     573|
|  Venango County | Pennsylvania |    54984|   36193|  11084 |   6606 |     708|
|     Pike County | Pennsylvania |    57369|   50685|  12926 |   7869 |     670|
| Bradford County | Pennsylvania |    62622|   45404|  14654 |   7666 |     887|
|   Carbon County | Pennsylvania |    65249|   42129|  11806 |   7618 |     573|
| Columbia County | Pennsylvania |    67295|   35563|   9281 |   6349 |     478|
| Armstrong Count | Pennsylvania |    68941|   49539|  14184 |   8942 |     987|
| Somerset County | Pennsylvania |    77742|   65359|  21338 |  11566 |    1819|
| Clearfield Coun | Pennsylvania |    81642|   54190|  19007 |   8793 |    1099|
| Crawford County | Pennsylvania |    88765|   64723|  20763 |  10636 |    1704|
|  Indiana County | Pennsylvania |    88880|   59857|  19709 |   9879 |    1868|
| Lawrence County | Pennsylvania |    91108|   51400|  15335 |   8998 |    1417|
| Northumberland  | Pennsylvania |    94528|   44926|  12370 |   7839 |     932|
|    Adams County | Pennsylvania |   101407|   74543|  16482 |  11683 |    1025|
| Lycoming County | Pennsylvania |   116111|   65178|  19138 |  10370 |    1693|
|   Mercer County | Pennsylvania |   116638|   77853|  24060 |  13806 |    2062|
|    Blair County | Pennsylvania |   127089|   49681|  13587 |   8153 |    1040|
|  Lebanon County | Pennsylvania |   133568|   59371|  13433 |  10482 |     925|
|  Fayette County | Pennsylvania |   136606|   86829|  31594 |  14905 |    2281|
|  Cambria County | Pennsylvania |   143679|   78431|  21873 |  14190 |    1959|
| Schuylkill Coun | Pennsylvania |   148289|   72060|  18370 |  12386 |    1441|
| Franklin County | Pennsylvania |   149618|   94842|  24005 |  15784 |    1629|
|   Centre County | Pennsylvania |   153990|   82815|  17772 |  11869 |    1326|
|   Monroe County | Pennsylvania |   169842|  129419|  32398 |  15976 |    1677|
|   Beaver County | Pennsylvania |   170539|  101884|  26180 |  18088 |    2986|
|   Butler County | Pennsylvania |   183862|  121305|  23464 |  18296 |    1980|
| Washington Coun | Pennsylvania |   207820|  144480|  35865 |  24710 |    3973|
| Lackawanna Coun | Pennsylvania |   214437|   65809|  15055 |  11356 |    1384|
| Cumberland Coun | Pennsylvania |   235406|  111339|  22850 |  15390 |    1757|
|  Dauphin County | Pennsylvania |   268100|  119222|  27655 |  16408 |    2702|
|     Erie County | Pennsylvania |   280566|  151710|  52494 |  21048 |    6816|
| Northampton Cou | Pennsylvania |   297735|  117015|  21743 |  18913 |    1805|
|  Luzerne County | Pennsylvania |   320918|  121689|  29670 |  20999 |    2422|
|   Lehigh County | Pennsylvania |   349497|  120765|  18423 |  16152 |    1572|
| Westmoreland Co | Pennsylvania |   365169|  221245|  51360 |  39801 |    4809|
|    Berks County | Pennsylvania |   411442|  171068|  33537 |  25109 |    2301|
|     York County | Pennsylvania |   434972|  229511|  43668 |  30681 |    2634|
|  Chester County | Pennsylvania |   498886|  290909|  41396 |  36666 |    3998|
| Lancaster Count | Pennsylvania |   519445|  252187|  61332 |  34381 |    9337|
| Delaware County | Pennsylvania |   558979|   91418|  13478 |  14085 |    1903|
|    Bucks County | Pennsylvania |   625249|  281829|  36183 |  38535 |    3239|
| Montgomery Coun | Pennsylvania |   799874|  267253|  32463 |  41502 |    3738|
| Allegheny Count | Pennsylvania |  1223348|  360847|  73796 |  60871 |   11955|
| Philadelphia Co | Pennsylvania |  1526006|   16422|   4766 |   3091 |     506|
--------------------------------------------------------------------------------

Please select one of the following choices:
1. Filter by state
2. Filter by population
3. Sort by state
4. Sort by population
5. Reset list
0. Quit

Enter selection: 0

Goodbye!