Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fiveham authored Nov 8, 2019
1 parent 2653705 commit eaa98a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The fips module simply wraps a huge pile of static data from the US Census Burea

It is named after the FIPS codes used by the USCB and some other federal entities to refer to specific geographic regions.

Everything worth doing in the module goes through its `states` table: `fips.states`. By default, that table is indexed by states' postal abbreviations/codes (AL, AR, MS, etc.), which enables quick, human access to a state's info via `fips.states.[postal code here]`. The index is case-insensitive by default; so `fips.states.ak` works just as well as `fips.states.AK`, for example. Each state is a dict that treats keys case-insensitively, treats unknown attributes as keys, and has a key `COUNTIES` that maps to a table of the county information for all the counties in that state. Those county tables are, by default, indexed by the counties' FIPS codes (`'001'`, `'003'`, etc.). Those tables use the same sort of case-insensitive, attribute-defering dict that the overall `states` table uses, but one other feature of these tables is that calling the table with a single parameter will look that parameter up in the index, which gets around the inability to use digits at the start of attribute names. Each county dict has a `STATE` key that points back to the state dict that the county (or county-equivalent) is part of.
Everything worth doing in the module goes through its `states` table: `fips.states`. By default, that table is indexed by states' postal abbreviations/codes (AL, AR, MS, etc.), which enables quick, human access to a state's info via `fips.states.[postal code here]`. The index is case-insensitive by default; so `fips.states.ak` works just as well as `fips.states.AK`, for example. Each state is a dict that treats keys case-insensitively, treats unknown attributes as keys, and has a key `COUNTIES` that maps to a table of the county information for all the counties (or county-equivalents) in that state. Those county tables are indexed by the counties' FIPS codes (`'001'`, `'003'`, etc.). Those county tables use the same sort of case-insensitive, attribute-defering dict that the overall `states` table uses, but one other feature of these county tables is that calling the table with a single parameter will look that parameter up in the index, which gets around the inability to use digits at the start of attribute names. Each county dict has a `STATE` key that points back to the state dict that the county (or county-equivalent) is part of.

#For instance,
tangipahoa_parish = fips.states.la.counties('105')
Expand Down

0 comments on commit eaa98a9

Please sign in to comment.