Synopsis

Following visualization is based on the “Nuclear Power Plants in the World”. The dataset can be found here: https://www.kaggle.com/liananapalkova/nuclear-power-plants/data. The data is visualized using leaflet library in R.

Custom icon is used to represent the data in the map.

Libraries used

Loading the datset

The dataset is download from this link: https://www.kaggle.com/liananapalkova/nuclear-power-plants/data

df <- read.csv("nuclearPlowerPlants.csv")
head(df)
##   FID             Region                  Country        Plant NumReactor
## 1   0   Europe - Western                   SWEDEN       AGESTA          1
## 2   1   Europe - Western                    SPAIN      ALMARAZ          2
## 3   2    America - Latin                   BRAZIL        ANGRA          3
## 4   3 America - Northern UNITED STATES OF AMERICA ARKANSAS ONE          2
## 5   4   Europe - Western                    SPAIN         ASCO          2
## 6   5    America - Latin                ARGENTINA       ATUCHA          2
##    Latitude Longitude  p90_1200  p00_1200  p10_1200 p90u_1200 p00u_1200
## 1  59.20602  18.08287 187382000 188684000 188250000 121178000 122299000
## 2  39.80810  -5.69694 136675000 147718000 163429000  87539700  93943200
## 3 -23.00786 -44.45810  99195200 113894000 127898000  67751500  77821400
## 4  35.31032 -93.23129 117830000 132729000 146482000  92609500 104781000
## 5  41.20000   0.56667 271854000 287134000 308922000 190825000 200465000
## 6 -33.96800 -59.20374  60272900  68789800  76396900  41416000  47098100
##   p10u_1200 p90r_1200 p00r_1200 p10r_1200    p90_30    p00_30    p10_30
## 1 122399000  66203700  66384500  65851300 1290370.0 1430100.0 1500960.0
## 2 103704000  49135800  53774400  59724600   48345.2   47108.5   53055.4
## 3  87432200  31443800  36072700  40465800  129499.0  136945.0  153022.0
## 4 115697000  25220200  27947300  30785400   75433.4   83087.4   91498.0
## 5 215092000  81029500  86668900  93830000   52259.6   52798.8   59487.4
## 6  52126500  18857000  21691700  24270400  133755.0  147876.0  162171.0
##      p90u_30    p00u_30    p10u_30 p90r_30 p00r_30 p10r_30  p90_75  p00_75
## 1 1210110.00 1338190.00 1404630.00 80258.1 91914.8 96332.4 1749300 1943540
## 2   12804.00   12465.80   14039.90 35541.2 34642.7 39015.5  387982  380366
## 3   89127.70   94205.30  105253.00 40371.8 42739.8 47768.4 1185920 1269060
## 4   50851.50   55904.90   61560.00 24581.9 27182.5 29938.0  197016  218462
## 5    6175.11    6217.22    7005.19 46084.4 46581.6 52482.2  849379  884514
## 6  119490.00  132304.00  145130.00 14265.3 15571.5 17041.6 1598790 1747870
##    p10_75   p90u_75   p00u_75 p10u_75  p90r_75 p00r_75 p10r_75  p90_150
## 1 2039670 1477160.0 1637730.0 1719060 272143.0  305814  320612  2615240
## 2  427595   97305.1   97451.7  109541 290677.0  282915  318054  1780790
## 3 1420200  861635.0  920939.0 1030750 324285.0  348119  389459 12729100
## 4  240679  106094.0  117525.0  129456  90921.7  100937  111223  1638330
## 5  996212  526660.0  552737.0  622489 322719.0  331777  373722  6124550
## 6 1922590 1254020.0 1370370.0 1507550 344765.0  377500  415039 12958400
##    p00_150  p10_150 p90u_150 p00u_150 p10u_150 p90r_150 p00r_150 p10r_150
## 1  2819430  2958820  2020420  2186500  2295030   594825   632932   663787
## 2  1760250  1976690   539007   532195   599150  1241780  1228060  1377540
## 3 13810300 15497100 10771500 11649400 13075800  1957570  2160900  2421330
## 4  1835830  2025750  1135330  1273300  1405830   503000   562533   619920
## 5  6282850  7074890  5224790  5360780  6038210   899758   922070  1036680
## 6 14114800 15525900 11962600 13028900 14334700   995738  1085900  1191180
##    p90_600  p00_600  p10_600 p90u_600 p00u_600 p10u_600 p90r_600 p00r_600
## 1 27278800 27487400 27970900 18450800 18654200 18998400  8828010  8833200
## 2 45748100 47356200 52724300 28920000 29888800 33270600 16828100 17467400
## 3 63210700 71962200 80782600 48667100 55354300 62177000 14543600 16607900
## 4 30481100 34037700 37542200 22678400 25410800 28044000  7802710  8626840
## 5 51672500 54943800 61100300 36615500 39068900 43505600 15057000 15874900
## 6 26158200 28768900 31350300 22214000 24477300 26679800  3944250  4291650
##   p10r_600  p90_300  p00_300  p10_300 p90u_300 p00u_300 p10u_300 p90r_300
## 1  8972550  5013240  5227700  5471110  3426880  3596030  3764920  1586350
## 2 19453700 17756500 18187800 20185200 10986000 11415400 12689800  6770480
## 3 18605600 39546400 44701700 50210600 32788500 37064600 41648300  6757940
## 4  9498240  5603180  6226360  6866840  3779400  4198920  4633770  1823770
## 5 17594700 14398500 15095600 16830700 11215400 11773600 13151300  3183180
## 6  4670460 17957600 19753900 21564000 15803600 17419400 19019600  2153960
##   p00r_300 p10r_300
## 1  1631670  1706190
## 2  6772380  7495340
## 3  7637110  8562300
## 4  2027450  2233070
## 5  3322050  3679470
## 6  2334490  2544440

Cleaning the data

We don’t need all 61 columns for this visualization. SO, only few columns are selected namely Latitude and Longitude.

df2 <- select(df, c(6, 7))

Custom Icon

Custom icon is created for representing the locations of nuclear power plants so that even naive user can understand.

icons <- makeIcon(
  iconUrl = "https://image.flaticon.com/icons/svg/840/840523.svg",
  iconWidth = 32, iconHeight = 32)

Plotting

Finally the data points are plotted on the map using Leaflet.

df2 %>%
  leaflet() %>%
  addTiles() %>%
  addMarkers(icon = icons, clusterOptions = markerClusterOptions(), label = ~htmlEscape(paste(df$Plant, "(No. of Reactors:", df$NumReactor, ")"))) 

Nuclear Power Plants on World Map