Beispiel #1
0
class PlaceStats(BaseStat, GeoId):
    __tablename__ = "place"
    median_moe = 1.2

    parent_counties = db.Column(postgresql.ARRAY(db.String))
    places_neighbors = db.Column(postgresql.ARRAY(db.String))

    @classmethod
    def get_supported_levels(cls):
        return {"geo": [consts.PLACE]}
Beispiel #2
0
class Acs3_Ygi_MedEarnings(BaseAcs3, AcsIndId, GeoId):
    __tablename__ = "ygi_med_earnings"
    median_moe = 2

    med_earnings = db.Column(db.Float)
    med_earnings_moe = db.Column(db.Float)

    @classmethod
    def get_supported_levels(cls):
        return {"geo": [NATION, STATE, COUNTY, MSA, PLACE, PUMA, ALL], "acs_ind": ["0", "1", "all"]}
Beispiel #3
0
class MSAStats(BaseStat, GeoId):
    __tablename__ = "msa"
    median_moe = 1.2

    top_counties = db.Column(postgresql.ARRAY(db.String))
    top_places = db.Column(postgresql.ARRAY(db.String))

    @classmethod
    def get_supported_levels(cls):
        return {"geo": [consts.MSA]}
Beispiel #4
0
class PUMAStats(BaseStat, GeoId):
    __tablename__ = "puma"
    median_moe = 1.2

    puma_state_rank = db.Column(db.Integer)
    pumas_in_state = db.Column(db.Integer)
    puma_neighbors = db.Column(postgresql.ARRAY(db.String))

    @classmethod
    def get_supported_levels(cls):
        return {"geo": [consts.PUMA]}
Beispiel #5
0
class Acs3_Ygi_Num_Emp(BaseAcs3, AcsIndId, GeoId):
    __tablename__ = "ygi_num_emp"
    median_moe = 2

    num_emp = db.Column(db.Float)
    num_emp_moe = db.Column(db.Float)
    num_emp_rca = db.Column(db.Float)

    @classmethod
    def get_supported_levels(cls):
        return {"geo": [NATION, STATE, MSA, ALL], "acs_ind": AcsIndId.LEVELS}
Beispiel #6
0
class Acs5_Ygi_Num_Emp(BaseAcs5, AcsIndId, GeoId):
    __tablename__ = "ygi_num_emp"
    median_moe = 1.9

    num_emp = db.Column(db.Float)
    num_emp_moe = db.Column(db.Float)
    num_emp_rca = db.Column(db.Float)

    @classmethod
    def get_supported_levels(cls):
        return {"geo": [NATION, STATE, COUNTY, PLACE, MSA, PUMA, ALL],
                "acs_ind": ["0", "1", ALL]}
Beispiel #7
0
class CountyStats(BaseStat, GeoId):
    __tablename__ = "counties"
    median_moe = 1.2

    year = db.Column(db.Integer, primary_key=True)
    county_state_rank = db.Column(db.Integer)
    places_in_county = db.Column(db.Integer)
    top_places = db.Column(postgresql.ARRAY(db.String))
    county_neighbors = db.Column(postgresql.ARRAY(db.String))

    @classmethod
    def get_supported_levels(cls):
        return {"geo": [consts.COUNTY]}
Beispiel #8
0
class StateStats(BaseStat, GeoId):
    __tablename__ = "state"
    median_moe = 1.2

    year = db.Column(db.Integer, primary_key=True)
    state_rank = db.Column(db.Integer)
    top_places = db.Column(postgresql.ARRAY(db.String))
    top_counties = db.Column(postgresql.ARRAY(db.String))
    state_neighbors = db.Column(postgresql.ARRAY(db.String))

    @classmethod
    def get_supported_levels(cls):
        return {"geo": [consts.STATE]}
Beispiel #9
0
class Acs1_Ygas_Health(BaseAcs1, GeoId1, BaseHealth):
    __tablename__ = "ygas_health"
    median_moe = 3

    sex = db.Column(db.String(), primary_key=True)
    age_bucket = db.Column(db.String(), primary_key=True)

    @classmethod
    def get_supported_levels(cls):
        return {
            "geo": [NATION, STATE, COUNTY, PLACE, MSA, PUMA, ALL],
            "sex": [ALL],
            "age_bucket": [ALL]
        }
Beispiel #10
0
class Acs1_Ygi_Health(BaseAcs1, GeoId1, BaseHealth):
    __tablename__ = "ygi_health"
    median_moe = 2

    insurance = db.Column(db.String(), primary_key=True)

    @classmethod
    def get_supported_levels(cls):
        return {
            "geo": [NATION, STATE, COUNTY, PLACE, MSA, PUMA, ALL],
            "insurance": [ALL]
        }
Beispiel #11
0
class Acs5_Ygo_Earnings(BaseAcs5, GeoId, AcsOccId):
    __tablename__ = "ygo_med_earnings"
    median_moe = 2

    med_earnings = db.Column(db.Float)
    med_earnings_male = db.Column(db.Float)
    med_earnings_female = db.Column(db.Float)
    med_earnings_moe = db.Column(db.Float)
    med_earnings_moe_female = db.Column(db.Float)
    med_earnings_moe_male = db.Column(db.Float)
    med_earnings_rca = db.Column(db.Float)

    @classmethod
    def get_supported_levels(cls):
        return {"geo": [NATION, STATE, COUNTY, MSA, PLACE, PUMA, ALL], "acs_occ": AcsOccId.LEVELS}
Beispiel #12
0
class Acs5_Ygo_Num_Emp(BaseAcs5, GeoId, AcsOccId):
    __tablename__ = "ygo_num_emp"
    median_moe = 2

    num_emp = db.Column(db.Float)
    num_emp_moe = db.Column(db.Float)
    num_emp_rca = db.Column(db.Float)
    num_emp_male = db.Column(db.Float)
    num_emp_moe_male = db.Column(db.Float)
    num_emp_female = db.Column(db.Float)
    num_emp_moe_female = db.Column(db.Float)

    @classmethod
    def get_supported_levels(cls):
        return {"geo": [NATION, COUNTY, MSA, PLACE, PUMA, ALL], "acs_occ": AcsOccId.LEVELS}
Beispiel #13
0
class Acs5_Yg_Num_Emp(BaseAcs5, GeoId):
    __tablename__ = "yg_num_emp"
    median_moe = 1

    civ_labor_force = db.Column(db.Float)
    civ_labor_force_moe = db.Column(db.Float)
    emp_survey_total = db.Column(db.Float)
    emp_survey_total_moe = db.Column(db.Float)
    labor_force = db.Column(db.Float)
    labor_force_moe = db.Column(db.Float)
    not_in_labor_force = db.Column(db.Float)
    not_in_labor_force_moe = db.Column(db.Float)
    num_armed_forces = db.Column(db.Float)
    num_armed_forces_moe = db.Column(db.Float)
    num_emp = db.Column(db.Float)
    num_emp_moe = db.Column(db.Float)
    num_unemp = db.Column(db.Float)
    num_unemp_moe = db.Column(db.Float)

    @classmethod
    def get_supported_levels(cls):
        return {"geo": [NATION, COUNTY, MSA, PLACE, PUMA, ALL], "acs_occ": AcsOccId.LEVELS}