Skip to content

A Python library that standardizes the names of U.S. states

Notifications You must be signed in to change notification settings

ftobia/latimes-statestyle

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

8""""8                           8""""8                         
8      eeeee eeeee eeeee eeee    8      eeeee e    e e     eeee 
8eeeee   8   8   8   8   8       8eeeee   8   8    8 8     8    
    88   8e  8eee8   8e  8eee        88   8e  8eeee8 8e    8eee 
e   88   88  88  8   88  88      e   88   88    88   88    88   
8eee88   88  88  8   88  88ee    8eee88   88    88   88eee 88ee 

A Python library that standardizes the names of U.S. states

Features

  • Submit a state’s name, postal abbreviation or fips code and receive a clean object with all other formats as attributes.
  • State objects also provide the “stateface” code for ProPublica’s web font of state shapes

Getting started

Getting started is as easy as…

$ pip install latimes-statestyle

Then start feeding it your data:

>> import statestyle
>>> obj = statestyle.get('CA')
>>> print obj.name
California
>>> print obj.postal
CA
>>> print obj.ap
Calif.
>>> obj = statestyle.get(6)
>>> print obj.name
California
>>> obj.stateface
"E"

About

A Python library that standardizes the names of U.S. states

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%