[R-sig-Geo] Importing xlsm & blinking circilemarkers
sownal chand
@own@|ch@nd|m@ @end|ng |rom gm@||@com
Thu Mar 17 01:58:24 CET 2022
Hello sir/madam,
I have a macro-enabled excel file and wanted to import the data that this
file automatically grabs everytime the macro is run. Are there any packages
for macro-enabled excel?
I have written some codes using a leaflet package and was trying to set
criteria for circle markers that if the Rainfall value is in the ranges the
color of the markers would change and start blinking. Given for green
0-20mm, yellow - 20-30mm, orange- 30-50mm, red- >= 50mm.
Given below is the code and sample data
library(sf)
library(leaflet)
#Make Leaflet map with markers
leaflet() %>%
addTiles() %>%
addCircleMarkers(lat = rainfall$Latitude,
lng = rainfall$Longitude)
# Add Data for rainfall
col_pal <- colorNumeric(palette = "viridis",
domain = rainfall$rainfall)
#adding content to the popups
#Make map with colors with markers
Map<- leaflet() %>%
addTiles() %>%
addCircles(lat = Rainfall$Latitude,
lng = Rainfall$Longitude,
color = col_pal(Rainfall_plots$Rainfall),
radius = 2000,
fillOpacity = 0.8,
label = Rainfall_plots$rainfall) %>%
addLegend(position = "bottomleft", pal = col_pal, values =
Rainfall_plots$rainfall, title = "Rainfall Indicator")
Map
********************************************************************************************************
The code is correct, some ideas to set up criterias for the rainfall amount
would really be appreciated. And possibly the codes as well would be really
wonderful. Also attached is the sample data in csv format
Thanking you in advance
Sownalc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20220317/42348da3/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RainfalSample.csv
Type: application/vnd.ms-excel
Size: 859 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20220317/42348da3/attachment.xlb>
More information about the R-sig-Geo
mailing list