diff --git a/.Rbuildignore b/.Rbuildignore
new file mode 100644
index 0000000..025b8dc
--- /dev/null
+++ b/.Rbuildignore
@@ -0,0 +1,2 @@
+^webspatialscan\.Rproj$
+^\.Rproj\.user$
diff --git a/.Rhistory b/.Rhistory
new file mode 100644
index 0000000..ae41c70
--- /dev/null
+++ b/.Rhistory
@@ -0,0 +1,512 @@
+# Load rsatscan package
+library(rsatscan)
+# Load csv files for cases, population and coordinates
+MCRJ_data <- read.csv("C:/Users/Maira Alejandra/Desktop/dados_OCPUtestes/arquivos_csv/2015-2016/mc15-16.csv" , sep = ";")
+NVRJ_data <- read.csv("C:/Users/Maira Alejandra/Desktop/dados_OCPUtestes/arquivos_csv/2015-2016/nv15-16.csv" , sep = ";")
+RJ_data <- read.csv("C:/Users/Maira Alejandra/Desktop/dados_OCPUtestes/arquivos_csv/2015-2016/rj.csv" , sep = ";")
+# Create a temporary directory for storing writen files
+td = tempdir()
+# Write and store cases, population and coordinates satscan files
+write.cas(MCRJ_data, td, "MCRJ")
+write.pop(NVRJ_data, td, "MCRJ")
+write.geo(RJ_data, td, "MCRJ")
+# Resetting the parameter file
+invisible(ss.options(reset=TRUE, version="10.1"))
+# Create satscan parameter list
+ss.options(list(CaseFile="MCRJ.cas", StartDate="2015/1/1",EndDate="2016/12/31", PopulationFile="MCRJ.pop", CoordinatesFile="MCRJ.geo", CoordinatesType=0, AnalysisType=3))
+ss.options(c("NonCompactnessPenalty=0", "ReportGiniClusters=n", "LogRunToHistoryFile=n" , "MaxSpatialSizeInPopulationAtRisk=25", "TimeAggregationUnits=1", "TimeAggregationLength=2"))
+# Write satscan parameter file
+write.ss.prm(td,"poissonmc")
+# Run poisson analysis by calling the satscan function
+poissonmc = satscan(td,"poissonmc", sslocation="C:/Program Files/SaTScan", ssbatchfilename="SaTScanBatch64")
+summary(poissonmc)
+# Load rsatscan
+library(rsatscan)
+#Load data
+MCBr16_data <-read.csv("C:/Users/Maira Alejandra/Desktop/dados_OCPUtestes/arquivos_csv/2016/MCBr_16.csv" , sep = ";")
+NVBr16_data <-read.csv("C:/Users/Maira Alejandra/Desktop/dados_OCPUtestes/arquivos_csv/2016/NVBr_16.csv" , sep = ";")
+GEOBr_data <-read.csv("C:/Users/Maira Alejandra/Desktop/dados_OCPUtestes/arquivos_csv/2016/GEOBr.csv" , sep = ";")
+# Create a temporary directory for storing writen files
+td = tempdir()
+# Write and store cases, population and coordinates satscan files
+write.cas(MCBr16_data, td, "MCBr")
+write.pop(NVBr16_data, td, "MCBr")
+write.geo(GEOBr_data, td, "MCBr")
+# Resetting the parameter file
+invisible(ss.options(reset=TRUE, version="10.1"))
+# Create satscan parameter list
+ss.options(list(CaseFile="MCBr.cas", StartDate="2016/1/1",EndDate="2016/12/31", PopulationFile="MCBr.pop", CoordinatesFile="MCBr.geo", CoordinatesType=0, AnalysisType=1))
+ss.options(c("NonCompactnessPenalty=0", "ReportGiniClusters=n", "LogRunToHistoryFile=n" , "MaxSpatialSizeInPopulationAtRisk=25"))
+# Write satscan parameter file
+write.ss.prm(td,"poissonmc")
+# Run poisson analysis by calling the satscan function
+poissonmc = satscan(td,"poissonmc", sslocation="C:/Program Files/SaTScan", ssbatchfilename="SaTScanBatch64")
+#Get results summary
+summary(poissonmc)
+# Visualizing col data
+cluster_data <- subset(poissonmc$col)
+View(cluster_data)
+# Visualizing gis data
+location_data <- subset(poissonmc$gis)
+View(location_data)
+# Creating multilayer map with scale
+library(leaflet)
+library(leaflet.extras)
+leaflet(cluster_data) %>%
+addTiles(group = "Mapa") %>%
+addCircleMarkers(
+~Y,
+~X,
+~RADIUS * 25,
+fillColor = ~ifelse(P_VALUE < 0.05, "red", "blue"),
+stroke = FALSE, fillOpacity = 0.2,
+popup = ~paste("RESUMO DADOS CLUSTER ", "
",
+"Cluster: ", CLUSTER, "
",
+"Periodo analisado: ", START_DATE, END_DATE, "
",
+"População: ", POPULATION, "
",
+"Número de casos: ", OBSERVED, "
",
+"Número de casos esperados: ", EXPECTED, "
",
+"Número de casos / casos esperados: ", ODE, "
",
+"Risco Relativo: ", REL_RISK, "
",
+"P-Valor: " , P_VALUE
+),
+group = "Clusters detectados") %>%
+addCircleMarkers(
+data = location_data,
+~LOC_Y,
+~LOC_X,
+radius = 2,
+color = 'black',
+stroke = FALSE, fillOpacity = 0.7,
+popup = ~paste("Local: ", LOC_ID),
+group = "Locais identificados") %>%
+# Layers control
+addLayersControl(
+baseGroups = c("Mapa"),
+overlayGroups = c("Clusters detectados", "Locais identificados"),
+options = layersControlOptions(collapsed = FALSE)
+) %>%
+# Map leyed
+addLegend(position = "bottomright",
+colors = c("red", "blue"),
+labels = c("Significativo (p < 0.05)" , "Não significativo (p > 0.05)"),
+title = "Clusters Microcefalia Congênita",
+opacity = 0.4) %>%
+addScaleBar(position = "bottomleft") %>%
+# Location search box
+addSearchOSM(options = searchOptions(position = "topleft", autoCollapse = TRUE, hideMarkerOnCollapse = TRUE, zoom = 5))
+print(poissonmc)
+library(DBI)
+library(rsatscan)
+library(leaflet)
+library(leaflet.extras)
+library(htmlwidgets)
+spatial_scan <- function(harm_code, year, data_iniChar, data_fimChar, scan_areaStr, tamanho_cluStr) {
+ conn_db <- dbConnect(RPostgres::Postgres(), dbname="spatialscan_db", host="localhost", user="postgres", password="postgres")
+ query_db <- paste("SELECT * FROM acbr_data",
+"WHERE agravo =", harm_code, sep = " ",
+"AND ano =", year)
+ filter_data <- dbGetQuery(conn_db, query_db)
+ td = tempdir()
+ casos_data <- data.frame(locID_cas = filter_data$cod,
+ cases_cas = filter_data$casos,
+ year_cas = filter_data$ano)
+ View(casos_data)
+ pop_data <- data.frame(locID_pop = filter_data$cod,
+ year_pop = filter_data$ano,
+ population_pop = filter_data$pop)
+ View(pop_data)
+ geo_data <- data.frame(locID_geo = filter_data$cod,
+ lat_geo = filter_data$lat,
+ long_geo = filter_data$long)
+ View(geo_data)
+
+ local_data <- data.frame(loc_name = filter_data$nm_local,
+ harm_name = filter_data$nm_agravo)
+ View(local_data)
+ dbDisconnect(conn_db)
+
+ write.cas(casos_data, td, "SSCAN")
+write.pop(pop_data, td, "SSCAN")
+write.geo(geo_data, td, "SSCAN")
+ invisible(ss.options(reset=TRUE, version="10.1"))
+ ss.options(list(CaseFile="SSCAN.cas", StartDate=data_iniChar,EndDate=data_fimChar, PopulationFile="SSCAN.pop", CoordinatesFile="SSCAN.geo", CoordinatesType=0, AnalysisType=1))
+ ss.options(c("NonCompactnessPenalty=0", "ReportGiniClusters=n", "LogRunToHistoryFile=n" , scan_areaStr, tamanho_cluStr))
+ write.ss.prm(td,"sscanresult")
+ sink(file = "sscanresult_output.txt")
+ sscanresult = satscan(td,"sscanresult", sslocation="C:/Program Files/SaTScan", ssbatchfilename="SaTScanBatch64")
+ print(sscanresult)
+sink(file = NULL)
+ cluster_data <- subset(sscanresult$col)
+ View(cluster_data)
+location_data <- subset(sscanresult$gis)
+ View(location_data)
+m <- leaflet(cluster_data) %>%
+addTiles(group = "Mapa") %>%
+addCircles(
+lat = ~Y,
+lng = ~X,
+radius = ~RADIUS * 25,
+fillColor = ~ifelse(P_VALUE < 0.05, "red", "blue"),
+stroke = FALSE, fillOpacity = 0.2,
+popup = ~paste("RESUMO DADOS CLUSTER ", "
",
+"Cluster: ", CLUSTER, "
",
+"Periodo analisado: ", START_DATE, END_DATE, "
",
+"População: ", POPULATION, "
",
+"Número de casos: ", OBSERVED, "
",
+"Número de casos esperados: ", EXPECTED, "
",
+"Número de casos / casos esperados: ", ODE, "
",
+"Risco Relativo: ", REL_RISK, "
",
+"P-Valor: " , P_VALUE
+),
+group = "Clusters detectados") %>%
+addCircleMarkers(
+data = location_data,
+~LOC_Y,
+~LOC_X,
+radius = 2,
+color = 'black',
+stroke = FALSE, fillOpacity = 0.7,
+ popup = ~paste("Local: ", LOC_ID),
+group = "Locais identificados") %>%
+addLayersControl(
+baseGroups = c("Mapa"),
+overlayGroups = c("Clusters detectados", "Locais identificados"),
+options = layersControlOptions(collapsed = FALSE)
+) %>%
+addLegend(position = "bottomright",
+colors = c("red", "blue"),
+labels = c("Significativo (p < 0.05)" , "Não significativo (p > 0.05)"),
+title = "Clusters Microcefalia Congênita",
+opacity = 0.4) %>%
+addScaleBar(position = "bottomleft") %>%
+addSearchOSM(options = searchOptions(position = "topleft", autoCollapse = TRUE, hideMarkerOnCollapse = TRUE, zoom = 5))
+scan_map <- saveWidget(m, "sscanresult_map.html", selfcontained = FALSE)
+}
+year = 2020
+harm_code = 1
+data_iniVal <- as.Date("2020/1/1")
+data_fimVal <- as.Date("2020/12/31")
+scan_areaVal <- 1
+tamanho_cluVal <- 25
+data_iniChar <- format(data_iniVal, "%Y/%m/%d")
+data_fimChar <- format(data_fimVal, "%Y/%m/%d")
+scan_areaStr <- paste("ScanAreas=", scan_areaVal, sep = " ")
+tamanho_cluStr <- paste("MaxSpatialSizeInPopulationAtRisk=", tamanho_cluVal, sep = " ")
+spatial_scan(harm_code, year, data_iniChar, data_fimChar, scan_areaStr, tamanho_cluStr)
+library(opencpu)
+ocpu_start_server()
+library(opencpu)
+ocpu_start_server()
+install.packages("webspatialscan_0.0.0.9000.tar.gz", repos = NULL, type = "source")
+library(opencpu)
+ocpu_start_server()
+library(leaflet)
+csv_data <- read.csv("C:/Users/Maira Alejandra/Desktop/geo_shapeBR-GF.csv", sep = ";")
+View(csv_data)
+leaflet(csv_data) %>% addTiles() %>%
+addCircleMarkers(
+~lat,
+~lng,
+radius = 0.5,
+color = "blue",
+stroke = FALSE, fillOpacity = 0.5
+)
+leaflet(csv_data) %>% addTiles() %>%
+addCircleMarkers(
+~lng,
+~lat,
+)
+leaflet(csv_data) %>% addTiles() %>%
+addCircleMarkers(
+~lng,
+~lat,
+radius = 0.5,
+color = "blue",
+stroke = FALSE, fillOpacity = 0.5
+)
+Leaflet(csv_data) %>% addTiles() %>%
++addCircleMarkers(
+~lng,
+~lat,
+radius = 2,
+color = "blue",
+stroke = FALSE, fillOpacity = 0.5
+)
+leaflet(csv_data) %>% addTiles() %>%
+addCircleMarkers(
+~lng,
+~lat,
+radius = 2,
+color = "blue",
+stroke = FALSE, fillOpacity = 0.5
+)
+leaflet(csv_data) %>% addTiles() %>%
+addCircleMarkers(
+~lng,
+~lat,
+radius = 5,
+color = "blue",
+stroke = FALSE, fillOpacity = 0.5
+)
+csv_data2 <- read.csv("C:/Users/Maira Alejandra/Desktop/geo_shapeBR-GF2.csv", sep = ";")
+View(csv_data2)
+leaflet(csv_data2) %>% addTiles() %>%
+addCircleMarkers(
+~lng,
+~lat,
+radius = 5,
+color = "blue",
+stroke = FALSE, fillOpacity = 0.5
+)
+leaflet(csv_data2) %>% addTiles() %>%
+addCircleMarkers(
+~lng,
+~lat,
+radius = 3,
+color = "blue",
+stroke = FALSE, fillOpacity = 0.5
+)
+csv_data3 <- read.csv("C:/Users/Maira Alejandra/Desktop/dados_testeBR-GF.csv", sep = ";")
+View(csv_data3)
+leaflet(csv_data3) %>% addTiles() %>%
+addCircleMarkers(
+~lng,
+~lat,
+radius = 5,
+color = "blue",
+stroke = FALSE, fillOpacity = 0.5
+)
+leaflet(csv_data3) %>% addTiles() %>%
+addCircleMarkers(
+~X.lng.,
+~X.lat.,
+radius = 5,
+color = "blue",
+stroke = FALSE, fillOpacity = 0.5
+)
+csv_data4 <- read.csv("C:/Users/Maira Alejandra/Desktop/dados_testeBR-GF2.csv", sep = ";")
+View(csv_data4)
+leaflet(csv_data4) %>% addTiles() %>%
+addCircleMarkers(
+~lng,
+~lat,
+radius = 5,
+color = "blue",
+stroke = FALSE, fillOpacity = 0.5
+)
+leaflet(csv_data4) %>% addTiles() %>%
+addCircleMarkers(
+~lng,
+~lat,
+radius = 3,
+color = "blue",
+stroke = FALSE, fillOpacity = 0.5
+)
+library(rsatscan)
+casos_data <- data.frame(
+loc_id = csv_data4$id,
+malaria_data = csv_data4$casos,
+ano_data = csv_data4$ano
+)
+View(casos_data)
+geo_data <- data.frame(
+geo_id = csv_data4$id,
+lati = csv_data4$lat,
+long = csv_data4$lng
+)
+View(geo_data)
+td = tempdir()
+write.cas(casos_data, td, "BRGFmalaria")
+write.geo(geo_data, td, "BRGFmalaria")
+invisible(ss.options(reset=TRUE, version="10.1"))
+ss.options(list(CaseFile="BRGFmalaria.cas", StartDate="2019/1/1",EndDate="2019/12/31", CoordinatesFile="BRGFmalaria.geo", CoordinatesType=0, AnalysisType=3, ModelType=2))
+ss.options(c("NonCompactnessPenalty=0", "ReportGiniClusters=n", "LogRunToHistoryFile=n" , "MaxSpatialSizeInPopulationAtRisk=50"))
+write.ss.prm(td, "scan_BRGFmalaria")
+scan_BRGFmalaria = satscan(td,"scan_BRGFmalaria", sslocation="C:/Program Files/SaTScan", ssbatchfilename="SaTScanBatch64")
+summary(scan_BRGFmalaria)
+write.cas(casos_data, td, "scan_BRGF")
+write.geo(geo_data, td, "scan_BRGF")
+invisible(ss.options(reset=TRUE, version="10.1"))
+ss.options(list(CaseFile="scan_BRGF.cas", PrecisionCaseTimes=1))
+ss.options(c("StartDate=2019/1/1","EndDate=2019/12/31"))
+ss.options(list(CoordinatesFile="scan_BRGF.geo", AnalysisType=3, ModelType=2, TimeAggregationUnits=1))
+ss.options(list(UseDistanceFromCenterOption="n", MaxSpatialSizeInDistanceFromCenter=3, NonCompactnessPenalty=0))
+ss.options(list(MaxTemporalSizeInterpretation=1, MaxTemporalSize=1))
+ss.options(list(ReportGiniClusters="n", LogRunToHistoryFile="n"))
+head(ss.options(),3)
+write.ss.prm(td, "scan_malariaBRGF")
+scan_malariaBRGF = satscan(td,"scan_malariaBRGF", sslocation="C:/Program Files/SaTScan", ssbatchfilename="SaTScanBatch64")
+summary(scan_malariaBRGF)
+View(geo_data)
+View(casos_data)
+library(rsatscan)
+csv_data <- read.csv("C:/Users/Maira Alejandra/Desktop/dados_testeBR-GF2.csv", sep = ";")
+View(csv_data)
+td = tempdir()
+casos_data <- data.frame(
+cas_id = csv_data$id,
+cas_data = csv_data$casos,
+cas_ano = csv_data$ano
+)
+View(casos_data)
+geo_data <- data.frame(
+geo_id = csv_data$id,
+latitude = csv_data$lat,
+longitude = csv_data$lng
+)
+View(geo_data)
+invisible(ss.options(reset=TRUE, version="10.1"))
+ss.options(list(CaseFile="scan_BRGF.cas", PrecisionCaseTimes=1))
+ss.options(c("StartDate=2019/1/1","EndDate=2019/12/21"))
+ss.options(list(CoordinatesFile="scan_BRGF.geo", AnalysisType=3, ModelType=2, TimeAggregationUnits=1))
+ss.options(list(UseDistanceFromCenterOption="y", MaxSpatialSizeInDistanceFromCenter=3, NonCompactnessPenalty=0))
+ss.options(list(MaxTemporalSizeInterpretation=1, MaxTemporalSize=1))
+ss.options(list(ReportGiniClusters="n", LogRunToHistoryFile="n"))
+ss.options(list(SaveSimLLRsDBase="y"))
+head(ss.options(),3)
+write.ss.prm(td, "malaria_BRGF")
+write.cas(casos_data, td, "scan_BRGF")
+write.geo(geo_data, td, "scan_BRGF")
+malaria_BRGF = satscan(td,"malaria_BRGF", sslocation="C:/Program Files/SaTScan", ssbatchfilename="SaTScanBatch64")
+summary(malaria_BRGF)
+library(rsatscan)
+csv_data <- read.csv("C:/Users/Maira Alejandra/Desktop/dados_testeBR-GF2.csv", sep = ";")
+View(csv_data)
+casos_data <- data.frame(
+cas_id = csv_data$id,
+cas_data = csv_data$casos,
+cas_ano = csv_data$ano
+)
+View(casos_data)
+geo_data <- data.frame(
+geo_id = csv_data$id,
+geo_lat = csv_data$lat,
+geo_lng = csv_data$lng
+)
+td = tempdir()
+invisible(ss.options(reset=TRUE, version="10.1"))
+ss.options(list(CaseFile="BRGF.cas", PrecisionCaseTimes=2))
+ss.options(c("StartDate=2019/1/1","EndDate=2019/12/31"))
+ss.options(list(CoordinatesFile="BRGF.geo", AnalysisType=4, ModelType=2, TimeAggregationUnits=2))
+ss.options(list(UseDistanceFromCenterOption="y", MaxSpatialSizeInDistanceFromCenter=3, NonCompactnessPenalty=0))
+ss.options(list(MaxTemporalSizeInterpretation=1, MaxTemporalSize=7))
+ss.options(list(ProspectiveStartDate="2019/12/31", ReportGiniClusters="n", LogRunToHistoryFile="n"))
+ss.options(list(SaveSimLLRsDBase="y"))
+write.ss.prm(td, "scan_BRGF")
+write.cas(casos_data, td, "BRGF")
+write.geo(geo_data, td, "BRGF")
+scan_BRGF = satscan(td,"scan_BRGF", sslocation="C:/Program Files/SaTScan", ssbatchfilename="SaTScanBatch64")
+summary(scan_BRGF)
+library("rsatscan")
+head(NYCfevercas)
+invisible(ss.options(reset=TRUE, version="10.1"))
+ss.options(list(CaseFile="NYCfever.cas", PrecisionCaseTimes=3))
+ss.options(c("StartDate=2001/11/1","EndDate=2001/11/24"))
+ss.options(list(CoordinatesFile="NYCfever.geo", AnalysisType=4, ModelType=2, TimeAggregationUnits=3))
+ss.options(list(UseDistanceFromCenterOption="y", MaxSpatialSizeInDistanceFromCenter=3, NonCompactnessPenalty=0))
+ss.options(list(MaxTemporalSizeInterpretation=1, MaxTemporalSize=7))
+ss.options(list(ProspectiveStartDate="2001/11/24", ReportGiniClusters="n", LogRunToHistoryFile="n"))
+ss.options(list(SaveSimLLRsDBase="y"))
+td = tempdir()
+write.ss.prm(td, "NYCfever")
+write.cas(NYCfevercas, td, "NYCfever")
+write.geo(NYCfevergeo, td, "NYCfever")
+NYCfever = satscan(td, "NYCfever", sslocation="C:/Program Files/SaTScan", ssbatchfilename="SaTScanBatch64")
+install.packages(rgdal)
+install.packages("rgdal")
+summary(NYCfever)
+summary.default(NYCfever)
+invisible(ss.options(reset=TRUE, version="10.1"))
+ss.options(list(CaseFile="NYCfever.cas", PrecisionCaseTimes=3))
+ss.options(c("StartDate=2001/11/1","EndDate=2001/11/24"))
+ss.options(list(CoordinatesFile="NYCfever.geo", AnalysisType=3, ModelType=2, TimeAggregationUnits=3))
+ss.options(list(UseDistanceFromCenterOption="y", MaxSpatialSizeInDistanceFromCenter=3, NonCompactnessPenalty=0))
+ss.options(list(MaxTemporalSizeInterpretation=1, MaxTemporalSize=7))
+ss.options(list(ReportGiniClusters="n", LogRunToHistoryFile="n"))
+ss.options(list(SaveSimLLRsDBase="y"))
+NYCfever = satscan(td, "NYCfever", sslocation="C:/Program Files/SaTScan", ssbatchfilename="SaTScanBatch64")
+summary(NYCfever)
+library(rsatscan)
+invisible(ss.options(reset=TRUE, version="10.1"))
+ss.options(list(CaseFile="NYCfever.cas", PrecisionCaseTimes=3))
+ss.options(c("StartDate=2001/11/1","EndDate=2001/11/24"))
+ss.options(list(CoordinatesFile="NYCfever.geo", AnalysisType=3, ModelType=2, TimeAggregationUnits=3))
+ss.options(list(UseDistanceFromCenterOption="y", MaxSpatialSizeInDistanceFromCenter=3, NonCompactnessPenalty=0))
+ss.options(list(MaxTemporalSizeInterpretation=1, MaxTemporalSize=7))
+ss.options(list(ReportGiniClusters="n", LogRunToHistoryFile="n"))
+ss.options(list(SaveSimLLRsDBase="y"))
+td = tempdir()
+write.ss.prm(td, "NYCfever")
+write.cas(NYCfevercas, td, "NYCfever")
+write.geo(NYCfevergeo, td, "NYCfever")
+NYCfever = satscan(td, "NYCfever", sslocation="C:/Program Files/SaTScan", ssbatchfilename="SaTScanBatch64")
+print(NYCfever)
+summary(NYCfever)
+library(opencpu)
+ocpu_start_server()
+library(leaflet)
+csv_data <- read.csv("C:/Users/Maira Alejandra/Desktop/dados_testBRGF/xlsx/dados_testeBR-GF3.csv", sep = ";")
+csv_data <- read.csv("C:/Users/Maira Alejandra/Desktop/dados_testBRGF/csv/dados_testeBR-GF3.csv", sep = ";")
+View(csv_data)
+leaflet(csv_data) %>% addTiles() %>%
+addCircleMarkers(
+~lng,
+~lat,
+radius = 5,
+color = "blue",
+stroke = FALSE, fillOpacity = 0.5
+)
+leaflet(csv_data) %>% addTiles() %>%
+addCircleMarkers(
+~lng,
+~lat,
+radius = 5,
+color = "blue",
+stroke = FALSE, fillOpacity = 0.5
+popup = ~nm_local
+leaflet(csv_data) %>% addTiles() %>%
+addCircleMarkers(
+~lng,
+~lat,
+radius = 5,
+color = "blue",
+stroke = FALSE, fillOpacity = 0.5,
+popup = ~nm_local
+)
+read(NYCfevercas)
+NYCfevercas
+head(NYCfevercas)
+library(rsatscan)
+NYCfevercas
+library(leaflet)
+csv_data <- read.csv("C:/Users/Maira Alejandra/Desktop/dados_testBRGF/csv/dados_testeBR-GF3.csv", sep = ";")
+leaflet(csv_data) %>% addTiles() %>%
+addCircleMarkers(
+~lng,
+~lat,
+radius = 5,
+color = "blue",
+stroke = FALSE, fillOpacity = 0.5,
+popup = ~nm_local
+)
+library(opencpu)
+ocpu_start_server()
+install.packages("webspatialscan_0.0.0.9000.tar.gz", repos = NULL, type = "source")
+library(opencpu)
+ocpu_start_server()
+library(opencpu)
+ocpu_start_server()
+library(opencpu)
+ocpu_start_server()
+install.packages("webspatialscan_0.0.0.9000.tar.gz", repos = NULL, type = "source")
+library(opencpu)
+ocpu_start_server()
+library(opencpu)
+ocpu_start_server()
+install.packages("webspatialscan_0.0.0.9000.tar.gz", repos = NULL, type = "source")
+library(opencpu)
+ocpu_start_server()
+install.packages("webspatialscan_0.0.0.9000.tar.gz", repos = NULL, type = "source")
+library(opencpu)
+ocpu_start_server()
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..cd67eac
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.Rproj.user
diff --git a/DESCRIPTION b/DESCRIPTION
new file mode 100644
index 0000000..9819546
--- /dev/null
+++ b/DESCRIPTION
@@ -0,0 +1,27 @@
+Package: webspatialscan
+Title: an R package to enable Spatial Scan Statistics on WebGIS applications
+Version: 0.0.0.9000
+Authors@R:
+ person(given = "Maira Alejandra",
+ family = "Moreno C.",
+ email = "mairamorenoc26@gmail.com",
+ role = c("aut", "cre"),
+ comment = c(ORCID = "0000-0002-2910-2970"))
+Description: Interfacing SatScan desktop software with a web application via OpenCPU and rsatscan, to allows users to run scan statistics and visualize results on the web.
+License: MIT + file LICENSE
+Encoding: UTF-8
+LazyData: true
+Depends:
+ rsatscan
+Imports:
+ leaflet,
+ leaflet.extras,
+ magrittr,
+ htmlwidgets
+Suggests:
+ knitr,
+ sf,
+ rmarkdown,
+ roxygen2
+Roxygen: list(markdown = TRUE)
+RoxygenNote: 7.2.3
diff --git a/NAMESPACE b/NAMESPACE
new file mode 100644
index 0000000..deeb8e0
--- /dev/null
+++ b/NAMESPACE
@@ -0,0 +1,22 @@
+# Generated by roxygen2: do not edit by hand
+
+export(spatial_scanUp)
+importFrom(htmlwidgets,saveWidget)
+importFrom(leaflet,addCircleMarkers)
+importFrom(leaflet,addCircles)
+importFrom(leaflet,addLayersControl)
+importFrom(leaflet,addLegend)
+importFrom(leaflet,addScaleBar)
+importFrom(leaflet,addTiles)
+importFrom(leaflet,layersControlOptions)
+importFrom(leaflet,leaflet)
+importFrom(leaflet.extras,addSearchOSM)
+importFrom(leaflet.extras,searchOptions)
+importFrom(magrittr,"%>%")
+importFrom(rsatscan,satscan)
+importFrom(rsatscan,ss.options)
+importFrom(rsatscan,write.cas)
+importFrom(rsatscan,write.geo)
+importFrom(rsatscan,write.pop)
+importFrom(rsatscan,write.ss.prm)
+importFrom(utils,read.csv)
diff --git a/webspatialscan.Rproj b/webspatialscan.Rproj
new file mode 100644
index 0000000..38b9011
--- /dev/null
+++ b/webspatialscan.Rproj
@@ -0,0 +1,22 @@
+Version: 1.0
+
+RestoreWorkspace: No
+SaveWorkspace: No
+AlwaysSaveHistory: Default
+
+EnableCodeIndexing: Yes
+UseSpacesForTab: Yes
+NumSpacesForTab: 2
+Encoding: UTF-8
+
+RnwWeave: Sweave
+LaTeX: pdfLaTeX
+
+AutoAppendNewline: Yes
+StripTrailingWhitespace: Yes
+LineEndingConversion: Posix
+
+BuildType: Package
+PackageUseDevtools: Yes
+PackageInstallArgs: --no-multiarch --with-keep.source
+PackageRoxygenize: rd,collate,namespace