Food Access Sort Example

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

$ 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: 2
min population? 500000
max population? 700000

================================================================================
|          County |        State |Total Pop| LFA Pop| Income | Senior | Vehicle|
--------------------------------------------------------------------------------
| Anne Arundel Co |     Maryland |   537656|  209639|  25609 |  27851 |    2276|
| Arapahoe County |     Colorado |   572003|   96164|  14864 |  11041 |     956|
|  Baltimore city |     Maryland |   620961|   28080|  11247 |   3378 |    2867|
| Bernalillo Coun |   New Mexico |   662564|  157904|  47265 |  16272 |    1792|
|  Brevard County |      Florida |   543376|  263515|  75537 |  51368 |    4501|
|  Bristol County | Massachusett |   548285|  223651|  33483 |  30062 |    3006|
|    Bucks County | Pennsylvania |   625249|  281829|  36183 |  38535 |    3239|
|   Camden County |   New Jersey |   513657|  108049|  23744 |  13859 |    2568|
|     Cobb County |      Georgia |   688078|  267654|  55152 |  23245 |    2579|
| Davidson County |    Tennessee |   626681|  198955|  58153 |  22829 |    4083|
|   DeKalb County |      Georgia |   691893|  187313|  66254 |  15422 |    4527|
| Delaware County | Pennsylvania |   558979|   91418|  13478 |  14085 |    1903|
|   Denton County |        Texas |   662614|  228477|  46388 |  17466 |    1599|
|   Denver County |     Colorado |   600158|   64735|  25553 |   5272 |    1682|
| District of Col | District of  |   601723|   27650|   9661 |   3740 |    2770|
|  Douglas County |     Nebraska |   517110|   82670|  14503 |   8642 |    1089|
|  El Paso County |     Colorado |   622263|  240246|  50636 |  21087 |    2205|
| Fort Bend Count |        Texas |   585375|  209255|  43319 |  14838 |    1175|
|   Hudson County |   New Jersey |   634266|    4315|    754 |    436 |     150|
|  Jackson County |     Missouri |   674158|  209917|  58221 |  24054 |    4858|
| Jefferson Count |      Alabama |   658466|  306891| 105330 |  40955 |    8404|
| Jefferson Count |     Colorado |   534543|  170993|  24065 |  18477 |    1596|
|  Johnson County |       Kansas |   544179|  127012|  15541 |  12155 |    1216|
|     Kane County |     Illinois |   515269|  160682|  23981 |  16288 |    1779|
|     Kent County |     Michigan |   602622|  208434|  39449 |  23898 |    2617|
| Lancaster Count | Pennsylvania |   519445|  252187|  61332 |  34381 |    9337|
|      Lee County |      Florida |   618754|  283984|  90130 |  64893 |    4542|
| Monmouth County |   New Jersey |   630380|  252701|  34201 |  30580 |    3920|
| Montgomery Coun |         Ohio |   535153|  174304|  59220 |  27842 |    6178|
| New Castle Coun |     Delaware |   538479|  188452|  36255 |  22834 |    3214|
|  Norfolk County | Massachusett |   670850|  246316|  24646 |  33444 |    3871|
|    Ocean County |   New Jersey |   576567|  296355|  57956 |  74057 |    7152|
|  Passaic County |   New Jersey |   501226|   91476|  10633 |  13816 |    1261|
|     Polk County |      Florida |   602095|  336085| 126403 |  61393 |    5237|
| Providence Coun | Rhode Island |   626667|  133323|  24129 |  19726 |    3279|
|   Ramsey County |    Minnesota |   508640|  105838|  26521 |  15405 |    2991|
| San Joaquin Cou |   California |   685306|  167169|  50288 |  16811 |    1869|
| Stanislaus Coun |   California |   514453|   88698|  30054 |  10224 |    1229|
|   Summit County |         Ohio |   541781|  190700|  44047 |  26817 |    3926|
|    Tulsa County |     Oklahoma |   603403|  193996|  62890 |  24977 |    5212|
|    Union County |   New Jersey |   536499|   58809|   5061 |   9712 |     893|
|     Utah County |         Utah |   516564|  202992|  47652 |  11586 |     949|
| Washington Coun |       Oregon |   529710|  104919|  17019 |   9863 |    1011|
|     Will County |     Illinois |   677560|  335051|  55913 |  29884 |    3330|
--------------------------------------------------------------------------------

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: 3

