I used the package with the same data (my IRIS data, your shape bureaux 2012 and your data IRIS 2011) to understand and it was ok.
Then I wanted to use the same Data except for the shape bureaux 2017.
( )
I had an issue with my excell to make it into a shape to use in the script, but @pokyah found me a solution :
# read excel
dataExcel = readxl::read_excel("~/Downloads/bureaux-de-votes.xls", sheet = "Sheet")
# splitting the geo_point_2d in to columns lon and lat
dataExcel = dataExcel %>%
tidyr::separate(geo_point_2d, c("lat", "lon"), ",") %>%
dplyr::mutate_at(vars(c("lon","lat")), funs(as.numeric)) %>%
dplyr::select(-one_of("geo_shape"))
# making it a sf
dataExcelsf = sf::st_as_sf(dataExcel, coords = c("lon", "lat"))
# setting the CRS
dataExcelsf = sf::st_set_crs(dataExcelsf, 4326)
# view it on a map
mapview::mapview(dataExcelsf)
# making it a sp
dataExcelsf = as(dataExcelsf, "Spatial")
But even with this help, I'm stuck with an error message and i can't find the error in the R script of spReaportion.
I used the package with the same data (my IRIS data, your shape bureaux 2012 and your data IRIS 2011) to understand and it was ok.
Then I wanted to use the same Data except for the shape bureaux 2017. ( )
I had an issue with my excell to make it into a shape to use in the script, but @pokyah found me a solution :
But even with this help, I'm stuck with an error message and i can't find the error in the R script of spReaportion.
Maybe my data are not usable in this script ?
Thanks