geoDetail
Query to specify data request for geographic detail around zip, county, metro, state or region - including US Census population statistics at each level
Get Started with geoDetail
If you have already setup CareQuery, run the below code to get started with your first geoDetail query.
Example:
Request all geographic detail for all zips, counties, state, division and region corresponding to the Atlanta, Sandy Springs and Roswell Georgia area.
# import package
from care_query.care_query import CareQuery
# instantiate and connect
cq = CareQuery(email = "your-email",
token = "your-api-token")
# construct query
query = cq.geoDetail(metro = ["atlanta-sandy springs-roswell, ga"])
# estimate query size (optional)
estimate = query.estimate()
# return query sample data (optional)
sample = query.sample()
# execute query to return results
data = query.execute()
Query Parameters
The following a parameters are available within the geoDetail query, including details on the parameter values.
parameter | description | options |
---|---|---|
short_zip | First three digits the zip code of the query patient population specified | First 3 digits of zip code(s) |
metro | Metropolitan and micropolitan statistical areas according to the US Census Bureau | values available |
state | US State residence of the query patient population | values available |
division | Nine distinct US State groupings as defined by the US Census Bureau | values available |
region | Four major US State groupings as defined by the US Census Bureau | values available |
limit | Number of rows returned in the data request | Integer or False |
show | Binary indicator as to whether you'd like query to be printed for review upon it's creation | True or False |
Query Return Data
The geoDetail query returns the GEO_TABLE for all zip codes that meet the criterion specified within the query.
The GEO_TABLE offers a hierarchical structure into zip codes, counties with their corresponding metros, state, division and regions of the US - including population and growth statistics at each level - as sourced by the US Census Bureau annually.
feature | description | example |
---|---|---|
zip | Postal Zone Improvement Plan (ZIP) code corresponding to a geographic area | 36511 |
zip3 | First three digits of the zip code | 365 |
county_code | US Government's Federal Information Processing Standards (FIPS) code for state-county combination. | 1003 |
county | Name and State of the corresponding county | baldwin county, al |
county_pop | US Census estimated population of the County population | 246,435 |
county_growth_rate | US Census estimated County population growth trend | 2.96% |
metro | US Census Bureau metropolitan and micropolitan statistical area | mobile-daphne-fairhope, al |
metro_location | Centrality of the county as it relates to the corresponding Metro | central |
state_code | Two digit code representing a US State | AL |
state | Full name of US State | alabama |
state_pop | US Census estimated population of the State population | 4,670,054 |
state_growth_rate | US Census estimated State population growth trend | 0.55% |
division | Nine minor State groupings as defined by the US Census Bureau | east south central |
division_pop | US Census estimated population of the Division population | 17,113,731 |
division_growth_rate | US Census estimated Division population growth trend | 0.62% |
region | Four major State groupings as defined by the US Census Bureau | south |
region_pop | US Census estimated population of the Region population | 120,425,628 |
region_growth_rate | US Census estimated Region population growth trend | 1.14% |
Advanced Query Logic & Recipes
geoDetail gives users categorical groupings for ease of use, as well as SQL-like capabilities to tactfully specify AND and OR logic, right within the CareQuery API!
geoDetail does not allow for nested lists within the query parameters
Please reference the following resources to better understand how to create rockstar queries!
Updated about 1 year ago