================================================================================
|          County |        State |Total Pop| LFA Pop| Income | Senior | Vehicle|
--------------------------------------------------------------------------------
| Jefferson Count |      Alabama |   658466|  306891| 105330 |  40955 |    8404|
| San Joaquin Cou |   California |   685306|  167169|  50288 |  16811 |    1869|
| Stanislaus Coun |   California |   514453|   88698|  30054 |  10224 |    1229|
|   Denver County |     Colorado |   600158|   64735|  25553 |   5272 |    1682|
|  El Paso County |     Colorado |   622263|  240246|  50636 |  21087 |    2205|
| Jefferson Count |     Colorado |   534543|  170993|  24065 |  18477 |    1596|
| Arapahoe County |     Colorado |   572003|   96164|  14864 |  11041 |     956|
| New Castle Coun |     Delaware |   538479|  188452|  36255 |  22834 |    3214|
| District of Col | District of  |   601723|   27650|   9661 |   3740 |    2770|
|  Brevard County |      Florida |   543376|  263515|  75537 |  51368 |    4501|
|      Lee County |      Florida |   618754|  283984|  90130 |  64893 |    4542|
|     Polk County |      Florida |   602095|  336085| 126403 |  61393 |    5237|
|     Cobb County |      Georgia |   688078|  267654|  55152 |  23245 |    2579|
|   DeKalb County |      Georgia |   691893|  187313|  66254 |  15422 |    4527|
|     Kane County |     Illinois |   515269|  160682|  23981 |  16288 |    1779|
|     Will County |     Illinois |   677560|  335051|  55913 |  29884 |    3330|
|  Johnson County |       Kansas |   544179|  127012|  15541 |  12155 |    1216|
| Anne Arundel Co |     Maryland |   537656|  209639|  25609 |  27851 |    2276|
|  Baltimore city |     Maryland |   620961|   28080|  11247 |   3378 |    2867|
|  Bristol County | Massachusett |   548285|  223651|  33483 |  30062 |    3006|
|  Norfolk County | Massachusett |   670850|  246316|  24646 |  33444 |    3871|
|     Kent County |     Michigan |   602622|  208434|  39449 |  23898 |    2617|
|   Ramsey County |    Minnesota |   508640|  105838|  26521 |  15405 |    2991|
|  Jackson County |     Missouri |   674158|  209917|  58221 |  24054 |    4858|
|  Douglas County |     Nebraska |   517110|   82670|  14503 |   8642 |    1089|
| Monmouth County |   New Jersey |   630380|  252701|  34201 |  30580 |    3920|
|   Camden County |   New Jersey |   513657|  108049|  23744 |  13859 |    2568|
|    Ocean County |   New Jersey |   576567|  296355|  57956 |  74057 |    7152|
|  Passaic County |   New Jersey |   501226|   91476|  10633 |  13816 |    1261|
|   Hudson County |   New Jersey |   634266|    4315|    754 |    436 |     150|
|    Union County |   New Jersey |   536499|   58809|   5061 |   9712 |     893|
| Bernalillo Coun |   New Mexico |   662564|  157904|  47265 |  16272 |    1792|
| Montgomery Coun |         Ohio |   535153|  174304|  59220 |  27842 |    6178|
|   Summit County |         Ohio |   541781|  190700|  44047 |  26817 |    3926|
|    Tulsa County |     Oklahoma |   603403|  193996|  62890 |  24977 |    5212|
| Washington Coun |       Oregon |   529710|  104919|  17019 |   9863 |    1011|
|    Bucks County | Pennsylvania |   625249|  281829|  36183 |  38535 |    3239|
| Lancaster Count | Pennsylvania |   519445|  252187|  61332 |  34381 |    9337|
| Delaware County | Pennsylvania |   558979|   91418|  13478 |  14085 |    1903|
| Providence Coun | Rhode Island |   626667|  133323|  24129 |  19726 |    3279|
| Davidson County |    Tennessee |   626681|  198955|  58153 |  22829 |    4083|
| Fort Bend Count |        Texas |   585375|  209255|  43319 |  14838 |    1175|
|   Denton County |        Texas |   662614|  228477|  46388 |  17466 |    1599|
|     Utah County |         Utah |   516564|  202992|  47652 |  11586 |     949|
--------------------------------------------------------------------------------

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!