Skip to main content

County Data is a simple tool for getting data about US counties. It returns information such as average income, area, and more based on the county name provided.

Project description

County Data Lookup API

County Data is a simple tool for getting data about US counties. It returns information such as average income, area, and more based on the county name provided.

Build Status Code Climate Prod Ready

This is a Python API Wrapper for the County Data Lookup API


Installation

pip install apiverve-countydatalookup

Configuration

Before using the countydata API client, you have to setup your account and obtain your API Key.
You can get it by signing up at https://apiverve.com


Usage

The County Data Lookup API documentation is found here: https://docs.apiverve.com/api/countydata.
You can find parameters, example responses, and status codes documented here.

Setup

# Import the client module
from apiverve_countydatalookup.apiClient import CountydataAPIClient

# Initialize the client with your APIVerve API key
api = CountydataAPIClient("[YOUR_API_KEY]")

Perform Request

Using the API client, you can perform requests to the API.

Define Query
query = { "state": "MO",  "county": "Jackson" }
Simple Request
# Make a request to the API
result = api.execute(query)

# Print the result
print(result)
Example Response
{
  "status": "ok",
  "error": null,
  "data": {
    "name": "jackson county",
    "state": "MO",
    "age": {
      "0-4": 0.0644100874666257,
      "5-9": 0.06532756955438819,
      "10-14": 0.065950603902357144,
      "15-19": 0.05967616438434107,
      "20-24": 0.059725950234064615,
      "25-29": 0.081924749399369279,
      "30-34": 0.075233531196524664,
      "35-39": 0.06868029092005673,
      "40-44": 0.058310609649066661,
      "45-49": 0.058805623240603636,
      "50-54": 0.05858087569042305,
      "55-59": 0.0674783182624454,
      "60-64": 0.062084377058111463,
      "65-69": 0.05099777955110233,
      "70-74": 0.038915465049622268,
      "75-79": 0.026437708656052324,
      "80-84": 0.017489057781457189,
      "85+": 0.019971238003388282
    },
    "male": 339932,
    "female": 363079,
    "deaths": {
      "suicides": 106.71428571428571,
      "homicides": 115.42857142857143,
      "vehicle": 93,
      "firearmsuicides": 55.095238095238095
    },
    "health": {
      "poorhealth": 20.588989742,
      "physicallyunhealthydays": 4.247736361,
      "mentallyunhealthydays": 4.8111015035,
      "lowbirthweightpercent": 9.1518749808,
      "smokerspercent": 20.957241772,
      "obesitypercent": 31.5,
      "foodenvindex": 7.5,
      "physicallyinactivepercent": 23.2,
      "excessivedrinkingpercent": 18.940103365,
      "alcoholimpaireddrivingdeaths": 152,
      "teenbirthrate": 31.109351559,
      "uninsured": 12.486314662,
      "withannualmammogram": 45,
      "vaccinated": 51,
      "childreninpoverty": 19.6,
      "80thpercentileincome": 108296,
      "20thpercentileincome": 23275,
      "childreninsingleparenthouseholds": 33.224850811,
      "violentcrimerate": 941.43198334,
      "averagedailypm25": 9.1,
      "severehousingproblems": 15.347550638,
      "drivealonetowork": 83.470246386,
      "longcommutedrivesalone": 33.7
    },
    "longitude": -94.347496655033936,
    "latitude": 39.016701918102484,
    "education": {
      "lessthanhighschool": 9.4,
      "highschool": 28.3,
      "somecollege": 30.7,
      "bachelors": 31.6
    },
    "zipcodes": [
      "64137",
      "64111",
      "64053",
      "64055",
      "64064",
      "64029",
      "64106",
      "64108",
      "64034",
      "64118",
      "64136",
      "64139",
      "64125",
      "64030",
      "64014",
      "64066",
      "64080",
      "64123",
      "64131",
      "64145",
      "64128",
      "64121",
      "64170",
      "64050",
      "64057",
      "64133",
      "64109",
      "64130",
      "64134",
      "64129",
      "64158",
      "64163",
      "64070",
      "64102",
      "64105",
      "64086",
      "64101",
      "64124",
      "64157",
      "64088",
      "64061",
      "64051",
      "64002",
      "64081",
      "64013",
      "64016",
      "64112",
      "64114",
      "64110",
      "64152",
      "64127",
      "64147",
      "64120",
      "64146",
      "64199",
      "64058",
      "64054",
      "64074",
      "64119",
      "64138",
      "64149",
      "64156",
      "64132",
      "64171",
      "64148",
      "64141",
      "64999",
      "64052",
      "64015",
      "64063",
      "64075",
      "64056",
      "64082",
      "64113",
      "64155",
      "64126",
      "64197",
      "64065",
      "64198"
    ],
    "lifeexpectancy": 77.19,
    "avgincome": 47054,
    "povertyrate": 13.7,
    "costofliving": {
      "livingwage": 14.55,
      "foodcosts": 3246,
      "medicalcosts": 2681,
      "housingcosts": 8136,
      "taxcosts": 6263
    },
    "landareakm2": 1565.601892,
    "areakm2": 1596.319707
  },
  "code": 200
}

Customer Support

Need any assistance? Get in touch with Customer Support.


Updates

Stay up to date by following @apiverveHQ on Twitter.


Legal

All usage of the APIVerve website, API, and services is subject to the APIVerve Terms of Service and all legal documents and agreements.


License

Licensed under the The MIT License (MIT)

Copyright (©) 2024 APIVerve, and Evlar LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apiverve_countydatalookup-1.1.4.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file apiverve_countydatalookup-1.1.4.tar.gz.

File metadata

File hashes

Hashes for apiverve_countydatalookup-1.1.4.tar.gz
Algorithm Hash digest
SHA256 40ffbdedfb86c4ee8a8e8ded20477f8ca513b4dccd9330a424c2dd52cb25c339
MD5 875250cdd86984b3db745ad82bc5073d
BLAKE2b-256 a3bb82f8f7810280c82fb31daff7e58fa6335ad3616560b99338d3c4060fe311

See more details on using hashes here.

File details

Details for the file apiverve_countydatalookup-1.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for apiverve_countydatalookup-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 25eac9cd3c39ca746df5a7ad55f4692c7c55df9c5a9a5fca291895adeececb82
MD5 555a49a901541e65ae7ba9dcb5d4018c
BLAKE2b-256 97366f3dbc265136cdb1d7ade3c5b5c6feb166894e8ef000e1b26c62ab722672

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page