Skip to contents

this function automatically calculates the market size for a given address value.

Usage

Calc_Market_Size(address, df_census_call, df_geocode, df_grocery_only, state)

Arguments

address

an address separated by commas containing street, city, and abbreviated state. Example: "Main Street, Lamoni, IA"

df_census_call

a data frame containing city, county, and state values inherited from DSPGrocery::Create_Circle_Buffer.

df_geocode

a data frame containing the lng and lat value of the geocoded address inherited from DSPGrocery::Create_Circle_Buffer.

df_grocery_only

a data frame containing the values returned froma a call to googleway::google_places filtered for stores with the type set to "grocery". Also inherited from DSPGrocery::Create_Circle_Buffer.

state

a character value containing the abbreviated state value of the address.

Value

returns a list of atomic vectors containing city_population, metro_population, and rural_population.

Details

this function calls DSPGGrocery::Pop_Binder, DSPGGrocery::Cities_Pop, DSPGGrocery::Metro_Pop and DSPGGrocery::Rural_Pop.

Author

Alex Cory