obtained via three sources: a) NPRI emissions registry (link, csv format is selected as common denominator across GIS/programming approach and
b) operations hub survey confirmed with a cross-check of ECA-registered address where available (tbd)
NPRIdata<-read_csv('data/npri-geo-lastest-reported-facilities.csv')
## Parsed with column specification:
## cols(
## .default = col_character(),
## LASTREPORT = col_double(),
## ADDRESS2 = col_logical(),
## LATI_DEC = col_double(),
## LONG_DEC = col_double(),
## DATUM = col_double(),
## NAICS6 = col_double(),
## Intuitive_Sector_Code = col_double(),
## CSDUID = col_double(),
## CMAUID = col_double(),
## CDUID = col_double(),
## ERUID = col_double(),
## ECOZONE_ID = col_double(),
## WSCMDA_ID = col_double()
## )
## See spec(...) for full column specifications.
# explore created dataframe
str(NPRIdata)
## tibble [7,719 x 39] (S3: spec_tbl_df/tbl_df/tbl/data.frame)
## $ LASTREPORT : num [1:7719] 2017 2017 2017 2017 2017 ...
## $ NPRI_ID : chr [1:7719] "0000000001" "0000000011" "0000000015" "0000000021" ...
## $ COMP_NAME : chr [1:7719] "Alberta-Pacific Forest Industries Inc." "Hexion Canada Inc." "Baycoat Ltd." "Bolton Steel Tube Co. Ltd." ...
## $ FACI_NAME : chr [1:7719] "Alberta-Pacific Forest Industries Inc." "Hexion Canada Inc.- Edmonton Facility" "Baycoat" "Bolton Plant" ...
## $ ADDRESS1 : chr [1:7719] NA "12621 156th Street" "244 Lanark Street" "455 Piercy Road" ...
## $ ADDRESS2 : logi [1:7719] NA NA NA NA NA NA ...
## $ CITY : chr [1:7719] "County of Athabasca" "Edmonton" "Hamilton" "Bolton" ...
## $ PROVINCE : chr [1:7719] "AB" "AB" "ON" "ON" ...
## $ POSTAL_ZIP : chr [1:7719] "T0A0M0" "T5V1E1" "L8N3K7" "L7E5B8" ...
## $ LANDSURVEY : chr [1:7719] "SW-32-068-19-W4" NA NA NA ...
## $ TOPOGRAPH : chr [1:7719] NA NA NA NA ...
## $ LATI_DEC : num [1:7719] 54.9 53.6 43.2 43.9 45 ...
## $ LONG_DEC : num [1:7719] -112.9 -113.6 -79.8 -79.7 -74.8 ...
## $ DATUM : num [1:7719] 1983 1983 1983 1983 1983 ...
## $ NAICS6 : num [1:7719] 322112 325210 332810 331210 325190 ...
## $ Intuitive_Sector_Code : num [1:7719] 14 3 6 5 3 3 3 19 13 8 ...
## $ Intuitive_Sector_Name_E: chr [1:7719] "Pulp and Paper" "Chemicals" "Other Manufacturing" "Iron and Steel" ...
## $ Intuitive_Sector_Name_F: chr [1:7719] "Pâte à papier et papier" "Produits chimiques" "Autres fabrication" "Fer et acier" ...
## $ CSDUID : num [1:7719] 4813044 4811061 3525005 3521024 3501012 ...
## $ CSDNAME : chr [1:7719] "Athabasca County" "Edmonton" "Hamilton" "Caledon" ...
## $ CMAUID : num [1:7719] NA 835 537 535 501 559 535 NA 433 328 ...
## $ CMANAME : chr [1:7719] NA "Edmonton" "Hamilton" "Toronto" ...
## $ CDUID : num [1:7719] 4813 4811 3525 3521 3501 ...
## $ CDNAME : chr [1:7719] "Division No. 13" "Division No. 11" "Hamilton" "Peel" ...
## $ ERUID : num [1:7719] 4870 4860 3550 3530 3510 3570 3530 2430 2430 1310 ...
## $ ERNAME : chr [1:7719] "Athabasca--Grande Prairie--Peace River" "Edmonton" "Hamilton--Niagara Peninsula" "Toronto" ...
## $ FSA : chr [1:7719] "T0A" "T5V" "L8E" "L7E" ...
## $ ECOZONE_ID : num [1:7719] 9 10 8 8 8 8 8 7 7 7 ...
## $ ECOZONE_E : chr [1:7719] "Boreal PLain" "Prairie" "MixedWood Plain" "MixedWood Plain" ...
## $ ECOZONE_F : chr [1:7719] "Plaines boréales" "Prairies" "Plaines à forêts mixtes" "Plaines à forêts mixtes" ...
## $ WSCMDA_ID : num [1:7719] 7 5 2 2 2 2 2 2 2 1 ...
## $ WSCMDA_EN : chr [1:7719] "Great Slave Lake Drainage Area" "Nelson River Drainage Area" "St. Lawrence Drainage Area" "St. Lawrence Drainage Area" ...
## $ WSCMDA_FR : chr [1:7719] "Aire de drainage du Grand lac des Esclaves" "Aire de drainage du fleuve Nelson" "Aire de drainage du Saint-Laurent" "Aire de drainage du Saint-Laurent" ...
## $ SOMA : chr [1:7719] "No" "No" "Yes" "Yes" ...
## $ ONPEMA : chr [1:7719] "No" "No" "Yes" "Yes" ...
## $ QCPEMA : chr [1:7719] "No" "No" "No" "No" ...
## $ QC_Windsor : chr [1:7719] "No" "No" "Yes" "Yes" ...
## $ URL_FR : chr [1:7719] "https://pollution-waste.canada.ca/national-release-inventory/archives/index.cfm?do=facility_substance_summary&l"| __truncated__ "https://pollution-waste.canada.ca/national-release-inventory/archives/index.cfm?do=facility_substance_summary&l"| __truncated__ "https://pollution-waste.canada.ca/national-release-inventory/archives/index.cfm?do=facility_substance_summary&l"| __truncated__ "https://pollution-waste.canada.ca/national-release-inventory/archives/index.cfm?do=facility_substance_summary&l"| __truncated__ ...
## $ URL_EN : chr [1:7719] "https://pollution-waste.canada.ca/national-release-inventory/archives/index.cfm?do=facility_substance_summary&l"| __truncated__ "https://pollution-waste.canada.ca/national-release-inventory/archives/index.cfm?do=facility_substance_summary&l"| __truncated__ "https://pollution-waste.canada.ca/national-release-inventory/archives/index.cfm?do=facility_substance_summary&l"| __truncated__ "https://pollution-waste.canada.ca/national-release-inventory/archives/index.cfm?do=facility_substance_summary&l"| __truncated__ ...
## - attr(*, "spec")=
## .. cols(
## .. LASTREPORT = col_double(),
## .. NPRI_ID = col_character(),
## .. COMP_NAME = col_character(),
## .. FACI_NAME = col_character(),
## .. ADDRESS1 = col_character(),
## .. ADDRESS2 = col_logical(),
## .. CITY = col_character(),
## .. PROVINCE = col_character(),
## .. POSTAL_ZIP = col_character(),
## .. LANDSURVEY = col_character(),
## .. TOPOGRAPH = col_character(),
## .. LATI_DEC = col_double(),
## .. LONG_DEC = col_double(),
## .. DATUM = col_double(),
## .. NAICS6 = col_double(),
## .. Intuitive_Sector_Code = col_double(),
## .. Intuitive_Sector_Name_E = col_character(),
## .. Intuitive_Sector_Name_F = col_character(),
## .. CSDUID = col_double(),
## .. CSDNAME = col_character(),
## .. CMAUID = col_double(),
## .. CMANAME = col_character(),
## .. CDUID = col_double(),
## .. CDNAME = col_character(),
## .. ERUID = col_double(),
## .. ERNAME = col_character(),
## .. FSA = col_character(),
## .. ECOZONE_ID = col_double(),
## .. ECOZONE_E = col_character(),
## .. ECOZONE_F = col_character(),
## .. WSCMDA_ID = col_double(),
## .. WSCMDA_EN = col_character(),
## .. WSCMDA_FR = col_character(),
## .. SOMA = col_character(),
## .. ONPEMA = col_character(),
## .. QCPEMA = col_character(),
## .. QC_Windsor = col_character(),
## .. URL_FR = col_character(),
## .. URL_EN = col_character()
## .. )
Obtained via MNRF (reports only northerly districts?)- link, a 2012 MS Access dataset.
Select to download as Shapefile, KML or QLR depending on GIS program to used
Add as vector layer; assigning the correct projection under layer properties
Import csv
MNRFdata<-read_csv('data/Waste_Management_Site.csv')
## Parsed with column specification:
## cols(
## .default = col_character(),
## OBJECTID = col_double(),
## OGF_ID = col_double(),
## CROWN_PARCEL_ID = col_double(),
## TOTAL_AREA = col_double(),
## FILL_AREA = col_double(),
## REMAINING_VOLUME = col_double(),
## ANNUAL_VOLUME = col_double(),
## CLOSURE_YEAR = col_double(),
## SHAPEAREA = col_double(),
## SHAPELEN = col_double(),
## PROXIMITY_TO_MUNICIPALITY = col_logical()
## )
## See spec(...) for full column specifications.
# explore created dataframe
str(MNRFdata)
## tibble [840 x 58] (S3: spec_tbl_df/tbl_df/tbl/data.frame)
## $ OBJECTID : num [1:840] 3 12 14 15 21 22 23 26 38 40 ...
## $ OGF_ID : num [1:840] 70617289 70651342 70651380 70651405 70651486 ...
## $ VERIFICATION_STATUS_DATE : chr [1:840] "1970/01/01 00:00:00+00" "1970/01/01 00:00:00+00" "1970/01/01 00:00:00+00" "1970/01/01 00:00:00+00" ...
## $ CROWN_PARCEL_ID : num [1:840] NA NA NA NA NA NA NA NA NA NA ...
## $ MNR_AREA : chr [1:840] "Lake Nipigon East" "Blind River" "Blind River" "Blind River" ...
## $ MNR_DISTRICT : chr [1:840] "Nipigon" "Sault Ste. Marie" "Sault Ste. Marie" "Sault Ste. Marie" ...
## $ MNR_REGION : chr [1:840] "Northwest" "Northeast" "Northeast" "Northeast" ...
## $ CROWN_LAND_PROXIMITY_FLG : chr [1:840] NA NA NA NA ...
## $ SITE_NAME : chr [1:840] "Auden" "Rollins Twp. Sewage Lagoon" "Mount Lake" "Haughton" ...
## $ PRIMARY_CLASSIFICATION : chr [1:840] "Landfill" "Landfill" "Landfill" "Landfill" ...
## $ STATUS : chr [1:840] "Operating" "Operating" "Closed" "Closed" ...
## $ CERTIFICATE_OF_APPROVAL_IDENT : chr [1:840] "A7197001" "01SSM001" "A7144901" "A7068001" ...
## $ CERTIFICATE_OF_APPROVAL_HOLDER: chr [1:840] "CN Railway (Engineering Department)" NA NA NA ...
## $ CERTIFICATE_COMPLIANCE_IND : chr [1:840] "No" "No" "No" "No" ...
## $ TOTAL_AREA : num [1:840] 0 0.5 0.5 8 1.84 1.6 1.6 25 4.05 0.6 ...
## $ FILL_AREA : num [1:840] 0 0.2 0.4 2.2 1 0.8 1 3.1 1 2.02 ...
## $ GEOGRAPHIC_LOCATION : chr [1:840] "Located approx. 500m south of Auden, 200m east of junction of Auden Rd. & Toronto Lake Rd." "ROLLINS TWP. Aubrey Falls Dam Road Hauled Sewage (Septage)" "Lot 12 Conc.5, Viel Twp., District of Algom, Portelance Lake Road" "Lot 6, Conc. 2, Haughton Twp. District of Algoma, Tunnel Lake" ...
## $ MUNICIPALITY : chr [1:840] NA "Thessalon" "Thessalon" "Thessalon" ...
## $ UTM_REFERENCE : chr [1:840] "16-437000-5563780" "17-329400-5196800" "17-369687-5172221" "17-307184-5147776" ...
## $ REMAINING_VOLUME : num [1:840] NA 0 0 0 0 0 0 0 NA NA ...
## $ ANNUAL_VOLUME : num [1:840] 0 2000 0 0 0 0 0 0 0 0 ...
## $ VOLUME_DATE : chr [1:840] "1970/01/01 00:00:00+00" "2005/10/28 00:00:00+00" "1970/01/01 00:00:00+00" "1995/01/02 00:00:00+00" ...
## $ SURFACE_STAKING_WITHDRAWN_IND : chr [1:840] "No" "Yes" "No" "No" ...
## $ MINING_RIGHTS_WITHDRAWN_IND : chr [1:840] "No" "Yes" "No" "No" ...
## $ CROWN_OPERATION_IND : chr [1:840] "No" NA NA NA ...
## $ CROWN_OPERATION_TYPE : chr [1:840] "Other" "Licence Agreement" "Site Closed" "Site Closed" ...
## $ PLA_AUTHORITY : chr [1:840] "LUP" NA NA NA ...
## $ FILL_AREA_DELINEATED_IND : chr [1:840] "No" "Yes" "Yes" "No" ...
## $ CLOSURE_YEAR : num [1:840] 0 0 1996 1994 1992 ...
## $ ATTENUATION_ZONE_ESTAB_IND : chr [1:840] NA NA NA NA ...
## $ SSHRAS_IND : chr [1:840] "No" "No" "No" "No" ...
## $ ADDITIONAL_ASSESSMENTS_REQ_IND: chr [1:840] NA NA NA NA ...
## $ ADDITIONAL_ASSESSMENTS_NOTES : chr [1:840] NA NA NA NA ...
## $ MONITORING_WELLS_IND : chr [1:840] "No" "No" "No" "No" ...
## $ WELLS_DECOMMISSIONED_IND : chr [1:840] NA NA NA NA ...
## $ DATE_WELLS_DECOMMISSIONED : chr [1:840] "1970/01/01 00:00:00+00" "1970/01/01 00:00:00+00" "1970/01/01 00:00:00+00" "1970/01/01 00:00:00+00" ...
## $ OPERATIONAL_PLAN_IND : chr [1:840] "No" "No" "No" "No" ...
## $ OPERATIONAL_PLAN_MOE_APPR_IND : chr [1:840] "No" "No" "No" "No" ...
## $ OPERATIONAL_PLAN_MOE_APPR_DATE: chr [1:840] "1970/01/01 00:00:00+00" "1970/01/01 00:00:00+00" "1970/01/01 00:00:00+00" "1970/01/01 00:00:00+00" ...
## $ CLOSURE_PLAN_IND : chr [1:840] "No" "No" "No" "No" ...
## $ CLOSURE_PLAN_MOE_APPR_IND : chr [1:840] "No" "No" "No" "No" ...
## $ CLOSURE_PLAN_MOE_APPR_DATE : chr [1:840] "1970/01/01 00:00:00+00" "1970/01/01 00:00:00+00" "1970/01/01 00:00:00+00" "1970/01/01 00:00:00+00" ...
## $ CONTINGENCY_PLAN_IND : chr [1:840] NA NA NA NA ...
## $ CONTINGENCY_PLAN_MOE_APPR_IND : chr [1:840] NA NA NA NA ...
## $ CONTINGENCY_PLAN_MOE_APPR_DATE: chr [1:840] "1970/01/01 00:00:00+00" "1970/01/01 00:00:00+00" "1970/01/01 00:00:00+00" "1970/01/01 00:00:00+00" ...
## $ GROUND_WATER_MONITORING_SCHED : chr [1:840] NA NA NA NA ...
## $ SURFACE_WATER_MONITORING_SCHED: chr [1:840] NA NA NA NA ...
## $ POTABLE_WATER_MONITORING_SCHED: chr [1:840] NA NA NA NA ...
## $ SUPPLEMENTAL_INFO : chr [1:840] "Nipigon District Office- Site under LUP Files, CN Engineering Departmetn, Auden Dump." "In the LUP files upstairs in the lands files under Rollins Twp." "Info stored in the WDS files upstairs in the Lands Section.\r\nSite clear-cut and filled over, hard to find." "Information stored in the WDS files upstairs in the lands files.\r\nSite opened Oct.31/72" ...
## $ SUPPORTING_MATERIAL : chr [1:840] NA NA NA NA ...
## $ COMMENTS : chr [1:840] NA "Shamas-knd 10242" NA NA ...
## $ LOCATION_ACCURACY : chr [1:840] "Within 20 metres" "Within 100 metres" "Within 20 metres" "Within 20 metres" ...
## $ GEOMETRY_UPDATE_DATETIME : chr [1:840] "1970/01/01 00:00:00+00" "1970/01/01 00:00:00+00" "1970/01/01 00:00:00+00" "1970/01/01 00:00:00+00" ...
## $ EFFECTIVE_DATETIME : chr [1:840] "2010/11/19 11:55:38+00" "2010/12/13 11:08:48+00" "2010/12/13 11:08:55+00" "2010/12/13 11:08:58+00" ...
## $ SYSTEM_DATETIME : chr [1:840] "2011/04/05 09:05:08+00" "2011/04/05 09:05:08+00" "2011/04/05 09:05:08+00" "2011/04/05 09:05:08+00" ...
## $ SHAPEAREA : num [1:840] 0 0 0 0 0 0 0 0 0 0 ...
## $ SHAPELEN : num [1:840] 0 0 0 0 0 0 0 0 0 0 ...
## $ PROXIMITY_TO_MUNICIPALITY : logi [1:840] NA NA NA NA NA NA ...
## - attr(*, "spec")=
## .. cols(
## .. OBJECTID = col_double(),
## .. OGF_ID = col_double(),
## .. VERIFICATION_STATUS_DATE = col_character(),
## .. CROWN_PARCEL_ID = col_double(),
## .. MNR_AREA = col_character(),
## .. MNR_DISTRICT = col_character(),
## .. MNR_REGION = col_character(),
## .. CROWN_LAND_PROXIMITY_FLG = col_character(),
## .. SITE_NAME = col_character(),
## .. PRIMARY_CLASSIFICATION = col_character(),
## .. STATUS = col_character(),
## .. CERTIFICATE_OF_APPROVAL_IDENT = col_character(),
## .. CERTIFICATE_OF_APPROVAL_HOLDER = col_character(),
## .. CERTIFICATE_COMPLIANCE_IND = col_character(),
## .. TOTAL_AREA = col_double(),
## .. FILL_AREA = col_double(),
## .. GEOGRAPHIC_LOCATION = col_character(),
## .. MUNICIPALITY = col_character(),
## .. UTM_REFERENCE = col_character(),
## .. REMAINING_VOLUME = col_double(),
## .. ANNUAL_VOLUME = col_double(),
## .. VOLUME_DATE = col_character(),
## .. SURFACE_STAKING_WITHDRAWN_IND = col_character(),
## .. MINING_RIGHTS_WITHDRAWN_IND = col_character(),
## .. CROWN_OPERATION_IND = col_character(),
## .. CROWN_OPERATION_TYPE = col_character(),
## .. PLA_AUTHORITY = col_character(),
## .. FILL_AREA_DELINEATED_IND = col_character(),
## .. CLOSURE_YEAR = col_double(),
## .. ATTENUATION_ZONE_ESTAB_IND = col_character(),
## .. SSHRAS_IND = col_character(),
## .. ADDITIONAL_ASSESSMENTS_REQ_IND = col_character(),
## .. ADDITIONAL_ASSESSMENTS_NOTES = col_character(),
## .. MONITORING_WELLS_IND = col_character(),
## .. WELLS_DECOMMISSIONED_IND = col_character(),
## .. DATE_WELLS_DECOMMISSIONED = col_character(),
## .. OPERATIONAL_PLAN_IND = col_character(),
## .. OPERATIONAL_PLAN_MOE_APPR_IND = col_character(),
## .. OPERATIONAL_PLAN_MOE_APPR_DATE = col_character(),
## .. CLOSURE_PLAN_IND = col_character(),
## .. CLOSURE_PLAN_MOE_APPR_IND = col_character(),
## .. CLOSURE_PLAN_MOE_APPR_DATE = col_character(),
## .. CONTINGENCY_PLAN_IND = col_character(),
## .. CONTINGENCY_PLAN_MOE_APPR_IND = col_character(),
## .. CONTINGENCY_PLAN_MOE_APPR_DATE = col_character(),
## .. GROUND_WATER_MONITORING_SCHED = col_character(),
## .. SURFACE_WATER_MONITORING_SCHED = col_character(),
## .. POTABLE_WATER_MONITORING_SCHED = col_character(),
## .. SUPPLEMENTAL_INFO = col_character(),
## .. SUPPORTING_MATERIAL = col_character(),
## .. COMMENTS = col_character(),
## .. LOCATION_ACCURACY = col_character(),
## .. GEOMETRY_UPDATE_DATETIME = col_character(),
## .. EFFECTIVE_DATETIME = col_character(),
## .. SYSTEM_DATETIME = col_character(),
## .. SHAPEAREA = col_double(),
## .. SHAPELEN = col_double(),
## .. PROXIMITY_TO_MUNICIPALITY = col_logical()
## .. )
for R, subset directly at map generation ## Facility Location Open Attribute table for the layer, Select by Expression and enter
"Intuitive_Sector_Name_E" = 'Water and Wastewater Systems' AND "PROVINCE"='ON'
## Waste Disposal Sites Open Attribute table for the layer, Select by Expression and enter
"STATUS" = 'Operating'
Add base map, check points are generated correctly (e.g. no x /y switches to Antarctica) For waste sites, under layer properties, select symbology and change to “PRIMARY_CL” to create legend by type
When not available in CSV, dump out geometry from raster file first in GIS program (coordinates not given in csv) (Alternative - create 2 columns (decimal number type) X and Y and fill them with ‘$x’ and ‘$y’ with the Field calculator.)
In this case, use the shapefile
## Loading required package: sp
## rgdal: version: 1.4-8, (SVN revision 845)
## Geospatial Data Abstraction Library extensions to R successfully loaded
## Loaded GDAL runtime: GDAL 2.2.3, released 2017/11/20
## Path to GDAL shared files: C:/Users/HoJa/Documents/R/R-3.6.1/library/rgdal/gdal
## GDAL binary built with GEOS: TRUE
## Loaded PROJ.4 runtime: Rel. 4.9.3, 15 August 2016, [PJ_VERSION: 493]
## Path to PROJ.4 shared files: C:/Users/HoJa/Documents/R/R-3.6.1/library/rgdal/proj
## Linking to sp version: 1.3-2
Configure map
#https://gis.stackexchange.com/questions/283658/add-layers-with-leaflet-from-different-spatial-data-frames-in-r
#https://www.r-bloggers.com/object-of-type-closure-is-not-subsettable/
m<-leaflet() %>%
addProviderTiles('Esri.WorldImagery', group="Satellite Imagery") %>%
addCircleMarkers(data= filter(NPRIdata, Intuitive_Sector_Name_E=="Water and Wastewater Systems" & PROVINCE=="ON"),
lng=~LONG_DEC, lat=~LATI_DEC,
radius = 3, # size of the dots
fillOpacity = .7, # alpha of the dots
stroke = FALSE, # no outline
popup = ~NPRIdata$'FACI_NAME',
group="Facility",
color = 'white') %>%
addPolygons(data=(WasteSitesmap), #can't filter out shapefile
weight=5,
col = 'red',
group="Waste Sites")%>%
addLayersControl(
baseGroups = c("Satellite Imagery"),
overlayGroups = c("W&WW Facilities", "Waste Sites"),
options = layersControlOptions(collapsed = F))
m
Add up the number of plants in the buffer add it back to SPDF example point
#future insert for biosolids/flow vol by plant
plantset@data<-
mutate(plantset@data, group = cut(CSDUID, breaks = c(3501012, 3515012, 3520012, 3538012, Inf), #groups of biosolids
labels = c("lightblue", "blue", "green", "purple"),
include.lowest = TRUE))
icons <- awesomeIcons(
icon = 'ios-close',
iconColor = 'black',
library = 'ion',
markerColor = plantset@data$group)
#this throws an error !!!!!!!!!!!!!
#over(SpatialPointsDataFrame,SpatialPointsPolygonsDataFrame)
#table(res$DisposalSiteName) # count points, reference -
#CHECK
o<-leaflet()%>% addProviderTiles('Esri.WorldImagery', group="Satellite Imagery", options = providerTileOptions(opacity = 0.7)) %>%
addAwesomeMarkers(data=plantset, group="Wastewater Plants",icon=icons, label=~as.character(FACI_NAME)) %>%
addPolygons(data=pointsBuffer, color=~palette(plant_count), label = ~DisposalSiteName, popup = ~paste(plant_count, "plants in this area")) %>%
addLegend(title = "Number of plants in buffer", pal = palette, values= pointsBuffer@data$plant_count, opacity = 0.9, position="bottomleft") %>%
addLegend(title = "CSDUID, less than: (future biosolids vol)", colors= unique(plantset@data$group), labels= c(3501012, 3515012, 3520012, 3538012), opacity = 0.9, position="bottomright") #remove hard-coded bit to correspond with quantites when avail
o
#can we print?
#library(leaflet)
#library(mapview)
#library(htmlwidgets)
#saveWidget(o, file="test.html")
#mapshot(o, url = "~/map.png")
#Scrap heap code
A listing of provincially approved landfills from 2011 (validated 2014) is available from the Minsitry of Environment, Conservation, and Parks From the Ontario Open Data Catalogue: https://data.ontario.ca/dataset/large-landfill-sites
ODO_LLandfills<-read_csv('https://files.ontario.ca/opendata/large_landfills.csv', skip=1)
## Parsed with column specification:
## cols(
## .default = col_character(),
## `TOTAL SITE AREA (ha)` = col_double(),
## `FOOTPRINT (ha)` = col_double(),
## `TOTAL APPROVED CAPACITY` = col_double(),
## `MAXIMUM APPROVED FILL RATE` = col_double(),
## `ESTIMATED REMAINING CAPACITY/ESTIMATED VOLUME` = col_double(),
## `TOTAL WASTE RECEIVED` = col_double(),
## `LAST REPORTING YEAR` = col_double(),
## LATITUDE = col_double(),
## LONGITUDE = col_double(),
## NORTHING = col_double(),
## EASTING = col_double(),
## `UTM ZONE` = col_double()
## )
## See spec(...) for full column specifications.
#str(ODO_LLandfills)
ODO_LLandfills<-clean_names(ODO_LLandfills)
landfill<-filter(ODO_LLandfills,operation_status =='Open')
landfill$longitude<-as.numeric(landfill$longitude)
landfill$latitude<-as.numeric(landfill$latitude)
coordinates(landfill) <- ~longitude + latitude
proj4string(plantset) <- CRS("+init=epsg:4269")
#CHECK
p<-leaflet()%>% addProviderTiles('Esri.WorldImagery', group="Satellite Imagery") %>%
#addMarkers(data=example_points) %>%
addMarkers(data=landfill)
p
names(landfill)
## [1] "eca_number"
## [2] "eca_issue_date"
## [3] "moe_region"
## [4] "moe_district"
## [5] "environmental_compliance_approval_issued_to"
## [6] "site_name"
## [7] "operation_status"
## [8] "landfill_type"
## [9] "site_location"
## [10] "site_municipality"
## [11] "county_district_region"
## [12] "total_site_area_ha"
## [13] "footprint_ha"
## [14] "total_approved_capacity"
## [15] "total_approved_capacity_unit"
## [16] "maximum_approved_fill_rate"
## [17] "maximum_approved_fill_rate_unit"
## [18] "contaminant_attenuation_zone"
## [19] "service_area"
## [20] "approved_waste_types"
## [21] "air_emission_monitoring"
## [22] "groundwater_monitoring"
## [23] "surface_water_monitoring"
## [24] "landfill_gas_monitoring_frequency"
## [25] "natural_attenuation"
## [26] "liners"
## [27] "cover_material"
## [28] "leachate_off_site_treatment"
## [29] "leachate_on_site_treatment"
## [30] "landfill_gas_management_passive"
## [31] "landfill_gas_management_flaring"
## [32] "landfill_gas_management_energy_generating"
## [33] "financial_assurance"
## [34] "estimated_remaining_capacity_estimated_volume"
## [35] "estimated_remaining_capacity_estimated_volume_unit"
## [36] "estimated_remaining_capacity_estimated_volume_date_last_determined"
## [37] "estimated_remaining_capacity_estimated_volume_methodology"
## [38] "total_waste_received"
## [39] "total_waste_received_unit"
## [40] "total_waste_received_methodology"
## [41] "last_reporting_year"
## [42] "collected_landfill_gas"
## [43] "required_to_collect_landfill_gas"
## [44] "northing"
## [45] "easting"
## [46] "utm_zone"
#estimated_remaining_capacity_estimated_volume <-cubic meters
# divide by total_waste_received <- tonnes , need density
If
$ ERC_ESTIMATED_VOLUME : chr [1:32] “ESTIMATED REMAINING CAPACITY/ESTIMATED VOLUME” “644503” “5060000” “5102563” … $ ERC_ESTIMATED_VOLUME_UNIT : chr [1:32] “ESTIMATED REMAINING CAPACITY/ESTIMATED VOLUME UNIT” “Cubic Metres”
$ FILL_RATE_2 : chr [1:32] “MAXIMUM APPROVED FILL RATE” “81000” “123000” “755000” … $ FILL_RATE_2_UNIT : chr [1:32] “MAXIMUM APPROVED FILL RATE UNIT” “Tonnes / Year” “Tonnes / Year” “Tonnes / Year” … $ LATITUDE : chr [1:32] “LATITUDE” “44.38660675” “43.47264149” “45.30528808” … $ LONGITUDE