Synopsis

EIA.gov is an agency within the U.S. Department of Energy. They focus on providing statistical and analytical data to the public to create transparency. For this project, koordinates.com summarized the U.S. Petroleum Refineries from EIA data. The data is added from August 2016 and was updated in September 2018. Using R leaflet package, this will create an interactive map to inform users on the locations of U.S.Petroleum Refineries and corporations who own them.

Data Processing

After creating an account, you can download the data at https://koordinates.com in a csv format. Koordinates.com sources the data from EIA.gov

Read in the csv file:
Refinery<-read.csv(“USPetro.csv”)

After reading in the data file, here is the structure of the dataset:

str(Refinery)
## 'data.frame':    141 obs. of  16 variables:
##  $ Company   : Factor w/ 96 levels "ALON BAKERSFIELD OPERATING INC",..: 84 3 57 57 78 81 11 25 9 15 ...
##  $ Corp      : Factor w/ 62 levels "ACCESS INDUSTRIES",..: 56 2 37 37 40 54 8 14 8 10 ...
##  $ Site      : Factor w/ 116 levels "ANACORTES","ARDMORE",..: 74 11 17 15 80 16 39 76 76 75 ...
##  $ State     : Factor w/ 30 levels "Alabama","Alaska",..: 25 25 11 21 14 4 27 2 2 12 ...
##  $ PADD      : int  3 3 2 2 2 5 5 5 5 3 ...
##  $ AD_Mbpd   : num  245 74 292 100 97.8 276 236 16 13 8.7 ...
##  $ VDist_Mbpd: num  105 24 122 35 44 ...
##  $ CaDis_Mbpd: num  80 25 104 26 31 ...
##  $ VRedu_Mbpd: int  0 0 0 0 0 0 0 0 0 0 ...
##  $ CaRef_Mbpd: num  43 21 52.5 21.5 24.5 43 65 0 0 0 ...
##  $ Isal_Mbpd : num  14.5 5 39 7.5 15 40 24 0 0 0 ...
##  $ HDS_Mbpd  : num  264.5 60 269 94.5 96.1 ...
##  $ Cokin_Mbpd: num  60 0 0 0 0 67.1 57.5 0 0 0 ...
##  $ Asph_Mbpd : num  0 7.6 35.4 14.8 13 0 0 0 0 2 ...
##  $ Latitude  : num  30 32.3 38.4 40.8 44.9 ...
##  $ Longitude : num  -94 -101.4 -82.6 -81.4 -93 ...

This dataset provides various information about the refineries production. For the project, only the coordinates and corporation ownership are used.

In this instance, the coordinates are provided for each refinery and do not require data cleanup.

Results

For a better visual of petroleum refineries, plots of clusters of markers are used. You can zoom in to each cluster, the clusters will separate until you can see the individual markers. The Corp. is added as a popup for each marker. Click on any marker to determine which corporation owns the petroleum refinery.

library(leaflet)
Refinery %>%
 leaflet() %>%
 addTiles() %>% 
 addMarkers(popup=Refinery$Corp , clusterOptions=markerClusterOptions())
## Assuming "Longitude" and "Latitude" are longitude and latitude, respectively
## Assuming "Longitude" and "Latitude" are longitude and latitude, respectively