Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

District of Columbia doesn't exist in States but exist in states #67

Open
msmall318 opened this issue Jul 22, 2022 · 2 comments
Open

District of Columbia doesn't exist in States but exist in states #67

msmall318 opened this issue Jul 22, 2022 · 2 comments

Comments

@msmall318
Copy link

No description provided.

@depmc232
Copy link

Setting DC Statehood with an environment variable doesn't not appear to add the district to the STATES list as one would expect from the docs. It is present in the us.states list whether or not DC_STATEHOOD is True.

See behavior below, when DC_STATEHOOD is True

import libraries

import os
import us

Set environment variable

os.environ['DC_STATEHOOD'] = '1'

Find DC in states list

states_s=[us.states.DC]
states_s

returns [<State:District of Columbia>]

Find DC in STATES list

us.states.STATES

returns [State:Alabama,
State:Alaska,
State:Arizona,
State:Arkansas,
State:California,
State:Colorado,
State:Connecticut,
State:Delaware,
State:Florida,
State:Georgia,
State:Hawaii,
State:Idaho,
State:Illinois,
State:Indiana,
State:Iowa,
State:Kansas,
State:Kentucky,
State:Louisiana,
State:Maine,
State:Maryland,
State:Massachusetts,
State:Michigan,
State:Minnesota,
State:Mississippi,
State:Missouri,
State:Montana,
State:Nebraska,
State:Nevada,
<State:New Hampshire>,
<State:New Jersey>,
<State:New Mexico>,
<State:New York>,
<State:North Carolina>,
<State:North Dakota>,
State:Ohio,
State:Oklahoma,
State:Oregon,
State:Pennsylvania,
<State:Rhode Island>,
<State:South Carolina>,
<State:South Dakota>,
State:Tennessee,
State:Texas,
State:Utah,
State:Vermont,
State:Virginia,
State:Washington,
<State:West Virginia>,
State:Wisconsin,
State:Wyoming]

This seems buggy on both the default inclusion of DC in states and the exclusion of DC from STATES when statehood is true. I am using the latest version 2.0.2. Please lmk if there is any other info I can provide.

Thanks!

@jcarbaugh
Copy link
Member

jcarbaugh commented May 30, 2023

@depmc232 apologies for the confusion there! The documentation reflected an unreleased version of the us package 😖 but version 3.1.1 was just pushed to PyPI and includes the DC_STATEHOOD flag.

DC will always show up as an attribute of us.states just because it's the namespace of all types of states, territories, obsolete states, etc. However it should NOT show in STATES or any of the other convenience lists unless DC_STATEHOOD is set.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants