
The accuracy needs some exploration. It is not clear yet whether a higher number means greater accuracy.

### Read and Clean:


```{r, message = FALSE, warning = FALSE}
library(data.table) #reading in the data
library(dplyr) #dataframe manipulation
library(ggplot2) #viz
library(ranger) #the random forest implementation
library(plotly) #3D plotting
library(tidyr) #dataframe manipulation

fb <- fread("../input/train.csv", integer64 = "character", showProgress = FALSE)
```

Now we'll select a subset of the data - I'll just pick a random 250 meters by 250 meters square in our imaginary Facebook city.

```{r}
#Visualize Accuracy
fb %>% filter(accuracy>200) ->fbsa
fbsa %>% group_by(place_id) %>% summarise(freq=n()) -> fbsa_places
fbsa_places %>% top_n(n=100,wt=freq) -> fbsa_places
fbsa_places %>% inner_join(fb) -> fbsa_all

#Pick three places randomly and visualize
fbsa_all %>% filter(place_id %in% sample(fbsa_all$place_id,3)) -> fbsa_vis
library(plotly)
plot_ly(fbsa_vis,x=x,y=y,z=accuracy,color=place_id,type="scatter3d",mode="markers")

```