Hi All,

**Background:**

I want to produce a Getis-Ord Gi* hotspot analysis using some data I gathered that tracked a person in a space. What I have is a "room" of known size and location (rectangle in shape) and a series of coordinates which is the tracking data (X and Y). I have so far managed to plot these coordinates inside a box and have done a density plot to generate a heatmap (of sorts). Now what I want to do is divide the "room" up into 2cm squares and perform a Getis-Ord Gi* calculation.

**Problem:**

I am trying to create a Getis-Ord Gi* plot/ statistic for my data. My data has 6 columns, column 2 (HPY) and column 3 (HPX) are the X and Y coordinates (or Y and X as it is layed out).

I have made some progress, but I fear my coordinate data needs to be converted to a different data type for the package to work? I am no expert in R or spatial statistics. You will be able to see what I have done in the markdown file. As I am learning I am leaving notes to myself as a sort of running comentry.

**Files:**

R Markdown File: https://1drv.ms/u/s!AptelOm1uCFblhDAYTYmp4Op-NLk?e=ldIb7B

Dataset: https://1drv.ms/u/s!AptelOm1uCFblhLtupDUBBIiOYLu?e=lGOnWw

Any help would be much appreciated.