Skip to content

Latest commit

 

History

History
262 lines (159 loc) · 7.72 KB

MunicipalityApi.md

File metadata and controls

262 lines (159 loc) · 7.72 KB

intrinio_sdk.MunicipalityApi

All URIs are relative to https://api-v2.intrinio.com

Method HTTP request Description
get_all_municipalities GET /municipalities All Municipalities
get_municipality_by_id GET /municipalities/{id} Municipality by ID
get_municipality_financials GET /municipalities/{id}/financials Financials for a Municipality

get_all_municipalities

View Intrinio API Documentation

ApiResponseMunicipalities get_all_municipalities(has_financials=has_financials, government_name=government_name, government_type=government_type, area_name=area_name, area_type=area_type, city=city, state=state, zipcode=zipcode, population_greater_than=population_greater_than, population_less_than=population_less_than, enrollment_greater_than=enrollment_greater_than, enrollment_less_than=enrollment_less_than, next_page=next_page)

All Municipalities

Returns all Municipalities. When parameters are specified, returns matching municipalities.

Example

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

has_financials = ''
government_name = ''
government_type = ''
area_name = ''
area_type = ''
city = ''
state = ''
zipcode = ''
population_greater_than = ''
population_less_than = ''
enrollment_greater_than = ''
enrollment_less_than = ''
next_page = ''

response = intrinio.MunicipalityApi().get_all_municipalities(has_financials=has_financials, government_name=government_name, government_type=government_type, area_name=area_name, area_type=area_type, city=city, state=state, zipcode=zipcode, population_greater_than=population_greater_than, population_less_than=population_less_than, enrollment_greater_than=enrollment_greater_than, enrollment_less_than=enrollment_less_than, next_page=next_page)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
has_financials bool Return municipalities with financials [optional]  
government_name str Return municipalities with a government name matching the given query [optional]  
government_type str Return municipalities with the given government type [optional]  
area_name str Return municipalities with an area name matching the given query [optional]  
area_type str Return municipalities with the given area type [optional]  
city str Return municipalities in the given city [optional]  
state str Return municipalities in the given state [optional]  
zipcode float Return municipalities in the given zipcode [optional]  
population_greater_than float Return municipalities with a population greater than the given number [optional]  
population_less_than float Return municipalities with a population less than the given number [optional]  
enrollment_greater_than float Return municipalities with an enrollment greater than the given number [optional]  
enrollment_less_than float Return municipalities with an enrollment less than the given number [optional]  
next_page str Gets the next page of data from a previous API call [optional]  

Return type

ApiResponseMunicipalities

get_municipality_by_id

View Intrinio API Documentation

Municipality get_municipality_by_id(id)

Municipality by ID

Returns the Municipality with the given ID

Example

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

id = 'mun_Xn7x4z'

response = intrinio.MunicipalityApi().get_municipality_by_id(id)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
id str An Intrinio ID of a Municipality  

Return type

Municipality

get_municipality_financials

View Intrinio API Documentation

ApiResponseMunicipalitiyFinancials get_municipality_financials(id, fiscal_year=fiscal_year)

Financials for a Municipality

Returns financial statement data for the Municipality with the given ID

Example

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key('YOUR_API_KEY')
intrinio.ApiClient().allow_retries(True)

id = 'mun_Xn7x4z'
fiscal_year = 2017

response = intrinio.MunicipalityApi().get_municipality_financials(id, fiscal_year=fiscal_year)
print(response)
    
# Note: For a Pandas DataFrame, import Pandas and use pd.DataFrame(response.property_name_dict) 

Parameters

Name Type Description Notes
id str An Intrinio ID of a Municipality  
fiscal_year float Return financials for the given fiscal year [optional]  

Return type

ApiResponseMunicipalitiyFinancials