This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
summary(cars)
## speed dist
## Min. : 4.0 Min. : 2.00
## 1st Qu.:12.0 1st Qu.: 26.00
## Median :15.0 Median : 36.00
## Mean :15.4 Mean : 42.98
## 3rd Qu.:19.0 3rd Qu.: 56.00
## Max. :25.0 Max. :120.00
You can also embed plots, for example:
Note that the echo = FALSE parameter was added to the
code chunk to prevent printing of the R code that generated the
plot.
LIBRAIRIES
library(shiny)
library(ggplot2)
library(ggrepel)
library(plotly)
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
library(leaflet)
library(readxl)
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(forcats)
library(tidyr)
## Warning: package 'tidyr' was built under R version 4.0.5
library(stringr)
library(lemon)
CHARGEMENT DONNEES
BaseTot<-read_xlsx('BaseGeneraleEssai.xlsx',1)
## New names:
## * `` -> `...1`
CARTE
carte<-leaflet() %>%
setView(lng=4.9,
lat=44.9,
zoom=11) %>%
addTiles() %>%
addProviderTiles("Esri.WorldImagery") %>%
#addProviderTiles("Stamen.Toner") %>%
addCircleMarkers(lng= 4.90 , lat= 44.92, radius = 0.5)%>%
addCircleMarkers(lng= c(4.92,4.88), lat=c(44.9,44.95), popup = paste("blabla", "<br>","blibli","="), fillColor = "red",fillOpacity = 1, radius = 5,stroke = F)%>%
addCircleMarkers(lng= c(4.900968), lat=c(44.919711), popup = paste("MJC Chateauvert", "<br>","blibli","="), fillColor = "green",fillOpacity = 1, radius = 5,stroke = F)%>%
addMarkers(lng= c(4.91,4.89), lat=c(44.92,44.93), popup = paste("blabla", "<br>","blibli","="))%>%
addPolylines(lng= c(4.91,4.92, 4.93, 4.935, 4.943),lat=c(44.90, 44.91, 44.915, 44.925, 44.96),color = "orange", weight=4,fillOpacity = 1,smoothFactor = 0.5,label = "gfgfgfgf",stroke = TRUE)
carte