0
$\begingroup$

I have a very simple dataset that has as columns the latitude and longitude of bookstores, and in the output column, has the number of customers / year. I've never explicitly deal with longitude/latitude coordinates as predictor variables before, but I was curious if one could use them as predictors to predict the number of customers/year for an arbitrary set of coordinates?

$\endgroup$
4
$\begingroup$

The answer relies on the question: are sales related to location?

There might also be some linear relation between location and sales in the sense that "the further you go away from city centre, the less books people read", which is definitely worth checking by simply running a correlation analysis between longitude,latitude and sales and see it in a matter of seconds using either Matlab or Python (Pandas).

Another thing that you can do, since you have two inputs, you can plot the sales for each location (longitute,latitude) on a 2D colormap (heatmap), where color intensity shows number of sales. Let us assume that light and dark colors correspond to low and high sales respectively. If you see that similar color intensity is gathered in same regions of the map, it means that location actually affects the sales. On the other hand, if you see randomly colored points in a small area, this means that sales are irrelevant to location.

$\endgroup$
1
$\begingroup$

I agree with @pcko1. Intuitively, the coordinates itself maybe not actually influence the sales as much as other factors, but with them, you can potentially enrich your data to make a very robust model.

You can probably get a lot of social demographic data based on coordinates (population, mean and median HHI, other demographic distribution, etc.) to help you with the prediction.

If you take the above approach, instead of using the straight coordinates as input, you will use it to look up the Metro, States, etc. other features you can unpack and use these as the input to build the model and get prediction.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.