├── CodeLinkR ├── CodeLinkeR.Rproj ├── DESCRIPTION ├── NAMESPACE ├── R │ ├── Reformat_LoW.R │ ├── elasticsearch.R │ ├── get_classification_versions.R │ ├── initialize_New_OntStore.R │ ├── link_CN_to_CPA.R │ ├── link_CN_to_SITC.R │ ├── link_HS_to_ISIC.R │ ├── link_HS_to_SITC.R │ ├── link_ISIC_to_CPC.R │ ├── link_ISIC_to_ISIC.R │ ├── link_NACE_to_ISIC.R │ ├── link_NACE_to_NAICS.R │ ├── link_NAICS_to_ISIC.R │ ├── main.R │ ├── parse_CN.R │ ├── parse_CPA.R │ ├── parse_CPC.R │ ├── parse_EWC.R │ ├── parse_HS.R │ ├── parse_ISIC.R │ ├── parse_NACE.R │ ├── parse_NAICS.R │ ├── parse_NHM.R │ ├── parse_PRODCOM.R │ ├── parse_SITC.R │ ├── print_Classification_Statistics.R │ ├── sparql_queries.R │ ├── utils.R │ ├── visualize_Classification_Linkages.Rmd │ ├── visualize_Classification_Linkages.html │ └── zzz.R ├── data │ └── Turtle │ │ ├── CN2015.turtle.tar.gz │ │ ├── CN2016.turtle.tar.gz │ │ ├── CN2016_to_CPA2008.turtle.tar.gz │ │ ├── CN2016_to_SITC4.turtle.tar.gz │ │ ├── CPA2.1.turtle.tar.gz │ │ ├── CPA2008.turtle.tar.gz │ │ ├── CPC2.1.turtle.tar.gz │ │ ├── EWC2002.turtle.tar.gz │ │ ├── HS2012.turtle.tar.gz │ │ ├── HS2012_to_ISIC3.turtle.tar.gz │ │ ├── HS2012_to_SITC3.turtle.tar.gz │ │ ├── HS2012_to_SITC4.turtle.tar.gz │ │ ├── ISIC3.1.turtle.tar.gz │ │ ├── ISIC3.1_to_ISIC3.turtle.tar.gz │ │ ├── ISIC3.1_to_ISIC4.turtle.tar.gz │ │ ├── ISIC3.turtle.tar.gz │ │ ├── ISIC4.turtle.tar.gz │ │ ├── ISIC4_to_CPC2.1.turtle.tar.gz │ │ ├── NACE2.turtle.tar.gz │ │ ├── NACE2_to_ISIC4.turtle.tar.gz │ │ ├── NACE2_to_NAICS2012.turtle.tar.gz │ │ ├── NAICS2012.turtle.tar.gz │ │ ├── NAICS2012_to_ISIC4.turtle.tar.gz │ │ ├── NHM2015.turtle.tar.gz │ │ ├── PRODCOM2014.turtle.tar.gz │ │ ├── PRODCOM2015.turtle.tar.gz │ │ ├── SITC3.turtle.tar.gz │ │ ├── SITC4.turtle.tar.gz │ │ ├── loadAll.sh │ │ ├── loadAllTriples.sh │ │ ├── unzipTheTurtles.sh │ │ └── zipTheTurtles.sh └── inst │ ├── classifications.yaml │ ├── classifications │ └── EWC │ │ ├── LoW_Classification.txt │ │ └── LoW_Waste_Thesaurus.txt │ ├── concordances.yaml │ └── python │ └── Turtle2Neo4j.py ├── README.md ├── WhatLinksToWhat.dot ├── WhatLinksToWhat.dot.m4 ├── WhatLinksToWhat.png ├── WhatLinksToWhat.sh └── images ├── AdjMatrix-1.png ├── AdjMatrixSimplified-1.png ├── wltw_logo.png └── wltw_product_industry_linkages.png /CodeLinkR/CodeLinkeR.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 2 10 | Encoding: UTF-8 11 | 12 | RnwWeave: Sweave 13 | LaTeX: pdfLaTeX 14 | 15 | AutoAppendNewline: Yes 16 | StripTrailingWhitespace: Yes 17 | 18 | BuildType: Package 19 | PackageUseDevtools: Yes 20 | PackageInstallArgs: --no-multiarch --with-keep.source 21 | -------------------------------------------------------------------------------- /CodeLinkR/DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: CodeLinkeR 2 | Type: Package 3 | Title: What the Package Does (Title Case) 4 | Version: 0.1 5 | Date: 2016-04-04 6 | Author: Chris Davis 7 | Maintainer: Who to complain to 8 | Description: More about what it does (maybe more than one line) 9 | License: What license is it under? 10 | LazyData: TRUE 11 | Depends: 12 | XLConnect, 13 | rrdf, 14 | yaml, 15 | stringr, 16 | SPARQL, 17 | readxl, 18 | rjson, 19 | elastic 20 | -------------------------------------------------------------------------------- /CodeLinkR/NAMESPACE: -------------------------------------------------------------------------------- 1 | exportPattern("^[[:alpha:]]+") 2 | -------------------------------------------------------------------------------- /CodeLinkR/R/Reformat_LoW.R: -------------------------------------------------------------------------------- 1 | reformat_LoW <- function(){ 2 | 3 | options(stringsAsFactors = FALSE) 4 | 5 | library(dplyr) 6 | 7 | examples = "/home/cbdavis/Desktop/svn/what-links-to-what/CodeLinkR/inst/classifications/EWC/LoW_Examples.txt" 8 | thesaurus = "/home/cbdavis/Desktop/svn/what-links-to-what/CodeLinkR/inst/classifications/EWC/LoW_Waste_Thesaurus.txt" 9 | 10 | df = read.csv(thesaurus, sep="\t", header=FALSE) 11 | colnames(df) = c("Waste", "Codes") 12 | newDF2 = c() 13 | for (i in c(1:nrow(df))){ 14 | print(i) 15 | if (df$Codes[i] != ""){ 16 | codes = strsplit(df$Codes[i], ", ")[[1]] 17 | tmp = cbind(df$Waste[i], codes) 18 | colnames(tmp) = c("Waste", "Codes") 19 | newDF2 = rbind(newDF2, tmp) 20 | } 21 | } 22 | 23 | 24 | 25 | examplesAndCodes = as.data.frame(newDF2) 26 | colnames(examplesAndCodes) = c("Example", "Code") 27 | examplesAndCodes = examplesAndCodes[which(!duplicated(examplesAndCodes)),] 28 | examplesAndCodes = examplesAndCodes[which(examplesAndCodes$Example != ""),] 29 | examplesAndCodes = examplesAndCodes[,c(2,1)] 30 | 31 | examplesAndCodes = examplesAndCodes %>% arrange(Code, Example) 32 | 33 | # write back to file 34 | write.table(examplesAndCodes, file="/home/cbdavis/Dropbox/IS Data/Databases/LOW/LoW_Cleaned_Examples.txt", sep="\t", row.names = FALSE) 35 | } 36 | -------------------------------------------------------------------------------- /CodeLinkR/R/elasticsearch.R: -------------------------------------------------------------------------------- 1 | write_to_Elasticsearch <- function(outputFile = "Elasticsearch.json"){ 2 | df = download_All_Data() 3 | fileConn<-file(outputFile, open="a") 4 | for (i in c(1:nrow(df))){ 5 | createText = paste0('{ "create" : { "_index" : "classifications", "_type" : "classification", "_id" : "',df$concept[i],'" } }') 6 | dataText = toJSON(df[i,]) 7 | writeLines(createText, fileConn) 8 | writeLines(dataText, fileConn) 9 | } 10 | close(fileConn) 11 | # To reload: 12 | # curl -XDELETE 'http://localhost:9200/classifications/' 13 | # curl -XPUT 'http://localhost:9200/classifications' 14 | # curl -XPOST 'http://localhost:9200/_bulk' --data-binary @Elasticsearch.json 15 | } 16 | 17 | run_elasticsearch_query <- function(query){ 18 | connect(es_port = 9200) 19 | results = Search(index = "classifications", type = "classification", body=common_terms_query(query), asdf=TRUE)$hits$hits 20 | return(results) 21 | } 22 | 23 | common_terms_query <- function(query, cutoff_frequency=0.01){ 24 | body <- paste0('{ 25 | "query" : { 26 | "common": { 27 | "_all": { 28 | "query": "',query,'", 29 | "cutoff_frequency": ',cutoff_frequency,' 30 | } 31 | } 32 | } 33 | }') 34 | return(body) 35 | } 36 | 37 | -------------------------------------------------------------------------------- /CodeLinkR/R/get_classification_versions.R: -------------------------------------------------------------------------------- 1 | get_classification_versions <- function(name){ 2 | classificationMetaData = yaml.load_file("./inst/classifications.yaml") 3 | versions = c() 4 | for (classification in classificationMetaData$classifications){ 5 | if (classification$name == name){ 6 | versions = classification$versions 7 | } 8 | } 9 | return(versions) 10 | } 11 | 12 | get_concordance_versions <- function(name){ 13 | concordanceMetaData = yaml.load_file("./inst/concordances.yaml") 14 | versions = c() 15 | for (concordances in concordanceMetaData$concordances){ 16 | if (concordances$name == name){ 17 | versions = concordances$versions 18 | } 19 | } 20 | return(versions) 21 | } 22 | 23 | -------------------------------------------------------------------------------- /CodeLinkR/R/initialize_New_OntStore.R: -------------------------------------------------------------------------------- 1 | initialize_New_OntStore <- function(){ 2 | ontStore = new.rdf() 3 | add.prefix(ontStore, "skos", "http://www.w3.org/2004/02/skos/core#") 4 | add.prefix(ontStore, "rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#") 5 | return(ontStore) 6 | } 7 | -------------------------------------------------------------------------------- /CodeLinkR/R/link_CN_to_CPA.R: -------------------------------------------------------------------------------- 1 | link_CN_to_CPA <- function(concordanceAbbrev = "CN_to_CPA", turtlePath = "./data/Turtle"){ 2 | 3 | dir.create(turtlePath, recursive=TRUE) 4 | versions = get_concordance_versions(concordanceAbbrev) 5 | 6 | for (item in versions){ 7 | versionsAbbrev = paste0(gsub("/", "", item$classification1), "_to_", gsub("/", "", item$classification2)) 8 | 9 | dataDir = paste0("./data/",concordanceAbbrev,"/", versionsAbbrev) 10 | 11 | dir.create(dataDir, recursive=TRUE) 12 | 13 | fileName = tail(strsplit(item$url, "/")[[1]], n=1) 14 | filePath = paste0(dataDir, "/", fileName) 15 | if (!file.exists(filePath)){ 16 | download.file(item$url, filePath) 17 | } 18 | unzip(filePath, exdir=dataDir) 19 | 20 | wb <- loadWorkbook(paste0(dataDir, "/", item$dataFile)) 21 | ws = readWorksheet(wb, 1) 22 | colnames(ws) = strsplit(item$colnames, ",")[[1]] 23 | 24 | 25 | # some of these codes are weird, not sure how to process them: "23SS", "23VV", "SSSS" 26 | # fix CPA codes to standard format: 00.00.00 27 | # only fix if between 5 and 6 numbers, and no letters 28 | locs = which(grepl("[0-9]{5,6}", ws$Code2)) 29 | ws$Code2[locs] = unlist(lapply(ws$Code2[locs], 30 | FUN=function(x){ 31 | paste0(substring(x, 1,2), 32 | ".", 33 | substring(x, 3,4), 34 | ".", 35 | substring(x, 5))})) 36 | 37 | write_Code1_to_Code2_to_RDF(ws, versionsAbbrev, item$classification1, item$classification2, turtlePath) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /CodeLinkR/R/link_CN_to_SITC.R: -------------------------------------------------------------------------------- 1 | link_CN_to_SITC <- function(concordanceAbbrev = "CN_to_SITC", turtlePath = "./data/Turtle"){ 2 | dir.create(turtlePath, recursive=TRUE) 3 | versions = get_concordance_versions(concordanceAbbrev) 4 | 5 | for (item in versions){ 6 | versionsAbbrev = paste0(gsub("/", "", item$classification1), "_to_", gsub("/", "", item$classification2)) 7 | 8 | dataDir = paste0("./data/",concordanceAbbrev,"/", versionsAbbrev) 9 | 10 | dir.create(dataDir, recursive=TRUE) 11 | 12 | fileName = tail(strsplit(item$url, "/")[[1]], n=1) 13 | filePath = paste0(dataDir, "/", fileName) 14 | if (!file.exists(filePath)){ 15 | download.file(item$url, filePath) 16 | } 17 | unzip(filePath, exdir=dataDir) 18 | 19 | wb <- loadWorkbook(paste0(dataDir, "/", item$dataFile)) 20 | ws = readWorksheet(wb, 1) 21 | colnames(ws) = strsplit(item$colnames, ",")[[1]] 22 | 23 | # for the SITC codes we need to put in the missing periods 24 | # SITC codes consiste of five digits, want to have them in the form 000.00 25 | ws$Code2 = unlist(lapply(ws$Code2, FUN=function(x){paste0(substring(x,1,3), ".", substring(x,4,5))})) 26 | 27 | write_Code1_to_Code2_to_RDF(ws, versionsAbbrev, item$classification1, item$classification2, turtlePath) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /CodeLinkR/R/link_HS_to_ISIC.R: -------------------------------------------------------------------------------- 1 | link_HS_to_ISIC <- function(concordanceAbbrev = "HS_to_ISIC", turtlePath = "./data/Turtle"){ 2 | 3 | dir.create(turtlePath, recursive=TRUE) 4 | versions = get_concordance_versions(concordanceAbbrev) 5 | 6 | for (item in versions){ 7 | versionsAbbrev = paste0(gsub("/", "", item$classification1), "_to_", gsub("/", "", item$classification2)) 8 | 9 | dataDir = paste0("./data/",concordanceAbbrev,"/", versionsAbbrev) 10 | 11 | dir.create(dataDir, recursive=TRUE) 12 | 13 | fileName = tail(strsplit(item$url, "/")[[1]], n=1) 14 | filePath = paste0(dataDir, "/", fileName) 15 | if (!file.exists(filePath)){ 16 | download.file(item$url, filePath) 17 | } 18 | 19 | unzip(filePath, exdir = dataDir) 20 | 21 | ws = read.csv(paste0(dataDir, "/", item$dataFile), sep=",") 22 | colnames(ws) = strsplit(item$colnames, ",")[[1]] 23 | 24 | # need to fix up all HS codes - six digits, pad with zero on left if missing 25 | ws$Code1 = sprintf("%06d", ws$Code1) 26 | # last two digits are decimals 27 | ws$Code1 = unlist(lapply(ws$Code1, function(x){paste0(substring(x, 1, 4), ".", substring(x,5,6))})) 28 | 29 | write_Code1_to_Code2_to_RDF(ws, versionsAbbrev, item$classification1, item$classification2, turtlePath) 30 | } 31 | } 32 | 33 | 34 | -------------------------------------------------------------------------------- /CodeLinkR/R/link_HS_to_SITC.R: -------------------------------------------------------------------------------- 1 | link_HS_to_SITC <- function(concordanceAbbrev = "HS_to_SITC", turtlePath = "./data/Turtle"){ 2 | 3 | dir.create(turtlePath, recursive=TRUE) 4 | versions = get_concordance_versions(concordanceAbbrev) 5 | 6 | for (item in versions){ 7 | versionsAbbrev = paste0(gsub("/", "", item$classification1), "_to_", gsub("/", "", item$classification2)) 8 | 9 | dataDir = paste0("./data/",concordanceAbbrev,"/", versionsAbbrev) 10 | 11 | dir.create(dataDir, recursive=TRUE) 12 | 13 | fileName = tail(strsplit(item$url, "/")[[1]], n=1) 14 | filePath = paste0(dataDir, "/", fileName) 15 | if (!file.exists(filePath)){ 16 | download.file(item$url, filePath) 17 | } 18 | 19 | wb <- loadWorkbook(paste0(dataDir, "/", item$dataFile)) 20 | 21 | if (versionsAbbrev == "HS2012_to_SITC3"){ 22 | # HS2012_to_SITC3 = col 3, row 7 23 | ws = readWorksheet(wb, 1, startCol=3, startRow=7) 24 | } else if (versionsAbbrev == "HS2012_to_SITC4"){ 25 | # HS2012_to_SITC4 = col 1, row 2 26 | ws = readWorksheet(wb, 1, startCol=1, startRow=2) 27 | } else { 28 | stop("Unrecognized HS to SITC conversion. Need to add code to parse Excel worksheet properly.") 29 | } 30 | 31 | colnames(ws) = strsplit(item$colnames, ",")[[1]] 32 | # need to fix up all HS codes - six digits, pad with zero on left if missing 33 | ws$Code1 = sprintf("%06d", ws$Code1) 34 | # last two digits are decimals 35 | ws$Code1 = unlist(lapply(ws$Code1, function(x){paste0(substring(x, 1, 4), ".", substring(x,5,6))})) 36 | 37 | 38 | write_Code1_to_Code2_to_RDF(ws, versionsAbbrev, item$classification1, item$classification2, turtlePath) 39 | } 40 | } 41 | 42 | 43 | -------------------------------------------------------------------------------- /CodeLinkR/R/link_ISIC_to_CPC.R: -------------------------------------------------------------------------------- 1 | link_ISIC_to_CPC <- function(concordanceAbbrev = "ISIC_to_CPC", turtlePath = "./data/Turtle"){ 2 | 3 | dir.create(turtlePath, recursive=TRUE) 4 | versions = get_concordance_versions(concordanceAbbrev) 5 | 6 | for (item in versions){ 7 | versionsAbbrev = paste0(gsub("/", "", item$classification1), "_to_", gsub("/", "", item$classification2)) 8 | 9 | dataDir = paste0("./data/",concordanceAbbrev,"/", versionsAbbrev) 10 | 11 | dir.create(dataDir, recursive=TRUE) 12 | 13 | fileName = tail(strsplit(item$url, "/")[[1]], n=1) 14 | filePath = paste0(dataDir, "/", fileName) 15 | if (!file.exists(filePath)){ 16 | download.file(item$url, filePath) 17 | } 18 | unzip(filePath, exdir = dataDir) 19 | 20 | ws = read.csv(paste0(dataDir, "/", item$dataFile)) 21 | colnames(ws) = strsplit(item$colnames, ",")[[1]] 22 | 23 | write_Code1_to_Code2_to_RDF(ws, versionsAbbrev, item$classification1, item$classification2, turtlePath) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /CodeLinkR/R/link_ISIC_to_ISIC.R: -------------------------------------------------------------------------------- 1 | link_ISIC_to_ISIC <- function(concordanceAbbrev = "ISIC_to_ISIC", turtlePath = "./data/Turtle"){ 2 | 3 | dir.create(turtlePath, recursive=TRUE) 4 | versions = get_concordance_versions(concordanceAbbrev) 5 | 6 | for (item in versions){ 7 | versionsAbbrev = paste0(gsub("/", "", item$classification1), "_to_", gsub("/", "", item$classification2)) 8 | 9 | dataDir = paste0("./data/",concordanceAbbrev,"/", versionsAbbrev) 10 | 11 | dir.create(dataDir, recursive=TRUE) 12 | 13 | fileName = tail(strsplit(item$url, "/")[[1]], n=1) 14 | filePath = paste0(dataDir, "/", fileName) 15 | if (!file.exists(filePath)){ 16 | download.file(item$url, filePath) 17 | } 18 | unzip(filePath, exdir = dataDir) 19 | 20 | ws = read.csv(paste0(dataDir, "/", item$dataFile)) 21 | colnames(ws) = strsplit(item$colnames, ",")[[1]] 22 | 23 | write_Code1_to_Code2_to_RDF(ws, versionsAbbrev, item$classification1, item$classification2, turtlePath) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /CodeLinkR/R/link_NACE_to_ISIC.R: -------------------------------------------------------------------------------- 1 | link_NACE_to_ISIC <- function(concordanceAbbrev = "NACE_to_ISIC", turtlePath = "./data/Turtle"){ 2 | 3 | dir.create(turtlePath, recursive=TRUE) 4 | versions = get_concordance_versions(concordanceAbbrev) 5 | 6 | for (item in versions){ 7 | versionsAbbrev = paste0(gsub("/", "", item$classification1), "_to_", gsub("/", "", item$classification2)) 8 | 9 | dataDir = paste0("./data/",concordanceAbbrev,"/", versionsAbbrev) 10 | 11 | dir.create(dataDir, recursive=TRUE) 12 | 13 | filePath = paste0(dataDir, "/", item$dataFile) 14 | if (!file.exists(filePath)){ 15 | download.file(item$url, filePath) 16 | } 17 | 18 | ws = read.csv(filePath, sep=";", skip=1) 19 | colnames(ws) = strsplit(item$colnames, ",")[[1]] 20 | 21 | write_Code1_to_Code2_to_RDF(ws, versionsAbbrev, item$classification1, item$classification2, turtlePath) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /CodeLinkR/R/link_NACE_to_NAICS.R: -------------------------------------------------------------------------------- 1 | link_NACE_to_NAICS <- function(concordanceAbbrev = "NACE_to_NAICS", turtlePath = "./data/Turtle"){ 2 | 3 | dir.create(turtlePath, recursive=TRUE) 4 | versions = get_concordance_versions(concordanceAbbrev) 5 | 6 | for (item in versions){ 7 | versionsAbbrev = paste0(gsub("/", "", item$classification1), "_to_", gsub("/", "", item$classification2)) 8 | 9 | dataDir = paste0("./data/",concordanceAbbrev,"/", versionsAbbrev) 10 | 11 | dir.create(dataDir, recursive=TRUE) 12 | 13 | fileName = tail(strsplit(item$url, "/")[[1]], n=1) 14 | filePath = paste0(dataDir, "/", fileName) 15 | if (!file.exists(filePath)){ 16 | download.file(item$url, filePath) 17 | } 18 | unzip(filePath, exdir = dataDir) 19 | 20 | # from the readxl package. Can't use XLConnect since this is in Excel 5.0/7.0 21 | # "org.apache.poi.hssf.OldExcelFormatException: 22 | # The supplied spreadsheet seems to be Excel 5.0/7.0 (BIFF5) format. 23 | # POI only supports BIFF8 format (from Excel versions 97/2000/XP/2003)" 24 | ws <- read_excel(path = paste0(dataDir, "/", item$dataFile), sheet =1) 25 | colnames(ws) = strsplit(item$colnames, ",")[[1]] 26 | 27 | write_Code1_to_Code2_to_RDF(ws, versionsAbbrev, item$classification1, item$classification2, turtlePath) 28 | } 29 | } 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /CodeLinkR/R/link_NAICS_to_ISIC.R: -------------------------------------------------------------------------------- 1 | link_NAICS_to_ISIC <- function(concordanceAbbrev = "NAICS_to_ISIC", turtlePath = "./data/Turtle"){ 2 | 3 | dir.create(turtlePath, recursive=TRUE) 4 | versions = get_concordance_versions(concordanceAbbrev) 5 | 6 | for (item in versions){ 7 | versionsAbbrev = paste0(gsub("/", "", item$classification1), "_to_", gsub("/", "", item$classification2)) 8 | 9 | dataDir = paste0("./data/",concordanceAbbrev,"/", versionsAbbrev) 10 | 11 | dir.create(dataDir, recursive=TRUE) 12 | 13 | fileName = tail(strsplit(item$url, "/")[[1]], n=1) 14 | filePath = paste0(dataDir, "/", fileName) 15 | if (!file.exists(filePath)){ 16 | download.file(item$url, filePath) 17 | } 18 | unzip(filePath, exdir=dataDir) 19 | 20 | wb <- loadWorkbook(paste0(dataDir, "/", item$dataFile)) 21 | ws = readWorksheet(wb, 2) # need to read 2nd worksheet 22 | colnames(ws) = strsplit(item$colnames, ",")[[1]] 23 | 24 | write_Code1_to_Code2_to_RDF(ws, versionsAbbrev, item$classification1, item$classification2, turtlePath) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /CodeLinkR/R/main.R: -------------------------------------------------------------------------------- 1 | # You can learn more about package authoring with RStudio at: 2 | # 3 | # http://r-pkgs.had.co.nz/ 4 | # 5 | # Some useful keyboard shortcuts for package authoring: 6 | # 7 | # Build and Reload Package: 'Ctrl + Shift + B' 8 | # Check Package: 'Ctrl + Shift + E' 9 | # Test Package: 'Ctrl + Shift + T' 10 | 11 | createDescriptions = FALSE 12 | createConcordances = FALSE 13 | printStatistics = FALSE 14 | 15 | # two steps: 16 | # 1) creating descriptions for classifications 17 | if (createDescriptions){ 18 | parse_CN() 19 | parse_CPA() 20 | parse_CPC() 21 | parse_HS() 22 | parse_ISIC() 23 | parse_NACE() 24 | parse_NAICS() 25 | parse_NHM() 26 | parse_PRODCOM() 27 | parse_SITC() 28 | parse_EWC() 29 | } 30 | # 2) creating links between classifications 31 | if (createConcordances){ 32 | link_CN_to_CPA() 33 | link_CN_to_SITC() 34 | link_NAICS_to_ISIC() 35 | link_NACE_to_ISIC() 36 | link_NACE_to_NAICS() 37 | link_HS_to_SITC() 38 | link_HS_to_ISIC() 39 | link_ISIC_to_CPC() 40 | link_ISIC_to_ISIC() 41 | } 42 | 43 | if(printStatistics){ 44 | print_Classification_Statistics() 45 | } 46 | -------------------------------------------------------------------------------- /CodeLinkR/R/parse_CN.R: -------------------------------------------------------------------------------- 1 | write_CN_to_RDF <- function(ws, codeAbbrev, version, dataDir, turtlePath){ 2 | baseURL = paste0("http://isdata.org/Classifications/",codeAbbrev,"/", version, "/") 3 | 4 | ontStore = initialize_New_OntStore() 5 | 6 | # add rdf:type skos:ConceptScheme 7 | add_skos_concept_scheme(ontStore, substring(baseURL, 1, nchar(baseURL)-1)) 8 | 9 | for (i in c(1:nrow(ws))){ 10 | subjectURL = trim(paste0(baseURL, gsub(" ", "", ws$CN_Code[i]))) 11 | 12 | higherCodeURL = "" 13 | 14 | if (grepl("^[0-9]", ws$CN_Code[i])){ 15 | if (nchar(ws$CN_Code[i]) == 4){ 16 | # look for the right chapter 17 | # Make sure to include the ' ' when searching - non-breakable space? 18 | loc = which(ws$CN_Code == paste0("CHAPTER ", substring(ws$CN_Code[i],1,2))) 19 | if (any(loc)){ 20 | higherCodeURL = paste0(baseURL, ws$CN_Code[loc]) 21 | } 22 | } else if (nchar(ws$CN_Code[i]) > 4){ 23 | tmp = strsplit(ws$CN_Code[i], " ")[[1]] 24 | higherCode = paste(tmp[c(1:(length(tmp)-1))], collapse=" ") 25 | 26 | higherCodeLoc = which(ws$CN_Code == higherCode) 27 | if (!any(higherCodeLoc)){ 28 | higherCode = paste(tmp[c(1:(length(tmp)-2))], collapse=" ") 29 | higherCodeLoc = which(ws$CN_Code == higherCode) 30 | } 31 | 32 | if (any(higherCodeLoc)){ 33 | higherCodeURL = paste0(baseURL, ws$CN_Code[higherCodeLoc]) 34 | } 35 | } 36 | } else if (grepl("^CHAPTER", ws$CN_Code[i])){ 37 | # just use the heading above 38 | higherCodeURL = paste0(baseURL, ws$CN_Code[i-1]) 39 | } 40 | 41 | if (higherCodeURL != ""){ 42 | higherCodeURL = trim(gsub(" ", "", higherCodeURL)) 43 | add_skos_narrower(ontStore, higherCodeURL, subjectURL) 44 | add_skos_broader(ontStore, subjectURL, higherCodeURL) 45 | } 46 | 47 | add_skos_inScheme(ontStore, subjectURL, substring(baseURL, 1, nchar(baseURL)-1)) 48 | 49 | code = ws$CN_Code[i] 50 | if (grepl("^[0-9]", code)){ 51 | code = gsub(" ", "", code) 52 | } 53 | 54 | add_skos_concept_node(ontStore, 55 | conceptId = subjectURL, 56 | notation = code, 57 | description = ws$EN[i], 58 | prefLabel = ws$CN_Code[i], 59 | altLabel = ws$Sorting_Key[i]) 60 | 61 | } 62 | 63 | save.rdf(ontStore, paste0(turtlePath, "/", codeAbbrev, version, ".turtle"), format="TURTLE") 64 | } 65 | 66 | 67 | parse_CN <- function(codeAbbrev = "CN", turtlePath = "./data/Turtle"){ 68 | dir.create(turtlePath, recursive=TRUE) 69 | versions = get_classification_versions(codeAbbrev) 70 | 71 | for (item in versions){ 72 | dataDir = paste0("./data/",codeAbbrev,"/", item$version) 73 | 74 | dir.create(dataDir, recursive=TRUE) 75 | fileName = tail(strsplit(item$url, "/")[[1]], n=1) 76 | filePath = paste0(dataDir, "/", fileName) 77 | if (!file.exists(filePath)){ 78 | download.file(item$url, filePath) 79 | } 80 | unzip(filePath, exdir=dataDir) 81 | wb <- loadWorkbook(paste0(dataDir, "/", item$dataFile)) 82 | ws = readWorksheet(wb, 1) 83 | colnames(ws) = strsplit(item$colnames, ",")[[1]] 84 | write_CN_to_RDF(ws, codeAbbrev, item$version, dataDir, turtlePath) 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /CodeLinkR/R/parse_CPA.R: -------------------------------------------------------------------------------- 1 | write_CPA_to_RDF <- function(ws, codeAbbrev, version, dataDir, turtlePath){ 2 | baseURL = paste0("http://isdata.org/Classifications/",codeAbbrev,"/", version, "/") 3 | 4 | ontStore = initialize_New_OntStore() 5 | 6 | # add rdf:type skos:ConceptScheme 7 | add_skos_concept_scheme(ontStore, substring(baseURL, 1, nchar(baseURL)-1)) 8 | 9 | for (i in c(1:nrow(ws))){ 10 | subjectURL = paste0(baseURL, ws$Code[i]) 11 | 12 | higherCodeURL = "" 13 | if (ws$Parent[i] != ""){ 14 | loc = which(ws$Code == ws$Parent[i]) 15 | higherCodeURL = paste0(baseURL, ws$Code[loc]) 16 | } 17 | 18 | if (higherCodeURL != ""){ 19 | add_skos_narrower(ontStore, higherCodeURL, subjectURL) 20 | add_skos_broader(ontStore, subjectURL, higherCodeURL) 21 | } 22 | 23 | add_skos_inScheme(ontStore, subjectURL, substring(baseURL, 1, nchar(baseURL)-1)) 24 | 25 | add_skos_concept_node(ontStore, 26 | conceptId = subjectURL, 27 | notation = ws$Code[i], 28 | description = ws$Description[i], 29 | prefLabel = ws$Code[i], 30 | altLabel = as.character(ws$Order[i])) 31 | } 32 | save.rdf(ontStore, paste0(turtlePath, "/", codeAbbrev, version, ".turtle"), format="TURTLE") 33 | } 34 | 35 | parse_CPA <- function(codeAbbrev = "CPA", turtlePath = "./data/Turtle"){ 36 | dir.create(turtlePath, recursive=TRUE) 37 | versions = get_classification_versions(codeAbbrev) 38 | 39 | for (item in versions){ 40 | dataDir = paste0("./data/",codeAbbrev,"/", item$version) 41 | 42 | dir.create(dataDir, recursive=TRUE) 43 | filePath = paste0(dataDir, "/", item$dataFile) 44 | if (!file.exists(filePath)){ 45 | download.file(item$url, filePath) 46 | } 47 | 48 | ws = read.csv(filePath, sep=";") 49 | colnames(ws) = strsplit(item$colnames, ",")[[1]] 50 | write_CPA_to_RDF(ws, codeAbbrev, item$version, dataDir, turtlePath) 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /CodeLinkR/R/parse_CPC.R: -------------------------------------------------------------------------------- 1 | write_CPC_to_RDF <- function(ws, codeAbbrev, version, dataDir, turtlePath){ 2 | baseURL = paste0("http://isdata.org/Classifications/",codeAbbrev,"/", version, "/") 3 | 4 | ontStore = initialize_New_OntStore() 5 | 6 | locs = which(is.na(ws$Description)) 7 | if (any(locs)){ 8 | ws$Description[locs] = "" 9 | } 10 | 11 | # add rdf:type skos:ConceptScheme 12 | add_skos_concept_scheme(ontStore, substring(baseURL, 1, nchar(baseURL)-1)) 13 | 14 | for (i in c(1:nrow(ws))){ 15 | subjectURL = paste0(baseURL, ws$Code[i]) 16 | 17 | higherCodeURL = "" 18 | 19 | loc = which(ws$Code == substr(ws$Code[i], 1, nchar(ws$Code[i])-1)) 20 | if (any(loc)){ 21 | higherCodeURL = paste0(baseURL, ws$Code[loc]) 22 | } 23 | 24 | if (higherCodeURL != ""){ 25 | add_skos_narrower(ontStore, higherCodeURL, subjectURL) 26 | add_skos_broader(ontStore, subjectURL, higherCodeURL) 27 | } 28 | 29 | add_skos_inScheme(ontStore, subjectURL, substring(baseURL, 1, nchar(baseURL)-1)) 30 | add_skos_concept_node(ontStore, 31 | conceptId = subjectURL, 32 | notation = as.character(ws$Code[i]), 33 | description = ws$Description[i], 34 | prefLabel = as.character(ws$Code[i])) 35 | } 36 | 37 | save.rdf(ontStore, paste0(turtlePath, "/", codeAbbrev, version, ".turtle"), format="TURTLE") 38 | } 39 | 40 | parse_CPC <- function(codeAbbrev = "CPC", turtlePath = "./data/Turtle"){ 41 | dir.create(turtlePath, recursive=TRUE) 42 | versions = get_classification_versions(codeAbbrev) 43 | 44 | for (item in versions){ 45 | dataDir = paste0("./data/",codeAbbrev,"/", item$version) 46 | 47 | dir.create(dataDir, recursive=TRUE) 48 | 49 | fileName = tail(strsplit(item$url, "/")[[1]], n=1) 50 | filePath = paste0(dataDir, "/", fileName) 51 | if (!file.exists(filePath)){ 52 | download.file(item$url, filePath) 53 | } 54 | unzip(filePath, exdir=dataDir) 55 | 56 | ws = read.csv(paste0(dataDir, "/", item$dataFile), sep=",", colClasses = c("character", "character")) 57 | colnames(ws) = strsplit(item$colnames, ",")[[1]] 58 | 59 | write_CPC_to_RDF(ws, codeAbbrev, item$version, dataDir, turtlePath) 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /CodeLinkR/R/parse_EWC.R: -------------------------------------------------------------------------------- 1 | write_EWC_to_RDF <- function(ws_examples, ws_classification, codeAbbrev, version, dataDir, turtlePath){ 2 | 3 | baseURL = paste0("http://isdata.org/Classifications/",codeAbbrev,"/", version, "/") 4 | 5 | ontStore = initialize_New_OntStore() 6 | 7 | # add rdf:type skos:ConceptScheme 8 | add_skos_concept_scheme(ontStore, substring(baseURL, 1, nchar(baseURL)-1)) 9 | 10 | process_examples(ontStore, ws_examples, baseURL) 11 | 12 | process_classification(ontStore, ws_classification, baseURL) 13 | 14 | save.rdf(ontStore, paste0(turtlePath, "/", codeAbbrev, version, ".turtle"), format="TURTLE") 15 | } 16 | 17 | process_classification <- function(ontStore, ws_classification, baseURL){ 18 | for (i in c(1:nrow(ws_classification))){ 19 | subjectURL = paste0(baseURL, gsub(" ", "_", ws_classification$Code[i])) 20 | 21 | # just need Code and Description columns 22 | code = ws_classification$Code[i] 23 | parentCode = paste(head(strsplit(code, " ")[[1]], -1), collapse=" ") 24 | if (parentCode != ""){ 25 | higherCodeURL = paste0(baseURL, gsub(" ", "_", parentCode)) 26 | 27 | add_skos_narrower(ontStore, higherCodeURL, subjectURL) 28 | add_skos_broader(ontStore, subjectURL, higherCodeURL) 29 | } 30 | 31 | add_skos_inScheme(ontStore, subjectURL, substring(baseURL, 1, nchar(baseURL)-1)) 32 | 33 | add_skos_concept_node(ontStore, 34 | conceptId = subjectURL, 35 | notation = ws_classification$Code[i], 36 | description = ws_classification$Description[i], 37 | prefLabel = ws_classification$Code[i]) 38 | } 39 | } 40 | 41 | process_examples <- function(ontStore, ws_examples, baseURL){ 42 | 43 | # need to reshape things - can be multiple codes on one line 44 | new_ws_examples = c() 45 | for (i in c(1:nrow(ws_examples))){ 46 | new_ws_examples = rbind(new_ws_examples, cbind(ws_examples$Waste[i], strsplit(ws_examples$Codes[i], ", ")[[1]])) 47 | } 48 | new_ws_examples = as.data.frame(new_ws_examples) 49 | colnames(new_ws_examples) = c("Example", "Code") 50 | ws_examples = new_ws_examples 51 | rm(new_ws_examples) 52 | 53 | for (i in c(1:nrow(ws_examples))){ 54 | subjectURL = paste0(baseURL, gsub(" ", "_", ws_examples$Code[i])) 55 | add_skos_example(ontStore, subjectURL, ws_examples$Example[i]) 56 | } 57 | } 58 | 59 | 60 | parse_EWC <- function(codeAbbrev = "EWC", turtlePath = "./data/Turtle"){ 61 | dir.create(turtlePath, recursive=TRUE, showWarnings=FALSE) 62 | versions = get_classification_versions(codeAbbrev) 63 | 64 | # Two different files are used 65 | # LoW_Waste_Thesaurus.txt 66 | # LoW_Classification.txt 67 | 68 | ws_examples = c() 69 | ws_classification = c() 70 | 71 | for (item in versions){ 72 | dataDir = paste0("./data/",codeAbbrev,"/", item$version) 73 | 74 | dir.create(dataDir, recursive=TRUE, showWarnings=FALSE) 75 | 76 | ws = read.csv(item$dataFile, sep="\t", header=FALSE) 77 | 78 | colnames(ws) = strsplit(item$colnames, ",")[[1]] 79 | 80 | if (grepl("LoW_Waste_Thesaurus", item$dataFile)){ 81 | ws_examples = ws 82 | } else { 83 | ws_classification = ws 84 | } 85 | } 86 | 87 | write_EWC_to_RDF(ws_examples, ws_classification, codeAbbrev, item$version, dataDir, turtlePath) 88 | } 89 | -------------------------------------------------------------------------------- /CodeLinkR/R/parse_HS.R: -------------------------------------------------------------------------------- 1 | write_HS_to_RDF <- function(ws, codeAbbrev, version, dataDir, turtlePath){ 2 | baseURL = paste0("http://isdata.org/Classifications/",codeAbbrev,"/", version, "/") 3 | 4 | ontStore = initialize_New_OntStore() 5 | 6 | # add rdf:type skos:ConceptScheme 7 | add_skos_concept_scheme(ontStore, substring(baseURL, 1, nchar(baseURL)-1)) 8 | 9 | for (i in c(1:nrow(ws))){ 10 | subjectURL = paste0(baseURL, ws$HS_CODE[i]) 11 | 12 | # the higher code is found by chopping off characters starting from the right 13 | # and finding the first code that matches 14 | keepSearching = TRUE 15 | higherCode = ws$HS_CODE[i] 16 | higherCodeURL = "" 17 | while(keepSearching){ 18 | higherCode = substring(higherCode, 1,nchar(higherCode)-1) 19 | higherCodeLoc = which(ws$HS_CODE == higherCode) 20 | if (any(higherCodeLoc)){ 21 | keepSearching = FALSE 22 | higherCodeURL = paste0(baseURL, ws$HS_CODE[higherCodeLoc]) 23 | } 24 | if (nchar(higherCode) <= 1){ 25 | keepSearching = FALSE 26 | } 27 | } 28 | 29 | if (higherCodeURL != ""){ 30 | add_skos_narrower(ontStore, higherCodeURL, subjectURL) 31 | add_skos_broader(ontStore, subjectURL, higherCodeURL) 32 | } 33 | 34 | add_skos_inScheme(ontStore, subjectURL, substring(baseURL, 1, nchar(baseURL)-1)) 35 | 36 | add_skos_concept_node(ontStore, 37 | conceptId = subjectURL, 38 | notation = ws$HS_CODE[i], 39 | description = ws$SE_DESC_EN[i], 40 | prefLabel = ws$HS_CODE[i]) 41 | } 42 | 43 | save.rdf(ontStore, paste0(turtlePath, "/", codeAbbrev, version, ".turtle"), format="TURTLE") 44 | } 45 | 46 | parse_HS <- function(codeAbbrev = "HS", turtlePath = "./data/Turtle"){ 47 | dir.create(turtlePath, recursive=TRUE) 48 | versions = get_classification_versions(codeAbbrev) 49 | 50 | for (item in versions){ 51 | 52 | dataDir = paste0("./data/",codeAbbrev,"/", item$version) 53 | 54 | dir.create(dataDir, recursive=TRUE) 55 | fileName = tail(strsplit(item$url, "/")[[1]], n=1) 56 | filePath = paste0(dataDir, "/", fileName) 57 | if (!file.exists(filePath)){ 58 | download.file(item$url, filePath) 59 | } 60 | 61 | unzip(filePath, exdir = dataDir) 62 | wb <- loadWorkbook(paste0(dataDir, "/", item$dataFile)) 63 | ws = readWorksheet(wb, 1) 64 | colnames(ws) = strsplit(item$colnames, ",")[[1]] 65 | 66 | write_HS_to_RDF(ws, codeAbbrev, item$version, dataDir, turtlePath) 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /CodeLinkR/R/parse_ISIC.R: -------------------------------------------------------------------------------- 1 | write_ISIC_to_RDF <- function(ws, codeAbbrev, version, dataDir, turtlePath){ 2 | baseURL = paste0("http://isdata.org/Classifications/",codeAbbrev,"/", version, "/") 3 | 4 | ontStore = initialize_New_OntStore() 5 | 6 | # add rdf:type skos:ConceptScheme 7 | add_skos_concept_scheme(ontStore, substring(baseURL, 1, nchar(baseURL)-1)) 8 | 9 | for (i in c(1:nrow(ws))){ 10 | subjectURL = paste0(baseURL, ws$Code[i]) 11 | 12 | 13 | higherCodeURL = "" 14 | 15 | loc = which(ws$Code == substr(ws$Code[i], 1, nchar(ws$Code[i])-1)) 16 | if (any(loc)){ 17 | higherCodeURL = paste0(baseURL, ws$Code[loc]) 18 | } 19 | 20 | if (higherCodeURL != ""){ 21 | add_skos_narrower(ontStore, higherCodeURL, subjectURL) 22 | add_skos_broader(ontStore, subjectURL, higherCodeURL) 23 | } 24 | 25 | add_skos_inScheme(ontStore, subjectURL, substring(baseURL, 1, nchar(baseURL)-1)) 26 | 27 | add_skos_concept_node(ontStore, 28 | conceptId = subjectURL, 29 | notation = ws$Code[i], 30 | description = ws$Description[i], 31 | prefLabel = ws$Code[i]) 32 | } 33 | 34 | save.rdf(ontStore, paste0(turtlePath, "/", codeAbbrev, version, ".turtle"), format="TURTLE") 35 | } 36 | 37 | parse_ISIC <- function(codeAbbrev = "ISIC", turtlePath = "./data/Turtle"){ 38 | dir.create(turtlePath, recursive=TRUE) 39 | versions = get_classification_versions(codeAbbrev) 40 | 41 | for (item in versions){ 42 | dataDir = paste0("./data/",codeAbbrev,"/", item$version) 43 | 44 | dir.create(dataDir, recursive=TRUE) 45 | 46 | fileName = tail(strsplit(item$url, "/")[[1]], n=1) 47 | filePath = paste0(dataDir, "/", fileName) 48 | if (!file.exists(filePath)){ 49 | download.file(item$url, filePath) 50 | } 51 | 52 | unzip(filePath, exdir = dataDir) 53 | 54 | # default 55 | if (item$version == "3"){ # version 3 is fixed width delimited 56 | ws = read.fwf(paste0(dataDir, "/", item$dataFile), widths=c(4,500), skip=1) 57 | # delete an empty row too 58 | ws = ws[which(!is.na(ws$V1)),] 59 | } else { # all other versions are comma delimited 60 | ws = read.csv(paste0(dataDir, "/", item$dataFile), sep=",") 61 | } 62 | 63 | colnames(ws) = strsplit(item$colnames, ",")[[1]] 64 | 65 | ws$Code = trim(ws$Code) 66 | ws$Description = trim(ws$Description) 67 | 68 | write_ISIC_to_RDF(ws, codeAbbrev, item$version, dataDir, turtlePath) 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /CodeLinkR/R/parse_NACE.R: -------------------------------------------------------------------------------- 1 | write_NACE_to_RDF <- function(ws, codeAbbrev, version, dataDir, turtlePath){ 2 | baseURL = paste0("http://isdata.org/Classifications/",codeAbbrev,"/", version, "/") 3 | 4 | ontStore = initialize_New_OntStore() 5 | 6 | # add rdf:type skos:ConceptScheme 7 | add_skos_concept_scheme(ontStore, substring(baseURL, 1, nchar(baseURL)-1)) 8 | 9 | for (i in c(1:nrow(ws))){ 10 | subjectURL = paste0(baseURL, ws$Code[i]) 11 | 12 | higherCodeURL = "" 13 | if (ws$Parent[i] != ""){ 14 | loc = which(ws$Code == ws$Parent[i]) 15 | higherCodeURL = paste0(baseURL, ws$Code[loc]) 16 | } 17 | 18 | if (higherCodeURL != ""){ 19 | add_skos_narrower(ontStore, higherCodeURL, subjectURL) 20 | add_skos_broader(ontStore, subjectURL, higherCodeURL) 21 | } 22 | 23 | add_skos_inScheme(ontStore, subjectURL, substring(baseURL, 1, nchar(baseURL)-1)) 24 | 25 | alsoIncludes = paste(ws$This_item_includes[i], ws$This_item_also_includes[i]) 26 | 27 | add_skos_concept_node(ontStore, 28 | conceptId = subjectURL, 29 | notation = ws$Code[i], 30 | description = ws$Description[i], 31 | prefLabel = ws$Code[i], 32 | altLabel = as.character(ws$Order[i]), 33 | example = alsoIncludes, 34 | scopeNote = ws$This_item_excludes[i]) 35 | } 36 | 37 | save.rdf(ontStore, paste0(turtlePath, "/", codeAbbrev, version, ".turtle"), format="TURTLE") 38 | } 39 | 40 | parse_NACE <- function(codeAbbrev = "NACE", turtlePath = "./data/Turtle"){ 41 | dir.create(turtlePath, recursive=TRUE) 42 | versions = get_classification_versions(codeAbbrev) 43 | 44 | for (item in versions){ 45 | dataDir = paste0("./data/",codeAbbrev,"/", item$version) 46 | 47 | dir.create(dataDir, recursive=TRUE) 48 | filePath = paste0(dataDir, "/", item$dataFile) 49 | if (!file.exists(filePath)){ 50 | download.file(item$url, filePath) 51 | } 52 | 53 | ws = read.csv(filePath, sep=";") 54 | colnames(ws) = strsplit(item$colnames, ",")[[1]] 55 | write_NACE_to_RDF(ws, codeAbbrev, item$version, dataDir, turtlePath) 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /CodeLinkR/R/parse_NAICS.R: -------------------------------------------------------------------------------- 1 | write_NAICS_to_RDF <- function(ws, codeAbbrev, version, dataDir, turtlePath){ 2 | baseURL = paste0("http://isdata.org/Classifications/",codeAbbrev,"/", version, "/") 3 | 4 | ontStore = initialize_New_OntStore() 5 | 6 | # add rdf:type skos:ConceptScheme 7 | add_skos_concept_scheme(ontStore, substring(baseURL, 1, nchar(baseURL)-1)) 8 | 9 | for (i in c(1:nrow(ws))){ 10 | subjectURL = paste0(baseURL, ws$Code[i]) 11 | 12 | higherCodeURL = "" 13 | loc = which(ws$Code == substr(ws$Code[i], 1, nchar(ws$Code[i])-1)) 14 | if (any(loc)){ 15 | higherCodeURL = paste0(baseURL, ws$Code[loc]) 16 | } 17 | 18 | if (higherCodeURL != ""){ 19 | add_skos_narrower(ontStore, higherCodeURL, subjectURL) 20 | add_skos_broader(ontStore, subjectURL, higherCodeURL) 21 | } 22 | 23 | add_skos_inScheme(ontStore, subjectURL, substring(baseURL, 1, nchar(baseURL)-1)) 24 | 25 | add_skos_concept_node(ontStore, 26 | conceptId = subjectURL, 27 | notation = ws$Code[i], 28 | description = ws$Title[i], 29 | prefLabel = ws$Code[i]) 30 | } 31 | save.rdf(ontStore, paste0(turtlePath, "/", codeAbbrev, version, ".turtle"), format="TURTLE") 32 | } 33 | 34 | parse_NAICS <- function(codeAbbrev = "NAICS", turtlePath = "./data/Turtle"){ 35 | dir.create(turtlePath, recursive=TRUE) 36 | versions = get_classification_versions(codeAbbrev) 37 | 38 | for (item in versions){ 39 | dataDir = paste0("./data/",codeAbbrev,"/", item$version) 40 | 41 | dir.create(dataDir, recursive=TRUE) 42 | filePath = paste0(dataDir, "/", item$dataFile) 43 | if (!file.exists(filePath)){ 44 | download.file(item$url, filePath) 45 | } 46 | wb <- loadWorkbook(paste0(dataDir, "/", item$dataFile)) 47 | ws = readWorksheet(wb, 1) 48 | colnames(ws) = strsplit(item$colnames, ",")[[1]] 49 | 50 | # remove NA rows (1st row) 51 | ws = ws[which(!is.na(ws[,1])),] 52 | 53 | write_NAICS_to_RDF(ws, codeAbbrev, item$version, dataDir, turtlePath) 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /CodeLinkR/R/parse_NHM.R: -------------------------------------------------------------------------------- 1 | write_NHM_to_RDF <- function(ws, codeAbbrev, version, dataDir, turtlePath){ 2 | baseURL = paste0("http://isdata.org/Classifications/",codeAbbrev,"/", version, "/") 3 | 4 | ontStore = initialize_New_OntStore() 5 | 6 | # add rdf:type skos:ConceptScheme 7 | add_skos_concept_scheme(ontStore, substring(baseURL, 1, nchar(baseURL)-1)) 8 | 9 | for (i in c(1:nrow(ws))){ 10 | subjectURL = paste0(baseURL, ws$Code[i]) 11 | 12 | # the higher code is found by going from right to left and switching non-zero numbers to zero 13 | # and seeing if there is a match 14 | keepSearching = TRUE 15 | higherCode = ws$Code[i] 16 | higherCodeURL = "" 17 | while(keepSearching){ 18 | oldHigherCode = higherCode 19 | higherCode = str_replace(higherCode, "[1-9](0*)$", "0\\1") 20 | if ((higherCode == oldHigherCode) | (grepl("[1-9]", higherCode) == FALSE)) { 21 | keepSearching = FALSE 22 | } 23 | higherCodeLoc = which(ws$Code == higherCode) 24 | if (any(higherCodeLoc)){ 25 | keepSearching = FALSE 26 | higherCodeURL = paste0(baseURL, ws$Code[higherCodeLoc]) 27 | } 28 | } 29 | 30 | if (higherCodeURL != ""){ 31 | add_skos_narrower(ontStore, higherCodeURL, subjectURL) 32 | add_skos_broader(ontStore, subjectURL, higherCodeURL) 33 | } 34 | 35 | add_skos_inScheme(ontStore, subjectURL, substring(baseURL, 1, nchar(baseURL)-1)) 36 | 37 | add_skos_concept_node(ontStore, 38 | conceptId = subjectURL, 39 | notation = ws$Code[i], 40 | description = ws$Description[i], 41 | prefLabel = ws$Code[i]) 42 | } 43 | 44 | save.rdf(ontStore, paste0(turtlePath, "/", codeAbbrev, version, ".turtle"), format="TURTLE") 45 | } 46 | 47 | parse_NHM <- function(codeAbbrev = "NHM", turtlePath = "./data/Turtle"){ 48 | dir.create(turtlePath, recursive=TRUE) 49 | versions = get_classification_versions(codeAbbrev) 50 | 51 | for (item in versions){ 52 | 53 | dataDir = paste0("./data/",codeAbbrev,"/", item$version) 54 | 55 | dir.create(dataDir, recursive=TRUE) 56 | fileName = tail(strsplit(item$url, "/")[[1]], n=1) 57 | filePath = paste0(dataDir, "/", fileName) 58 | if (!file.exists(filePath)){ 59 | download.file(item$url, filePath) 60 | } 61 | unzip(filePath, exdir=dataDir) 62 | wb <- loadWorkbook(paste0(dataDir, "/", item$dataFile)) 63 | ws = readWorksheet(wb, 1) 64 | colnames(ws) = strsplit(item$colnames, ",")[[1]] 65 | write_NHM_to_RDF(ws, codeAbbrev, item$version, dataDir, turtlePath) 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /CodeLinkR/R/parse_PRODCOM.R: -------------------------------------------------------------------------------- 1 | write_PRODCOM_to_RDF <- function(ws, codeAbbrev, version, dataDir, turtlePath){ 2 | baseURL = paste0("http://isdata.org/Classifications/",codeAbbrev,"/", version, "/") 3 | 4 | ontStore = initialize_New_OntStore() 5 | 6 | # add rdf:type skos:ConceptScheme 7 | add_skos_concept_scheme(ontStore, substring(baseURL, 1, nchar(baseURL)-1)) 8 | 9 | for (i in c(1:nrow(ws))){ 10 | subjectURL = paste0(baseURL, gsub("\\.", "", ws$CODE[i])) 11 | 12 | higherCodeURL = "" 13 | # the higher code is found by chopping off characters starting from the right 14 | # and finding the first code that matches 15 | keepSearching = TRUE 16 | higherCode = gsub("\\.", "", ws$CODE[i]) 17 | higherCodeURL = "" 18 | while(keepSearching){ 19 | higherCode = substring(higherCode, 1,nchar(higherCode)-1) 20 | higherCodeLoc = which(gsub("\\.", "", ws$CODE[i]) == higherCode) 21 | if (any(higherCodeLoc)){ 22 | keepSearching = FALSE 23 | higherCodeURL = paste0(baseURL, gsub("\\.", "", ws$CODE[higherCodeLoc])) 24 | } 25 | if (nchar(higherCode) <= 1){ 26 | keepSearching = FALSE 27 | } 28 | } 29 | 30 | if (higherCodeURL != ""){ 31 | higherCodeURL = gsub(" ", "", higherCodeURL) 32 | add_skos_narrower(ontStore, higherCodeURL, subjectURL) 33 | add_skos_broader(ontStore, subjectURL, higherCodeURL) 34 | } 35 | 36 | add_skos_inScheme(ontStore, subjectURL, substring(baseURL, 1, nchar(baseURL)-1)) 37 | 38 | add_skos_concept_node(ontStore, 39 | conceptId=subjectURL, 40 | notation = ws$CODE[i], 41 | description = ws$en[i], 42 | prefLabel = ws$CODE[i]) 43 | } 44 | 45 | save.rdf(ontStore, paste0(turtlePath, "/", codeAbbrev, version, ".turtle"), format="TURTLE") 46 | } 47 | 48 | 49 | parse_PRODCOM <- function(codeAbbrev = "PRODCOM", turtlePath = "./data/Turtle"){ 50 | dir.create(turtlePath, recursive=TRUE) 51 | versions = get_classification_versions(codeAbbrev) 52 | 53 | for (item in versions){ 54 | dataDir = paste0("./data/",codeAbbrev,"/", item$version) 55 | 56 | dir.create(dataDir, recursive=TRUE) 57 | fileName = tail(strsplit(item$url, "/")[[1]], n=1) 58 | filePath = paste0(dataDir, "/", fileName) 59 | if (!file.exists(filePath)){ 60 | download.file(item$url, filePath) 61 | } 62 | unzip(filePath, exdir=dataDir) 63 | wb <- loadWorkbook(paste0(dataDir, "/", item$dataFile)) 64 | ws = readWorksheet(wb, 1) 65 | colnames(ws) = strsplit(item$colnames, ",")[[1]] 66 | write_PRODCOM_to_RDF(ws, codeAbbrev, item$version, dataDir, turtlePath) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /CodeLinkR/R/parse_SITC.R: -------------------------------------------------------------------------------- 1 | write_SITC_to_RDF <- function(ws, codeAbbrev, version, dataDir, turtlePath){ 2 | baseURL = paste0("http://isdata.org/Classifications/",codeAbbrev,"/", version, "/") 3 | 4 | ontStore = initialize_New_OntStore() 5 | 6 | # add rdf:type skos:ConceptScheme 7 | add_skos_concept_scheme(ontStore, substring(baseURL, 1, nchar(baseURL)-1)) 8 | 9 | locs = which(is.na(ws$Description)) 10 | if (any(locs)){ 11 | ws$Description[locs] = "" 12 | } 13 | 14 | for (i in c(1:nrow(ws))){ 15 | subjectURL = paste0(baseURL, ws$Code[i]) 16 | 17 | # the higher code is found by chopping off characters starting from the right 18 | # and finding the first code that matches 19 | keepSearching = TRUE 20 | higherCode = gsub("\\.", "", ws$Code[i]) 21 | higherCodeURL = "" 22 | while(keepSearching){ 23 | higherCode = substring(higherCode, 1,nchar(higherCode)-1) 24 | higherCodeLoc = which(gsub("\\.", "", ws$Code[i]) == higherCode) 25 | if (any(higherCodeLoc)){ 26 | keepSearching = FALSE 27 | higherCodeURL = paste0(baseURL, gsub("\\.", "", ws$Code[higherCodeLoc])) 28 | } 29 | if (nchar(higherCode) <= 1){ 30 | keepSearching = FALSE 31 | } 32 | } 33 | 34 | if (higherCodeURL != ""){ 35 | add_skos_narrower(ontStore, higherCodeURL, subjectURL) 36 | add_skos_broader(ontStore, subjectURL, higherCodeURL) 37 | } 38 | 39 | add_skos_inScheme(ontStore, subjectURL, substring(baseURL, 1, nchar(baseURL)-1)) 40 | 41 | add_skos_concept_node(ontStore, 42 | conceptId = subjectURL, 43 | notation = ws$Code[i], 44 | description = ws$Description[i], 45 | prefLabel = ws$Code[i]) 46 | } 47 | 48 | save.rdf(ontStore, paste0(turtlePath, "/", codeAbbrev, version, ".turtle"), format="TURTLE") 49 | } 50 | 51 | parse_SITC <- function(codeAbbrev = "SITC", turtlePath = "./data/Turtle"){ 52 | dir.create(turtlePath, recursive=TRUE) 53 | versions = get_classification_versions(codeAbbrev) 54 | 55 | for (item in versions){ 56 | dataDir = paste0("./data/",codeAbbrev,"/", item$version) 57 | 58 | dir.create(dataDir, recursive=TRUE) 59 | 60 | fileName = tail(strsplit(item$url, "/")[[1]], n=1) 61 | filePath = paste0(dataDir, "/", fileName) 62 | if (!file.exists(filePath)){ 63 | download.file(item$url, filePath) 64 | } 65 | unzip(filePath, exdir=dataDir) 66 | 67 | # different versions have different delimiters (and file encodings) 68 | if (item$version == 3){ 69 | ws = read.fwf(file=paste0(dataDir, "/", item$dataFile), widths=c(14,1e6), fileEncoding="iso-8859-1", skip=1) 70 | } else { 71 | ws = read.csv(paste0(dataDir, "/", item$dataFile), sep="\t") 72 | } 73 | 74 | # If we have an empty description, that means that someone included a new line character without using quotes around the text 75 | # The code is actually the description for the previous item 76 | emptyDescriptionLocs = which(ws$Description == "") 77 | if (any(emptyDescriptionLocs)){ 78 | ws$Description[emptyDescriptionLocs-1] = paste(ws$Description[emptyDescriptionLocs-1], ws$Code[emptyDescriptionLocs]) 79 | ws = ws[-emptyDescriptionLocs,] 80 | } 81 | 82 | colnames(ws) = strsplit(item$colnames, ",")[[1]] 83 | # boo, invalid multibyte string 84 | ws$Code = gsub(" +", "", iconv(ws$Code, from="UTF-8", to="UTF-8")) 85 | # this gets rid of a lot of the descriptions 86 | 87 | # ws$Description = iconv(ws$Description, from="UTF-8", to="UTF-8") 88 | 89 | # deal with ellipses - prepend text from parent category where this happens 90 | fixLocs = which(grepl("^\\.\\.\\.\\.", ws$Description)) 91 | parentsOfFixLocs = gsub("\\.*[0-9]$", "", ws$Code[fixLocs]) 92 | for (i in c(1:length(fixLocs))){ 93 | ws$Description[fixLocs[i]] = paste(ws$Description[which(ws$Code == parentsOfFixLocs[i])], ws$Description[fixLocs[i]]) 94 | } 95 | write_SITC_to_RDF(ws, codeAbbrev, item$version, dataDir, turtlePath) 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /CodeLinkR/R/print_Classification_Statistics.R: -------------------------------------------------------------------------------- 1 | print_Classification_Statistics <- function(){ 2 | ontStore = initialize_New_OntStore() 3 | files = list.files(path="./data/Turtle", pattern=".turtle", full.names=TRUE) 4 | for (file in files){ 5 | load.rdf(file, "TURTLE", ontStore) 6 | } 7 | 8 | print(paste("Total number of concepts:", get_Concept_Count(ontStore))) 9 | print("Available Classifications:") 10 | print(get_Schemes(ontStore)) 11 | 12 | endpoint = "http://localhost:9999/blazegraph/sparql" 13 | schemes = get_Schemes(endpoint) 14 | 15 | stats = get_Number_of_Links_Between_Schemes(endpoint) 16 | 17 | # need to write output like: 18 | #digraph G { 19 | #rankdir=LR 20 | #"CN/2016" -> "CPA/2008" [label= "skos:narrowMatch" penwidth= 3.9251573272 ] 21 | #} 22 | 23 | 24 | } 25 | -------------------------------------------------------------------------------- /CodeLinkR/R/sparql_queries.R: -------------------------------------------------------------------------------- 1 | get_Prefixes <- function(){ 2 | prefixes = "PREFIX skos: 3 | PREFIX rdf: " 4 | return(prefixes) 5 | } 6 | 7 | append_Prefixes <- function(queryString){ 8 | return(paste(get_Prefixes(), queryString, '\n')) 9 | } 10 | 11 | clean_URLs <- function(urls){ 12 | urls = gsub("http://isdata.org/Classifications/", "", urls) 13 | urls = gsub("<|>", "", urls) 14 | return(urls) 15 | } 16 | 17 | expand_URL <- function(url){ 18 | baseURL = "http://isdata.org/Classifications/" 19 | if (!grepl(baseURL, url)){ 20 | url = paste0(baseURL, url) 21 | } 22 | return(url) 23 | } 24 | 25 | get_Number_of_Links_Between_Schemes <- function(endpoint){ 26 | queryString = append_Prefixes("select (count(*) as ?linkCount) ?scheme1 ?relation ?scheme2 where { 27 | ?concept1 rdf:type skos:Concept . 28 | ?concept1 skos:inScheme ?scheme1 . 29 | ?concept2 rdf:type skos:Concept . 30 | ?concept2 skos:inScheme ?scheme2 . 31 | filter(?scheme1 != ?scheme2) . 32 | ?concept1 ?relation ?concept2 . 33 | FILTER(?relation = skos:relatedMatch || ?relation = skos:exactMatch || ?relation = skos:broadMatch || ?relation = skos:narrowMatch) . 34 | } group by ?scheme1 ?relation ?scheme2") 35 | queryResults = SPARQL(url=endpoint, query=queryString) 36 | df = queryResults$results 37 | return(df) 38 | } 39 | 40 | get_Concept_Count <- function(endpoint){ 41 | queryString = append_Prefixes("select (count(*) as ?conceptCount) where { ?concept rdf:type skos:Concept }") 42 | queryResults = SPARQL(url=endpoint, query=queryString) 43 | results = queryResults$results 44 | return(as.numeric(results$conceptCount)) 45 | } 46 | 47 | get_Schemes <- function(endpoint){ 48 | queryString = append_Prefixes("select distinct ?scheme where { ?concept skos:inScheme ?scheme }") 49 | queryResults = SPARQL(url=endpoint, query=queryString) 50 | results = as.character(queryResults$results) 51 | return(sort(clean_URLs(results))) 52 | } 53 | 54 | 55 | get_Broader_Concepts_In_Scheme <- function(ontStore, scheme){ 56 | scheme = expand_URL(scheme) 57 | queryString = paste0("select ?concept ?broaderConcept where { 58 | ?concept skos:inScheme <",scheme,"> . 59 | ?concept skos:broader ?broaderConcept . 60 | }") 61 | queryResults = SPARQL(url=endpoint, query=queryString, format='csv', extra=list(format='text/csv', Accept='text/csv')) 62 | results = queryResults$results 63 | results$concept = clean_URLs(results$concept) 64 | results$broaderConcept = clean_URLs(results$broaderConcept) 65 | return(results) 66 | } 67 | 68 | get_Narrower_Concepts_In_Scheme <- function(ontStore, scheme){ 69 | scheme = expand_URL(scheme) 70 | queryString = paste0("select ?concept ?narrowerConcept where { 71 | ?concept skos:inScheme <",scheme,"> . 72 | ?concept skos:narrower ?narrowerConcept . 73 | }") 74 | queryResults = SPARQL(url=endpoint, query=queryString, format='csv', extra=list(format='text/csv', Accept='text/csv')) 75 | results = queryResults$results 76 | results$concept = clean_URLs(results$concept) 77 | results$narrowerConcept = clean_URLs(results$narrowerConcept) 78 | return(results) 79 | } 80 | 81 | get_All_Concepts_In_Scheme <- function(ontStore, scheme){ 82 | scheme = expand_URL(scheme) 83 | queryString = paste0("select ?concept where { 84 | ?concept skos:inScheme <",scheme,"> . 85 | }") 86 | 87 | queryResults = SPARQL(url=endpoint, query=queryString, format='csv', extra=list(format='text/csv', Accept='text/csv')) 88 | results = queryResults$results 89 | results$concept = clean_URLs(results$concept) 90 | return(sort(results$concept)) 91 | } 92 | 93 | download_All_Data <- function(endpoint){ 94 | queryString = "select * where { 95 | ?concept rdf:type skos:Concept . 96 | ?concept skos:inScheme ?scheme . 97 | ?concept skos:notation ?notation . 98 | ?concept skos:prefLabel ?prefLabel . 99 | ?concept skos:description ?description . 100 | OPTIONAL{?concept skos:example ?example }. 101 | OPTIONAL{?concept skos:scopeNote ?scopeNote }. 102 | }" 103 | queryResults = SPARQL(url=endpoint, query=queryString, format='csv', extra=list(format='text/csv', Accept='text/csv')) 104 | df = queryResults$results 105 | return(df) 106 | } 107 | -------------------------------------------------------------------------------- /CodeLinkR/R/utils.R: -------------------------------------------------------------------------------- 1 | add_skos_inScheme <- function(ontStore, subject, object){ 2 | add.triple(ontStore, 3 | subject = subject, 4 | predicate = "http://www.w3.org/2004/02/skos/core#inScheme", 5 | object = object) 6 | } 7 | 8 | add_skos_narrower <- function(ontStore, subject, object){ 9 | add.triple(ontStore, 10 | subject=subject, 11 | predicate = "http://www.w3.org/2004/02/skos/core#narrower", 12 | object = object) 13 | } 14 | 15 | add_skos_broader <- function(ontStore, subject, object){ 16 | add.triple(ontStore, 17 | subject=subject, 18 | predicate = "http://www.w3.org/2004/02/skos/core#broader", 19 | object = object) 20 | } 21 | 22 | add_skos_example <- function(ontStore, subject, exampleText){ 23 | add.data.triple(ontStore, 24 | subject=subject, 25 | predicate = "http://www.w3.org/2004/02/skos/core#example", 26 | data = exampleText) 27 | } 28 | 29 | 30 | add_skos_concept_scheme <- function(ontStore, schemeID){ 31 | add.triple(ontStore, 32 | subject = schemeID, 33 | predicate = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", 34 | object = "http://www.w3.org/2004/02/skos/core#ConceptScheme") 35 | } 36 | 37 | # this takes care of writing to both RDF and to neo4j 38 | add_skos_concept_node <- function(ontStore, conceptId, 39 | notation="", description="", prefLabel="", altLabel="", example="", scopeNote=""){ 40 | add.triple(ontStore, 41 | subject=conceptId, 42 | predicate = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", 43 | object = "http://www.w3.org/2004/02/skos/core#Concept") 44 | 45 | if (notation != ""){ 46 | add.data.triple(ontStore, 47 | subject=conceptId, 48 | predicate = "http://www.w3.org/2004/02/skos/core#notation", 49 | data = notation) 50 | } 51 | 52 | if (prefLabel != ""){ 53 | add.data.triple(ontStore, 54 | subject=conceptId, 55 | predicate = "http://www.w3.org/2004/02/skos/core#prefLabel", 56 | data = prefLabel) 57 | } 58 | 59 | if (description != ""){ 60 | add.data.triple(ontStore, 61 | subject=conceptId, 62 | predicate = "http://www.w3.org/2004/02/skos/core#description", 63 | data = description) 64 | } 65 | 66 | if (altLabel != ""){ 67 | add.data.triple(ontStore, 68 | subject=conceptId, 69 | predicate = "http://www.w3.org/2004/02/skos/core#altLabel", 70 | data = altLabel) 71 | } 72 | 73 | if (example != "" & example != " "){ 74 | add.data.triple(ontStore, 75 | subject=conceptId, 76 | predicate = "http://www.w3.org/2004/02/skos/core#example", 77 | data = example) 78 | } 79 | 80 | if (scopeNote != ""){ 81 | add.data.triple(ontStore, 82 | subject=conceptId, 83 | predicate = "http://www.w3.org/2004/02/skos/core#scopeNote", 84 | data = scopeNote) 85 | } 86 | } 87 | 88 | trim <- function(text){ 89 | nonBreakingWhiteSpace <- '\xc2\xa0' 90 | text = gsub("[ |\n]*$", "", text) 91 | text = gsub("^ +| +$", "", text) 92 | text = gsub(nonBreakingWhiteSpace, '_', text) 93 | return(text) 94 | } 95 | 96 | determine_skos_linking_predicate <- function(codes1, codes2, index){ 97 | numCode1 = length(which(codes1 == codes1[index])) 98 | numCode2 = length(which(codes2 == codes2[index])) 99 | 100 | # default predicate for when we don't know what we're looking at 101 | linkingPredicate_code1_code2 = "http://www.w3.org/2004/02/skos/core#relatedMatch" 102 | linkingPredicate_code2_code1 = "http://www.w3.org/2004/02/skos/core#relatedMatch" 103 | 104 | if (numCode1 == numCode2){ # 1:1 mapping 105 | linkingPredicate_code1_code2 = "http://www.w3.org/2004/02/skos/core#exactMatch" 106 | linkingPredicate_code2_code1 = "http://www.w3.org/2004/02/skos/core#exactMatch" 107 | } else if (numCode1 == 1 & numCode2 > 1){ # 2nd code must point to multiple codes in codes1 108 | linkingPredicate_code1_code2 = "http://www.w3.org/2004/02/skos/core#broadMatch" 109 | linkingPredicate_code2_code1 = "http://www.w3.org/2004/02/skos/core#narrowMatch" 110 | } else if (numCode1 > 1 & numCode2 == 1){ # 1st code must point to multiple codes in codes2 111 | linkingPredicate_code1_code2 = "http://www.w3.org/2004/02/skos/core#narrowMatch" 112 | linkingPredicate_code2_code1 = "http://www.w3.org/2004/02/skos/core#broadMatch" 113 | } # otherwise there's some sort of overlap between the codes - many to many mapping 114 | 115 | return(c(linkingPredicate_code1_code2, linkingPredicate_code2_code1)) 116 | } 117 | 118 | write_Code1_to_Code2_to_RDF <- function(ws, versionsAbbrev, classification1, classification2, turtlePath){ 119 | baseURL1 = paste0("http://isdata.org/Classifications/",classification1, "/") 120 | baseURL2 = paste0("http://isdata.org/Classifications/",classification2, "/") 121 | 122 | ontStore = initialize_New_OntStore() 123 | 124 | for (i in c(1:nrow(ws))){ 125 | if (ws$Code1[i] != 0){ 126 | url1 = trim(paste0(baseURL1, ws$Code1[i])) 127 | url2 = trim(paste0(baseURL2, ws$Code2[i])) 128 | 129 | linkingPredicates = determine_skos_linking_predicate(ws$Code1, ws$Code2, i) 130 | 131 | add.triple(ontStore, 132 | subject=url1, 133 | predicate = linkingPredicates[1], 134 | object = url2) 135 | 136 | add.triple(ontStore, 137 | subject=url2, 138 | predicate = linkingPredicates[2], 139 | object = url1) 140 | } 141 | } 142 | save.rdf(ontStore, paste0(turtlePath, "/", versionsAbbrev, ".turtle"), format="TURTLE") 143 | } 144 | -------------------------------------------------------------------------------- /CodeLinkR/R/visualize_Classification_Linkages.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Visualizing Classification Linkages" 3 | author: "Chris Davis" 4 | date: "June 9, 2017" 5 | output: html_document 6 | --- 7 | 8 | 9 | ```{r, message=FALSE} 10 | options(stringsAsFactors = FALSE) 11 | library(yaml) 12 | library(ggplot2) 13 | library(SPARQL) 14 | 15 | # change where the images are saved 16 | knitr::opts_chunk$set( 17 | fig.path = "../../images/" 18 | ) 19 | 20 | orderNames <- function(names, rev=TRUE){ 21 | if (rev == TRUE){ 22 | return(factor(names, levels = rev(sort(unique(names))))) 23 | } else { 24 | return(factor(names, levels = sort(unique(names)))) 25 | } 26 | } 27 | 28 | 29 | # from metadata files, visualize the links between classifications (concordances, re-use in datasets, etc) 30 | 31 | classificationMetaData = yaml.load_file("../inst/classifications.yaml") 32 | concordanceMetaData = yaml.load_file("../inst/concordances.yaml") 33 | 34 | classificationTypes = c() 35 | for (classification in classificationMetaData$classifications){ 36 | classificationTypes = rbind(classificationTypes, c(classification$name, classification$type)) 37 | } 38 | classificationTypes = as.data.frame(classificationTypes) 39 | colnames(classificationTypes) = c("Classification", "Type") 40 | 41 | edgeList = c() 42 | 43 | for (concordances in concordanceMetaData$concordances){ 44 | for (version in concordances$versions){ 45 | c1 = version$classification1 46 | c2 = version$classification2 47 | edgeList = rbind(edgeList, c(c1, c2)) 48 | edgeList = rbind(edgeList, c(c2, c1)) 49 | } 50 | } 51 | 52 | edgeList = as.data.frame(edgeList) 53 | colnames(edgeList) = c("from", "to") 54 | 55 | edgeList$fromMainCode = gsub("/.*", "", edgeList$from) 56 | edgeList$toMainCode = gsub("/.*", "", edgeList$to) 57 | edgeList = merge(edgeList, classificationTypes, by.x="fromMainCode", by.y="Classification") 58 | edgeList = merge(edgeList, classificationTypes, by.x="toMainCode", by.y="Classification") 59 | edgeList$LinkType = paste(edgeList$Type.x, edgeList$Type.y, sep=" - ") 60 | edgeList$Type.x = NULL 61 | edgeList$Type.y = NULL 62 | 63 | edgeList$from = orderNames(edgeList$from, rev=TRUE) 64 | edgeList$to = orderNames(edgeList$to, rev=FALSE) 65 | edgeList$fromMainCode = orderNames(edgeList$fromMainCode, rev=TRUE) 66 | edgeList$toMainCode = orderNames(edgeList$toMainCode, rev=FALSE) 67 | 68 | # remove versions, leave only main classification 69 | simplifiedEdgeList = edgeList 70 | simplifiedEdgeList$from = NULL 71 | simplifiedEdgeList$to = NULL 72 | simplifiedEdgeList = simplifiedEdgeList[!duplicated(simplifiedEdgeList),] 73 | ``` 74 | 75 | ```{r AdjMatrixSimplified, fig.width=6, fig.height=4} 76 | p1 = ggplot(simplifiedEdgeList, aes(x=toMainCode, y=fromMainCode, fill=LinkType)) + 77 | geom_tile(colour = "black", size=0.5) + 78 | xlab("") + ylab("") + 79 | ggtitle("Links Between Classification Codes") + scale_x_discrete(position="left") 80 | print(p1) 81 | ``` 82 | 83 | ```{r AdjMatrix, fig.width=10, fig.height=7} 84 | p2 = ggplot(edgeList, aes(x=to, y=from, fill=LinkType)) + 85 | geom_tile(colour="black", size=0.5) + 86 | xlab("") + ylab("") + 87 | ggtitle("Links Between Classification Codes") + scale_x_discrete(position="left") 88 | print(p2) 89 | ``` 90 | 91 | -------------------------------------------------------------------------------- /CodeLinkR/R/zzz.R: -------------------------------------------------------------------------------- 1 | .onLoad <- function(libname, pkgname) { 2 | #never ever ever ever ever convert strings to factors 3 | options(stringsAsFactors = FALSE) 4 | options(java.parameters = "-Xmx4g") 5 | } 6 | 7 | -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/CN2015.turtle.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/CodeLinkR/data/Turtle/CN2015.turtle.tar.gz -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/CN2016.turtle.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/CodeLinkR/data/Turtle/CN2016.turtle.tar.gz -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/CN2016_to_CPA2008.turtle.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/CodeLinkR/data/Turtle/CN2016_to_CPA2008.turtle.tar.gz -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/CN2016_to_SITC4.turtle.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/CodeLinkR/data/Turtle/CN2016_to_SITC4.turtle.tar.gz -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/CPA2.1.turtle.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/CodeLinkR/data/Turtle/CPA2.1.turtle.tar.gz -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/CPA2008.turtle.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/CodeLinkR/data/Turtle/CPA2008.turtle.tar.gz -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/CPC2.1.turtle.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/CodeLinkR/data/Turtle/CPC2.1.turtle.tar.gz -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/EWC2002.turtle.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/CodeLinkR/data/Turtle/EWC2002.turtle.tar.gz -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/HS2012.turtle.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/CodeLinkR/data/Turtle/HS2012.turtle.tar.gz -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/HS2012_to_ISIC3.turtle.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/CodeLinkR/data/Turtle/HS2012_to_ISIC3.turtle.tar.gz -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/HS2012_to_SITC3.turtle.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/CodeLinkR/data/Turtle/HS2012_to_SITC3.turtle.tar.gz -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/HS2012_to_SITC4.turtle.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/CodeLinkR/data/Turtle/HS2012_to_SITC4.turtle.tar.gz -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/ISIC3.1.turtle.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/CodeLinkR/data/Turtle/ISIC3.1.turtle.tar.gz -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/ISIC3.1_to_ISIC3.turtle.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/CodeLinkR/data/Turtle/ISIC3.1_to_ISIC3.turtle.tar.gz -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/ISIC3.1_to_ISIC4.turtle.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/CodeLinkR/data/Turtle/ISIC3.1_to_ISIC4.turtle.tar.gz -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/ISIC3.turtle.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/CodeLinkR/data/Turtle/ISIC3.turtle.tar.gz -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/ISIC4.turtle.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/CodeLinkR/data/Turtle/ISIC4.turtle.tar.gz -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/ISIC4_to_CPC2.1.turtle.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/CodeLinkR/data/Turtle/ISIC4_to_CPC2.1.turtle.tar.gz -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/NACE2.turtle.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/CodeLinkR/data/Turtle/NACE2.turtle.tar.gz -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/NACE2_to_ISIC4.turtle.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/CodeLinkR/data/Turtle/NACE2_to_ISIC4.turtle.tar.gz -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/NACE2_to_NAICS2012.turtle.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/CodeLinkR/data/Turtle/NACE2_to_NAICS2012.turtle.tar.gz -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/NAICS2012.turtle.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/CodeLinkR/data/Turtle/NAICS2012.turtle.tar.gz -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/NAICS2012_to_ISIC4.turtle.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/CodeLinkR/data/Turtle/NAICS2012_to_ISIC4.turtle.tar.gz -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/NHM2015.turtle.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/CodeLinkR/data/Turtle/NHM2015.turtle.tar.gz -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/PRODCOM2014.turtle.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/CodeLinkR/data/Turtle/PRODCOM2014.turtle.tar.gz -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/PRODCOM2015.turtle.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/CodeLinkR/data/Turtle/PRODCOM2015.turtle.tar.gz -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/SITC3.turtle.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/CodeLinkR/data/Turtle/SITC3.turtle.tar.gz -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/SITC4.turtle.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/CodeLinkR/data/Turtle/SITC4.turtle.tar.gz -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/loadAll.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | files=`ls *.turtle` 4 | for file in $files 5 | do 6 | curl -X POST -H 'Content-Type:application/x-turtle' --data-binary "@$file" http://localhost:9999/blazegraph/sparql 7 | done 8 | -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/loadAllTriples.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | files=`ls *.turtle` 4 | for file in $files 5 | do 6 | curl -X POST -H 'Content-Type:application/x-turtle' --data-binary @$file http://localhost:9999/blazegraph/sparql 7 | done 8 | -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/unzipTheTurtles.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | files=`ls *.turtle.tar.gz` 4 | for file in $files 5 | do 6 | tar -xzvf $file 7 | done 8 | 9 | -------------------------------------------------------------------------------- /CodeLinkR/data/Turtle/zipTheTurtles.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | files=`ls *.turtle` 4 | for file in $files 5 | do 6 | # only create zip if it doesn't exist 7 | if [ ! -f $file.tar.gz ]; then 8 | tar -czvf $file.tar.gz $file 9 | fi 10 | done 11 | -------------------------------------------------------------------------------- /CodeLinkR/inst/classifications.yaml: -------------------------------------------------------------------------------- 1 | classifications: 2 | - name: CN 3 | type: Product 4 | versions: 5 | - url: http://ec.europa.eu/eurostat/ramon/documents/cn_2015/CNSE_2015_DE_EN_FR.zip 6 | dataFile: CN_2015_SELF-EXPL_DE_EN_FR.xls 7 | version: '2015' 8 | colnames: 'Sorting_Key,CN_Code,EN,DE,FR' 9 | - url: http://ec.europa.eu/eurostat/ramon/documents/cn_2016/CN_2016_SELF-EXPL_DE_EN_FR.zip 10 | dataFile: CN_2016_self-explanatory_texts_DE-EN-FR_Excel.xls 11 | version: '2016' 12 | colnames: 'Sorting_Key,CN_Code,EN,DE,FR,Update' 13 | - name: CPA 14 | type: Product 15 | versions: 16 | - url: http://ec.europa.eu/eurostat/ramon/nomenclatures/index.cfm?TargetUrl=ACT_OTH_CLS_DLD&StrNom=CPA_2_1&StrFormat=CSV&StrLanguageCode=EN&IntKey=&IntLevel=&bExport= 17 | dataFile: CPA_2_1.csv 18 | version: '2.1' 19 | colnames: 'Order,Level,Code,Parent,Description,This_item_includes,This_item_also_includes,Rulings,This_item_excludes' 20 | - url: http://ec.europa.eu/eurostat/ramon/nomenclatures/index.cfm?TargetUrl=ACT_OTH_CLS_DLD&StrNom=CPA_2008&StrFormat=CSV&StrLanguageCode=EN&IntKey=&IntLevel=&bExport= 21 | dataFile: CPA_2008.csv 22 | version: '2008' 23 | colnames: 'Order,Level,Code,Parent,Description,Rulings,This_item_includes,This_item_also_includes,This_item_excludes' 24 | - name: CPC 25 | type: Product 26 | versions: 27 | - url: http://unstats.un.org/unsd/cr/downloads/CPCv21_english.zip 28 | dataFile: CPC_Ver.2.1_english_structure.txt 29 | version: '2.1' 30 | colnames: 'Code,Description' 31 | - name: HS 32 | type: Product 33 | versions: 34 | - url: http://ec.europa.eu/eurostat/ramon/documents/hs_2012/HS_2012.zip 35 | dataFile: 'HS 2012 - SELF-EXPLANATORY TEXTS DE EN FR.xls' 36 | version: '2012' 37 | colnames: 'CNKEY,HS_CODE,SE_DESC_EN,SE_DESC_DE,SE_DESC_FR' 38 | - name: ISIC 39 | type: Industry 40 | versions: 41 | - url: http://unstats.un.org/unsd/cr/downloads/ISIC_Rev_4_english.zip 42 | dataFile: ISIC_Rev_4_english_structure.txt 43 | version: '4' 44 | colnames: 'Code,Description' 45 | - url: http://unstats.un.org/unsd/cr/downloads/ISIC_Rev_3_1_english.zip 46 | dataFile: ISIC_Rev_3_1_english_structure.txt 47 | version: '3.1' 48 | colnames: 'Code,Description' 49 | - url: http://unstats.un.org/unsd/cr/downloads/ISIC_Rev_3_english.zip 50 | dataFile: ISIC_Rev_3_english_structure.txt 51 | version: '3' 52 | colnames: 'Code,Description' 53 | - name: NACE 54 | type: Industry 55 | versions: 56 | - url: http://ec.europa.eu/eurostat/ramon/nomenclatures/index.cfm?TargetUrl=ACT_OTH_CLS_DLD&StrNom=NACE_REV2&StrFormat=CSV&StrLanguageCode=EN&IntKey=&IntLevel=&bExport= 57 | dataFile: NACE_REV2.csv 58 | version: '2' 59 | colnames: 'Order,Level,Code,Parent,Description,Reference_to_ISIC_Rev_4,This_item_includes,This_item_also_includes,Rulings,This_item_excludes' 60 | - name: NAICS 61 | type: Industry 62 | versions: 63 | - url: http://www.census.gov/eos/www/naics/2012NAICS/2-digit_2012_Codes.xls 64 | dataFile: 2-digit_2012_Codes.xls 65 | version: '2012' 66 | colnames: 'Sequence_Number,Code,Title' 67 | - name: NHM 68 | type: Product 69 | versions: 70 | - url: http://ec.europa.eu/eurostat/ramon/other_documents/nhm/NHM_2015_25-3-2015.zip 71 | dataFile: NHM_EN_v1_1.xlsx 72 | version: '2015' 73 | colnames: 'Code,Description,Reference,Reference_text' 74 | - name: PRODCOM 75 | type: Product 76 | versions: 77 | - url: http://ec.europa.eu/eurostat/ramon/documents/prodcom_2015/PRODCOM_List_2015.zip 78 | dataFile: PRODCOM_List_2015.xls 79 | version: '2015' 80 | colnames: 'Sorting_code,CODE,LEVEL,HS_CN,UNIT,PRODTYPE,bg,cs,da,de,el,en,es,et,fi,fr,hr,hu,it,lt,lv,mt,nl,pl,pt,ro,sk,sl,sv' 81 | - url: http://ec.europa.eu/eurostat/ramon/documents/prodcom_2014/PRODCOM_List_2014.zip 82 | dataFile: BG_CS_DA_DE_EL_EN_ES_ET.xls 83 | version: '2014' 84 | colnames: 'ID,CODE,LEVEL,HS_CN,UNIT,PRODTYPE,NACE,CPA,bg,cs,da,de,el,en,es,et' 85 | - name: SITC 86 | type: Product 87 | versions: 88 | - url: http://unstats.un.org/unsd/cr/downloads/SITC4_english.zip 89 | dataFile: SITC4_english_structure.txt 90 | version: '4' 91 | colnames: 'Code,Description' 92 | - url: http://unstats.un.org/unsd/cr/downloads/SITC_Rev_3_english.zip 93 | dataFile: SITC_Rev_3_english_structure.txt 94 | version: '3' 95 | colnames: 'Code,Description' 96 | - name: EWC 97 | type: Waste 98 | versions: 99 | - dataFile: ./inst/classifications/EWC/LoW_Waste_Thesaurus.txt 100 | version: '2002' 101 | colnames: 'Waste,Codes' 102 | - dataFile: ./inst/classifications/EWC/LoW_Classification.txt 103 | version: '2002' 104 | colnames: 'Code,Description,Examples' 105 | -------------------------------------------------------------------------------- /CodeLinkR/inst/classifications/EWC/LoW_Waste_Thesaurus.txt: -------------------------------------------------------------------------------- 1 | Abaca tow, noils and yarn waste 04 02 21, 04 02 22, 20 01 11 2 | Absorbents (n/o/s) and oil 15 02 02* 3 | Absorbents – oil/fuel (contaminated) 15 02 02* 4 | Absorbents n/o/s – halogenated 15 02 02*, 15 02 03 5 | Absorbents n/o/s - non-halogenated 15 02 02*, 15 02 03 6 | Acetic acid 07 01 01*, 11 01 05*, 11 01 06*, 20 01 14* 7 | Acid 01 03 04*, 05 01 04*, 05 01 07*, 05 01 12*, 05 06 01*, 06 01 01*, 06 01 02*, 06 01 03*, 06 01 04*, 06 01 05*, 06 01 06*, 06 07 04*, 10 01 09*, 11 01 05*, 11 01 06*, 16 08 05*, 20 01 14* 8 | Acid – acetic 07 01 01*, 11 01 05*, 11 01 06*, 20 01 14* 9 | Acid tars 05 01 07*, 05 06 01* 10 | Acid tars – organic 05 01 07*, 05 06 01*, 17 03 01*, 17 03 03* 11 | Acid tars n/o/s 05 01 07*, 05 06 01*, 17 03 01*, 17 03 03* 12 | Acids 01 03 04*, 05 01 04*, 05 01 07*, 05 01 12*, 05 06 01*, 06 01 01*, 06 01 02*, 06 01 03*, 06 01 04*, 06 01 05*, 06 01 06*, 06 07 04*, 10 01 09*, 11 01 05*, 11 01 06*, 16 08 05*, 20 01 14* 13 | Acrylamide 16 03 05*, 16 03 06 14 | Acrylate copolymers 07 02 13, 16 03 05*, 16 03 06 15 | Acrylate monomers 16 03 05*, 16 03 06 16 | Acrylic fibre 04 02 21, 04 02 22, 20 01 11 17 | Acrylonitrile copolymer 07 02 13 18 | Activated alumina 10 03 05 19 | Activated carbon 06 07 02*, 06 13 02*, 19 01 10*, 19 09 04 20 | Activated carbon – contaminated 06 07 02*, 06 13 02*, 19 01 10* 21 | Adhesives - non-halogenated 08 04 09*, 08 04 10 22 | Adhesives - solvent based 08 04 09*, 08 04 11*, 08 04 13*, 08 04 15*, 20 01 27* 23 | Adhesives - water-based 08 04 10, 20 01 28 24 | Aerosol containers – empty 15 01 04, 15 01 10* 25 | Aggregate – contaminated 17 01 06* 26 | Aggregates 01 04 08, 17 01 07 27 | Agricultural film 15 01 02 28 | Agricultural machinery 16 01 04*, 16 01 06, 16 02 13*, 16 02 14, 16 02 15*, 16 02 16 29 | Air bags - undischarged 16 01 10* 30 | Air bags – discharged 16 01 22 31 | Air fresheners (aerosol) - full 16 05 04*, 16 05 05 32 | Alcoholic drinks 02 07 04, 20 01 08 33 | Alcohols 07 07 04*, 16 05 06*, 20 01 08 34 | Aldehydes 07 01 01*, 07 01 08*, 16 03 05*, 16 03 06, 16 05 06* 35 | Aliphatic hydrocarbons 13 07 02*, 16 05 06* 36 | Alkalies 05 01 11*, 06 02 01*, 06 02 03*, 06 02 04*, 06 02 05*, 11 01 07*, 19 11 04*, 20 01 15* 37 | Alumina 10 03 05 38 | Aluminium 02 01 10, 12 01 03, 12 01 04, 15 01 04, 16 01 18, 17 04 02, 19 12 03, 20 01 40 39 | Aluminium cans 15 01 04 40 | Aluminium dross (thermal metallurgy) 10 03 04*, 10 03 05, 10 03 09*, 10 03 16 41 | Aluminium foil 15 01 04, 19 12 03, 20 01 40 42 | Aluminium skimmings 10 03 15*, 10 03 16 43 | Aluminium slags 10 03 04* 44 | Amalgam - dental 18 01 10* 45 | Amides 16 03 05*, 16 03 06 46 | Amines 16 03 05*, 16 03 06 47 | Amino resins 08 04 09*, 08 04 10 48 | Ammonia 16 03 05*, 16 03 06 49 | Animal bedding - soiled 02 01 06, 18 02 02*, 18 02 03 50 | Animal blood 02 01 02, 02 02 02 51 | Animal carcasses 02 01 02, 02 02 02, 18 02 02*, 18 02 03 52 | Animal faeces 02 01 06, 18 02 02*, 18 02 03, 20 02 01 53 | Animal fat 02 02 03, 20 01 25, 20 01 26* 54 | Animal grease 04 02 10, 19 08 09*, 19 08 10* 55 | Animal hair 04 01 01, 04 01 09, 04 02 21 56 | Animal hides 02 01 02, 02 02 02, 04 01 01 57 | Animal tissue - infectious 18 02 02* 58 | Animal tissue - non-infectious 02 01 02, 02 02 02, 18 02 03 59 | Anode scraps 10 03 02, 10 03 17*, 10 03 18, 10 08 12*, 10 08 13, 10 08 14, 11 02 03 60 | Anthracite filters 19 09 04 61 | Antifreeze 16 01 14*, 16 01 15 62 | Antimony compounds 06 03 13*, 06 03 15*, 06 04 05*, 10 11 11* 63 | APC residues - MSW combustion 19 01 07* 64 | Appliances - domestic 16 02 10*, 16 02 11*, 16 02 12*, 16 02 13*, 16 02 14 65 | Appliances - domestic 16 02 11*, 16 02 12*, 16 02 13*, 16 02 14 66 | Aromatic hydrocarbons 13 07 01*, 13 07 02*, 13 07 03*, 16 03 06 67 | Arsenic - elemental 01 01 01 68 | Arsenic compounds 06 03 13*, 06 03 15*, 06 04 03*, 06 04 05*, 10 04 03*, 10 11 11* 69 | Asbestos 06 07 01*, 06 13 04*, 10 13 09*, 10 13 10, 15 01 11*, 16 02 12*, 17 06 01*, 17 06 05* 70 | Asbestos - bonded 17 06 05* 71 | Asbestos - bonded 10 13 09*, 17 06 05* 72 | Asbestos - fibrous 06 13 04*, 16 02 12*, 17 06 01* 73 | Asbestos - insulation products 17 06 01* 74 | Asbestos lined brake shoes 16 01 11* 75 | Asbestos sheets - corrugated 10 13 09*, 17 06 05* 76 | Asbestos vehicle brake shoes 16 01 11* 77 | Ash – bottom 10 01 01, 10 01 14*, 10 01 15, 19 01 12 78 | Ash – fly 10 01 02, 10 01 03, 10 01 04*, 10 01 13*, 10 01 16*, 10 01 17, 19 01 13*, 19 01 14, 19 04 02* 79 | Ash – pulverised fuel (PFA) 10 01 01, 10 01 14*, 10 01 15, 19 01 12 80 | Asphalt (containing tar) 17 03 01*, 17 03 02, 17 03 03* 81 | Autoclaved clinical waste 18 01 04, 18 02 03 82 | Bags – plastic 15 01 02, 20 01 39 83 | Bags – stoma (used) 18 01 03*, 18 01 04 84 | Bakery waste 02 06 01 85 | Baled plastic waste 02 01 04, 07 02 13, 15 01 02, 17 02 03, 19 12 04, 20 01 39 86 | Ball mill dust 10 03 21*, 10 03 22 87 | Bark 03 01 01, 03 03 01, 20 02 01 88 | Barriers (metal) - safety 17 04 07, 19 12 02 89 | Bases 05 01 11*, 06 02 01*, 06 02 03*, 06 02 04*, 06 02 05*, 11 01 07*, 19 11 04*, 20 01 15* 90 | Batteries - alkaline 16 06 04, 20 01 34 91 | Batteries - car 16 06 01* 92 | Batteries - lead acid (drained) 16 06 01*, 20 01 33* 93 | Batteries - lead acid (undrained) 16 06 01*, 20 01 33* 94 | Batteries - lithium 16 06 04, 20 01 34 95 | Batteries - mercury 16 06 03*, 20 01 33* 96 | Batteries - metal hydrides 16 06 04, 20 01 34 97 | Batteries - mixed 16 06 02*, 16 06 03*, 16 06 04, 20 01 33*, 20 01 34 98 | Batteries - nickel cadmium 16 06 02*, 20 01 33* 99 | Battery - Electrolyte 16 06 06* 100 | Beer 02 07 04, 20 01 08 101 | Benzene 16 03 05*, 16 03 06 102 | Benzoic acid 20 01 14* 103 | Benzyl chlorides 16 03 05*, 16 05 06* 104 | Bicycles 16 01 06 105 | Binders - Foundary 10 09 13*, 10 09 14, 10 10 13*, 10 10 14 106 | Biocide production waste 07 04 01*, 07 04 03*, 07 04 04*, 07 04 07*, 07 04 08*, 07 04 09*, 07 04 10*, 07 04 11*, 07 04 12, 07 04 13* 107 | Biocides 02 01 08*, 03 02 01*, 03 02 02*, 06 13 01*, 20 01 19* 108 | Biscuits 02 06 01, 20 01 08 109 | Bismuth 06 04 05*, 19 12 11* 110 | Bismuth compounds 06 03 13*, 06 03 15*, 06 04 05* 111 | Bismuth waste and scrap 06 04 05*, 19 12 11* 112 | Bitumen 05 01 17, 17 03 01*, 17 03 02, 17 03 03* 113 | Blast furnace slag 10 02 01, 10 02 02, 10 09 03, 10 10 03 114 | Blasting grit 12 01 16*, 12 01 17 115 | Blood – animal 02 01 02, 02 02 02 116 | Blood – Human 18 01 02 117 | Boats 16 01 04*, 16 01 06 118 | Bobbins - paper 20 01 01 119 | Bobbins - plastic 20 01 39 120 | Boiler cleaning sludge 10 01 22*, 10 01 23 121 | Boric acid 11 01 06*, 20 01 14* 122 | Bottles - glass 10 11 12, 15 01 07, 20 01 02 123 | Bottles - plastic 15 01 02, 20 01 39 124 | Brake fluid 16 01 13* 125 | Brake fluids 16 01 13* 126 | Brake linings (containing asbestos) 16 01 11* 127 | Brake linings (not containing asbestos) 16 01 12 128 | Brakes – car 16 01 11*, 16 01 12 129 | Brass – scrap 02 01 10, 16 01 18, 17 04 01, 19 12 03, 20 01 40 130 | Bread 02 06 01 131 | Brewing waste 02 07 01, 02 07 02, 02 07 03, 02 07 04, 02 07 05 132 | Bricks 10 12 08, 17 01 02, 17 01 06*, 17 01 07 133 | Brine 01 01 02, 01 04 11 134 | Bromine 16 05 06*, 16 05 08* 135 | Bronze - scrap 02 01 10, 12 01 03, 12 01 04, 17 04 01, 19 12 03, 20 01 40 136 | Building rubble 17 01 01, 17 01 02, 17 01 03, 17 01 06*, 17 01 07, 17 05 03*, 17 05 04, 17 09 01*, 17 09 02*, 17 09 03*, 17 09 04 137 | Bulbs – Non Fluorescent 16 02 14, 20 01 36 138 | Bulbs – non fluorescent 16 02 14, 20 01 36 139 | Bulky household waste 20 03 07 140 | Cable stripping waste 17 04 10*, 17 04 11, 19 10 01, 19 10 02, 19 12 04 141 | Cadmium compounds 06 03 13*, 06 03 15*, 06 04 05* 142 | Cadmium waste and scrap 19 12 03, 20 01 40 143 | Calcium based reaction residue 06 09 03*, 06 09 04, 06 11 01, 10 01 05, 10 01 07 144 | Calcium carbonate 01 01 02, 01 04 08, 02 04 02 145 | Calcium sulphate 06 03 14, 17 08 01*, 17 08 02 146 | Cameras - single use 09 01 10, 09 01 11*, 09 01 12 147 | Cans – aluminium 15 01 04 148 | Cans – metal 15 01 04 149 | Canteen waste 20 01 08 150 | Capacitors (with PCBs or PCTs) 16 02 09*, 17 09 02* 151 | Capacitors (without PCBs or PCTs) 16 02 13*, 16 02 14, 16 02 15*, 16 02 16 152 | Car – Dashboards and other plastic fittings 16 01 19 153 | Car batteries 16 06 01* 154 | Car bodies 16 01 06 155 | Car brakes 16 01 11*, 16 01 12 156 | Car exhausts 16 01 21*, 16 01 22 157 | Carbon 06 07 02*, 06 13 02*, 06 13 03, 10 03 18, 10 08 13, 16 11 01*, 16 11 02, 19 09 04 158 | Carbon (activated) - contaminated 06 07 02*, 06 13 02*, 19 01 10*, 19 09 04 159 | Carbon - activated 06 07 02*, 06 13 02*, 19 01 10*, 19 09 04 160 | Carbon black 06 13 03 161 | Carbon fibre 04 02 21, 04 02 22 162 | Carbon teterachloride 07 01 03*, 07 02 03*, 07 03 03*, 07 05 03*, 07 06 03*, 07 07 03* 163 | Carcasses 02 01 02, 02 02 02, 18 02 02*, 18 02 03 164 | Cardboard 03 03 07, 03 03 08, 15 01 01, 19 12 01, 20 01 01 165 | Cardboard containers - contaminated 15 01 10* 166 | Cardboard packaging 15 01 01, 15 01 10* 167 | Cardboard packaging - used 15 01 01, 15 01 10* 168 | Carpets 04 02 22, 19 12 08, 20 01 11 169 | Cars 16 01 04*, 16 01 06 170 | Cartridges (ink jet printer remanufacturing residues) 08 03 17*, 08 03 18 171 | Cartridges (laser printer remanufacturing residues) 08 03 17*, 08 03 18 172 | Cartridges - toner 08 03 17*, 08 03 18 173 | Cast iron waste and scrap 16 01 17, 17 04 05, 19 01 02, 19 10 01, 19 12 02, 20 01 40 174 | Catalysts - molybdenum (hydrodesulphurisation) 16 08 02*, 16 08 03 175 | Catalysts - nickel (hydrodesulphurisation) 16 08 02*, 16 08 03 176 | Catalysts - precious metal bearing 16 08 01 177 | Catalysts - transition metal 16 08 02*, 16 08 03 178 | Cathode ray tubes 10 11 11*, 16 02 13*, 16 02 15*, 20 01 21* 179 | Caustic - fluoride 06 02 05*, 20 01 15* 180 | Caustic - sulphide 06 02 05*, 20 01 15* 181 | Cellophane - dry 07 02 13, 15 01 02, 17 02 03, 19 12 04, 20 01 39 182 | Cement 10 13 04, 10 13 11 183 | Cement - asbestos 10 13 09*, 17 06 05* 184 | Cement kiln dust 10 13 06 185 | Cement products 10 13 11, 17 01 01 186 | Cement slurry 10 13 14 187 | Cement/concrete sludge 10 13 14 188 | Ceramics 08 02 02, 08 02 03, 10 12 08, 17 01 03, 17 01 06*, 17 01 07 189 | Cesspit sludge 20 03 04 190 | Cesspool waste 20 03 04 191 | CFCs 14 06 01*, 16 02 11*, 20 01 23* 192 | Chairs - metal 17 04 07, 20 01 40, 20 03 07 193 | Chairs - plastic 17 02 03, 20 01 39, 20 03 07 194 | Chairs - wooden 03 01 05, 17 02 01, 19 12 07, 20 03 07 195 | Chalk 01 01 02, 01 04 08 196 | Chemical production liquors 07 01 01*, 07 01 03*, 07 01 04*, 07 02 01*, 07 02 03*, 07 02 04*, 07 03 01*, 07 03 03*, 07 03 04*, 07 04 01*, 07 04 03*, 07 04 04*, 07 05 01*, 07 05 03*, 07 05 04*, 07 06 01*, 07 06 03*, 07 06 04*, 07 07 01*, 07 07 03*, 07 07 04* 197 | Chemical toilet waste 20 03 04 198 | Chemical waste - general factory 20 03 01 199 | Chemicals - laboratory 16 05 06* 200 | Chimney sweeping waste 20 01 41 201 | China 10 12 08, 17 01 03 202 | Chipboard 03 01 04*, 03 01 05 203 | Chlorates 09 01 05*, 16 09 04*, 20 01 29* 204 | Chlorinated dioxins 19 01 05*, 19 01 13*, 19 01 15* 205 | Chlorinated solvents (mixed) 07 01 03*, 07 02 03*, 07 03 03*, 07 04 03*, 07 05 03*, 07 06 03*, 07 07 03*, 14 06 02*, 20 01 13* 206 | Chlorine 16 05 04*, 16 05 06*, 16 05 07* 207 | Chlorofluorocarbons 14 06 01*, 16 02 11*, 20 01 23* 208 | Chloroform 16 05 06*, 16 05 08* 209 | Chloromethanes 16 05 04*, 16 05 06*, 16 05 08* 210 | Chlorosilanes 06 08 02* 211 | Chocolate 02 06 01, 20 01 08 212 | Chromates 16 09 02* 213 | Chrome 06 03 13*, 06 03 15*, 06 04 05*, 12 01 03, 12 01 04, 16 01 18, 17 04 07, 19 12 03, 20 01 40 214 | Chromic acid 11 01 05*, 11 01 06*, 20 01 14* 215 | Chromium 06 03 13*, 06 03 15*, 06 04 05*, 12 01 03, 12 01 04, 16 01 18, 17 04 07, 19 12 03, 20 01 40 216 | Chromium compounds (trivalent) 04 01 04, 04 01 08, 16 09 02* 217 | Chromium compounds - hexavalent 16 09 02* 218 | Chromium waste and scrap 12 01 03, 12 01 04, 16 01 18, 17 04 07, 19 12 03, 20 01 40 219 | Civic amenity waste 20 01 01, 20 01 02, 20 01 11, 20 01 13*, 20 01 25, 20 01 26*, 20 01 27*, 20 01 28, 20 01 33*, 20 01 34, 20 01 35*, 20 01 36, 20 01 37*, 20 01 38, 20 01 39, 20 01 40, 20 02 01, 20 02 02, 20 03 01, 20 03 07 220 | Cladding - aluminum 17 04 02 221 | Cladding - stone 17 09 04 222 | Clay 01 04 09, 17 05 04 223 | Clay - contaminated 05 01 15*, 17 05 03*, 19 11 01* 224 | Clay and terracotta land drain pipes 17 01 03 225 | Cleaning compounds - halogenated 14 06 02*, 20 01 29* 226 | Cling film 07 02 13, 15 01 02, 20 01 39 227 | Clinical waste 18 01 01, 18 01 02, 18 01 03*, 18 01 04, 18 02 01, 18 02 02*, 18 02 03 228 | Clinical waste - autoclaved 18 01 01, 18 01 02, 18 01 03*, 18 01 04 229 | Clinical waste n/o/s 18 01 01, 18 01 02, 18 01 03*, 18 01 04 230 | Clothes 20 01 10 231 | Coal 01 01 02 232 | Coal tars 17 03 01*, 17 03 03*, 17 04 10* 233 | Coatings - paint (PVC) 08 01 11*, 08 01 17*, 20 01 27* 234 | Cobalt compounds 06 03 13*, 06 03 15*, 06 04 05*, 10 11 11* 235 | Cocoa husks 02 03 01, 02 03 04 236 | Cocoa shells 02 03 01, 02 03 04 237 | Cocoa skins 02 03 01, 02 03 04 238 | Coffee 02 03 01, 02 03 04 239 | Coke 16 03 06 240 | Coke - contaminated 16 03 05* 241 | Colliery spoil 01 01 02 242 | Combustion refractories 16 11 01*, 16 11 02, 16 11 03*, 16 11 04, 16 11 05*, 16 11 06 243 | Combustion residue (MSW) - bottom ash 19 01 12 244 | Commercial waste 20 03 01 245 | Compact discs 20 01 39 246 | Compacted household waste 19 12 12 247 | Compost - mushroom 02 03 01 248 | Compost - spent 02 03 01, 19 05 03 249 | Composted household waste 19 05 01, 19 05 03, 19 06 04 250 | Computer disks 20 01 39 251 | Computer keyboards 16 02 14, 16 02 16 252 | Computer screens 16 02 13*, 16 02 15* 253 | Computers 16 02 13*, 16 02 14, 16 02 16 254 | Concrete 10 13 14, 17 01 01 255 | Concrete - contaminated 17 01 06* 256 | Concrete - wet 10 13 14, 17 01 01 257 | Concrete blocks 10 13 14, 17 01 01 258 | Concrete floor tiles 10 13 14, 17 01 01 259 | Concrete railway sleepers 10 13 14, 17 01 01 260 | Concrete slurry 10 13 14, 17 01 01 261 | Condemned food 02 02 03, 02 03 04, 02 05 01, 02 06 01, 02 07 04, 20 01 08 262 | Cones (roadworks) 17 02 03 263 | Construction waste (contaminated) n/o/s 17 09 01*, 17 09 02*, 17 09 03*, 17 09 04 264 | Construction waste containg chemicals 17 09 01*, 17 09 02*, 17 09 03*, 17 09 04 265 | Container washings - agrochemical 02 01 08*, 02 01 09, 16 07 09* 266 | Containers (metal) - used 15 01 04, 15 01 10* 267 | Containers - aerosol - empty 15 01 04, 15 01 10* 268 | Containers - cardboard 15 01 01 269 | Containers - cardboard (contaminated) 15 01 01, 15 01 10* 270 | Containers - glass 10 11 12, 15 01 07, 20 01 02 271 | Containers - glass (contaminated) 10 11 12, 15 01 10*, 20 01 02 272 | Containers - metal (contaminated) 15 01 04, 15 01 10* 273 | Containers - paper 15 01 01 274 | Containers - paper (contaminated) 15 01 10* 275 | Containers - pesticide (metal) 02 01 08*, 02 01 09, 15 01 04, 15 01 10* 276 | Containers - pesticide (plastic) 02 01 08*, 02 01 09, 15 01 02, 15 01 10* 277 | Containers - plastic 01 03 04*, 15 01 02 278 | Containers - plastic (contaminated) 15 01 10* 279 | Containers - wooden 15 01 03 280 | Containers - wooden (contaminated) 15 01 10* 281 | Contaminated filter paper 15 02 02*, 15 02 03 282 | Contaminated grit 13 05 01*, 13 05 08* 283 | Contaminated paper wipes 15 02 02*, 15 02 03 284 | Contaminated railway ballast 17 05 07*, 17 05 08 285 | Contaminated rock 01 04 07*, 17 05 03*, 17 05 07* 286 | Contaminated sand 01 04 09, 17 05 03* 287 | Contaminated silt 17 05 05*, 17 05 06 288 | Contaminated silt and dredgings 17 05 05*, 17 05 06 289 | Contaminated soil (all types of soil) 17 05 03*, 17 05 04 290 | Cookers 16 02 12*, 16 02 14 291 | Cookers - microwave 16 02 13*, 16 02 14 292 | Cooking oil 20 01 25, 20 01 26* 293 | Cooling column waste (coal treatment) 05 06 04 294 | Cooling column waste (petroleum refining) 05 01 14 295 | Cooling water (containing oil) 10 02 11*, 10 03 27*, 10 04 09*, 10 05 08*, 10 06 09*, 10 07 07*, 10 08 19* 296 | Cooling water (not containing oil) 10 01 26, 10 03 28, 10 04 10, 10 06 10, 10 07 08, 10 08 20 297 | Copolymers - acrylate 07 02 13, 16 03 05*, 16 03 06 298 | Copper - scrap 17 04 01, 19 10 02, 19 12 03, 20 01 40 299 | Copper ashes and residues 10 06 04 300 | Copper compounds 06 03 13*, 06 03 15*, 06 04 05*, 10 11 11* 301 | Copper dross (thermal metallurgy) 10 06 02 302 | Copper slags 10 06 01 303 | Copper waste and scrap 17 04 01, 19 10 02, 19 12 03, 20 01 40 304 | Cork 03 01 01, 17 02 01, 20 01 38 305 | Corrugated plastic sheets 17 02 03 306 | Cosmetic products 16 03 05*, 16 03 06 307 | Cotton 04 02 21, 04 02 22, 15 01 09, 19 12 08, 20 01 11 308 | Cotton wool 04 02 21, 04 02 22, 15 01 09, 19 12 08, 20 01 11 309 | Cows 02 01 02, 02 02 02, 02 02 03 310 | Crack indicating agents (thermal metallurgy) 10 09 15*, 10 09 16, 10 10 15*, 10 10 16 311 | Crates - plastic 15 01 02 312 | Crates - wooden 15 01 03 313 | Crop spraying waste 02 01 08*, 02 01 09 314 | Crops, Crop waste 02 01 03 315 | Crude oil tank cleaning residues 16 07 08*, 16 07 09*, 16 07 99 316 | Crushed fluorescent tubes 20 01 21* 317 | Cushions 04 02 21, 04 02 22, 15 01 09, 19 12 08, 20 01 11 318 | Cyanides 06 03 11*, 11 03 01* 319 | Cyclone deposits 19 02 03, 19 02 04* 320 | Dairy products 02 05 01, 02 05 02, 20 01 08 321 | Dairy products (solids) 02 05 01, 02 05 02, 20 01 08 322 | Dairy products (liquids) 02 05 01, 02 05 02, 20 01 08 323 | De-inking sludge 03 03 05 324 | Dead pets 18 02 02*, 18 02 03 325 | Decant oil tank cleaning residues 16 07 08*, 16 07 09*, 16 07 99 326 | Degreaser compounds 04 01 03*, 11 01 13*, 11 01 14, 12 03 02* 327 | Demolition waste - contaminated 17 09 01*, 17 09 02*, 17 09 03*, 17 09 04 328 | Derv 13 07 01* 329 | Detergents 20 01 29*, 20 01 30 330 | Dichloroethane 16 05 06*, 16 05 08* 331 | Dichloromethane 16 05 06*, 16 05 08* 332 | Diesel 13 07 01* 333 | Diesel and petrol (mixed) 13 07 03* 334 | Diphenyl methane diisocyanate (MDI) – solid 16 05 06*, 16 05 08* 335 | Distillate tank cleaning residues 05 01 03* 336 | Distillation residues 02 07 02, 07 01 07*, 07 01 08*, 07 02 07*, 07 02 08*, 07 03 07*, 07 03 08*, 07 04 07*, 07 04 08*, 07 05 07*, 07 05 08*, 07 06 07*, 07 06 08*, 07 07 07*, 07 07 08* 337 | Dog poo 18 02 02*, 18 02 03 338 | Domestic appliances (electrical) 16 02 11*, 16 02 12*, 16 02 13*, 16 02 14 339 | Domestic appliances (gas powered) 20 01 40, 20 03 07 340 | Domestic appliances (mechanical) 20 01 40, 20 03 07 341 | Domestic appliances CFCs extracted 16 02 14 342 | Domestic appliances CFCs not extracted 16 02 11* 343 | Domestic waste 20 03 01 344 | Doors (metal) 17 04 05 345 | Dredgings 17 05 05*, 17 05 06 346 | Dredgings and silt - contaminated 17 05 05*, 17 05 06 347 | Dressings - soiled 18 01 03*, 18 01 04 348 | Drilling muds - water based 01 05 04, 01 05 05*, 01 05 06*, 01 05 07, 01 05 08 349 | Dross - aluminium (thermal metallurgy) 10 03 09*, 10 03 15*, 10 03 16 350 | Dross - copper (thermal metallurgy) 10 06 02 351 | Dross - lead (thermal metallurgy) 10 04 02* 352 | Dross - magnesium 10 08 10*, 10 08 11 353 | Dross - silver (thermal metallurgy) 10 07 02 354 | Dross - zinc (thermal metallurgy) 10 05 10*, 10 05 11 355 | Drugs - controlled 07 05 13*, 07 05 14, 18 01 08*, 18 01 09, 18 02 07*, 18 02 08, 20 01 31*, 20 01 32 356 | Drugs - cytotoxic 07 05 13*, 07 05 14, 18 01 08*, 18 02 07*, 20 01 31* 357 | Drugs - prescribed 07 05 13*, 07 05 14, 18 01 08*, 18 01 09, 18 02 07*, 18 02 08, 20 01 31*, 20 01 32 358 | Drums - steel 15 01 04, 15 01 10* 359 | Drums n/o/s 15 01 02, 15 01 04, 15 01 10* 360 | Ducting and piping - contaminated 17 02 04* 361 | Dust - asbestos 06 13 04*, 10 13 09* 362 | Dust - flue gas 10 01 04*, 10 03 19*, 10 03 20, 10 04 04*, 10 05 03*, 10 06 03*, 10 08 15*, 10 08 16, 10 09 09*, 10 09 10, 10 10 09*, 10 10 10, 10 12 03 363 | Dust - furnace (foundries) 10 01 01, 10 01 04*, 10 01 14*, 10 01 15, 19 01 15*, 19 01 16 364 | Dust - grinding 01 03 08, 01 04 10, 10 03 21*, 10 03 22, 12 01 02, 12 01 04 365 | Dust - sander 03 01 04*, 03 01 05, 12 01 02, 12 01 04 366 | Dyestuffs 04 02 16*, 04 02 17 367 | Effluent - septic tank 20 03 04 368 | Effluent treatment sludge - biological (dewatered) 02 02 04, 02 03 05, 02 04 03, 02 05 02, 02 06 03, 02 07 05, 03 03 11, 04 01 06, 04 01 07, 04 02 19*, 04 02 20, 05 01 09*, 05 01 10, 06 05 02*, 06 05 03, 07 01 11*, 07 01 12, 07 02 11*, 07 02 12, 07 03 11*, 07 03 12, 07 04 11*, 07 04 12, 07 05 11*, 07 05 12, 07 06 11*, 07 06 12, 07 07 11*, 07 07 12, 10 01 20*, 10 01 21, 10 11 19*, 10 11 20, 10 12 13, 19 11 05*, 19 11 06 369 | Electric motors (decontaminated) 16 01 22, 16 02 14 370 | Electrical absorption fridges 16 02 11*, 16 02 14 371 | Electrical appliances 16 02 10*, 16 02 11*, 16 02 12*, 16 02 13*, 16 02 14 372 | Electrical cable 16 02 15*, 16 02 16, 17 04 10*, 17 04 11 373 | Electrical components 16 02 15*, 16 02 16 374 | Electrical domestic appliances 16 02 10*, 16 02 11*, 16 02 12*, 16 02 13*, 16 02 14 375 | Electrical wire 16 02 15*, 16 02 16, 17 04 10*, 17 04 11 376 | Electronic appliances 16 02 13*, 16 02 14 377 | Electronic components 16 02 15*, 16 02 16 378 | Electronic equipment 16 02 13*, 16 02 14 379 | Electronic fixtures/fittings 16 02 15*, 16 02 16 380 | Electronic scrap 16 02 15*, 16 02 16 381 | Empty aerosol containers 15 01 04, 15 01 10* 382 | Empty used containers 15 01 01, 15 01 02, 15 01 03, 15 01 04, 15 01 05, 15 01 06, 15 01 10* 383 | Emulsions (oil) - chlorinated 12 01 08*, 13 01 04* 384 | Emulsions (oil) - non-chlorinated 12 01 09*, 13 01 05* 385 | Enamels 08 02 01, 20 01 28 386 | Engine oil 13 02 04*, 13 02 05*, 13 02 06*, 13 02 07*, 13 02 08* 387 | Engine oil - chlorinated 13 02 04* 388 | Engine oil - non-chlorinated 13 01 10* 389 | Engines 16 01 21*, 16 01 22 390 | Epoxy resin 08 04 09*, 08 04 10, 08 04 11*, 08 04 12 391 | Epoxy/polyester powder paint 08 01 11*, 08 01 13*, 20 01 27*, 20 01 28 392 | Etching acid 08 03 16* 393 | Ethanol 16 05 06*, 16 05 08*, 18 01 06*, 18 02 05* 394 | Ethers 16 05 06*, 16 05 08* 395 | Ethoxylated alkyphenol (surfactant) 16 05 06*, 16 05 08* 396 | Ethyl benzene 16 05 06*, 16 05 08* 397 | Ethylene glycol 16 01 14* 398 | Excrement - animal 02 01 06, 18 02 02*, 18 02 03, 20 02 01 399 | Feathers 02 02 02 400 | Feedwater sludge (petroleum refining) 05 01 13 401 | Feminine hygiene waste 18 01 04 402 | Fermentation waste 02 07 01, 02 07 02, 02 07 03, 02 07 04, 02 07 05 403 | Ferrous and non-ferrous (mixed) scrap 02 01 10, 15 01 04, 17 04 07, 20 01 40 404 | Ferrous metal scrap 02 01 10, 12 01 01, 12 01 02, 15 01 04, 16 01 17, 17 04 05, 17 04 09*, 19 01 02, 19 10 01, 19 12 02, 20 01 40 405 | Ferrous metal turnings 12 01 01, 17 04 05, 17 04 09*, 19 10 01, 19 12 02, 20 01 40 406 | Ferrous swarf 12 01 01, 17 04 05, 17 04 09*, 19 10 01, 19 12 02, 20 01 40 407 | Fertiliser waste 06 10 02* 408 | Fibre - acrylic 04 02 21, 04 02 22, 15 01 09, 19 12 08, 20 01 11 409 | Fibre - glass 10 11 03, 16 01 20, 17 02 02, 17 02 04* 410 | Fibreboard 10 11 03 411 | Fibreglass 10 11 03, 16 01 20, 17 02 02, 17 02 04*, 20 01 02 412 | Fibres - textile (processed) - synthetic 04 02 22, 15 01 09, 19 12 08, 20 01 11 413 | Fibres - textile (unprocessed) - synthetic 04 02 21 414 | Fibres man made 04 02 22, 15 01 09, 19 12 08, 20 01 11 415 | Film - plastic 07 02 13, 15 01 02, 20 01 39 416 | Filter cake - dewatered 07 01 09*, 07 01 10*, 07 02 09*, 07 02 10*, 07 03 09*, 07 03 10*, 07 04 09*, 07 04 10*, 07 05 09*, 07 05 10*, 07 06 09*, 07 06 10*, 07 07 09*, 07 07 10*, 10 02 13*, 10 02 14, 10 02 15, 10 03 25*, 10 03 26, 10 04 07*, 10 05 06*, 10 06 07*, 10 07 05, 10 08 17*, 10 08 18, 10 11 17*, 10 11 18, 10 12 05, 10 13 07, 11 01 09*, 11 01 10, 19 01 05* 417 | Filter cake - phenolic 07 01 09*, 07 01 10*, 07 02 09*, 07 02 10*, 07 03 09*, 07 03 10*, 07 04 09*, 07 04 10*, 07 05 09*, 07 05 10*, 07 06 09*, 07 06 10*, 07 07 09*, 07 07 10*, 10 02 13*, 10 03 25*, 10 04 07*, 10 05 06*, 10 06 07*, 10 08 17*, 10 11 17*, 11 01 09* 418 | Filter cake n/o/s 07 01 09*, 07 01 10*, 07 02 09*, 07 02 10*, 07 03 09*, 07 03 10*, 07 04 09*, 07 04 10*, 07 05 09*, 07 05 10*, 07 06 09*, 07 06 10*, 07 07 09*, 07 07 10*, 10 02 13*, 10 02 14, 10 02 15, 10 03 25*, 10 03 26, 10 04 07*, 10 05 06*, 10 06 07*, 10 07 05, 10 08 17*, 10 08 18, 10 11 17*, 10 11 18, 10 12 05, 10 13 07, 11 01 09*, 11 01 10, 19 01 05* 419 | Filter clay 05 01 15*, 15 02 02*, 15 02 03 420 | Filter cloths 15 02 02*, 15 02 03 421 | Filter paper 15 02 02*, 15 02 03 422 | Filter paper - contaminated 15 02 02*, 15 02 03 423 | Filters - anthracite 19 09 04 424 | Filters - contaminated 15 02 02*, 15 02 03 425 | Filters - oil 16 01 07* 426 | Filters - oil (crushed) 16 01 07* 427 | Filters - spray booth 15 02 02*, 15 02 03 428 | Fireworks 16 04 02* 429 | Fish - processing waste 02 01 02, 02 02 02, 02 02 03, 20 01 08 430 | Fish carcasses 02 01 02, 02 02 02, 02 02 03, 20 01 08 431 | Fixer - photographic 09 01 04*, 09 01 05* 432 | Flesh - animal 02 01 02, 02 02 02, 20 01 08 433 | Floor sweepings 20 03 01 434 | Flue cleanings - boiler 10 01 04*, 10 03 19*, 10 03 20, 10 04 04*, 10 05 03*, 10 06 03*, 10 08 15*, 10 08 16, 10 09 09*, 10 09 10, 10 10 09*, 10 10 10, 10 12 03 435 | Flue gas dust 10 01 04*, 10 03 19*, 10 03 20, 10 04 04*, 10 05 03*, 10 06 03*, 10 08 15*, 10 08 16, 10 09 09*, 10 09 10, 10 10 09*, 10 10 10, 10 12 03 436 | Fluid - brake 16 01 13* 437 | Fluorescent tubes 20 01 21* 438 | Fluorescent tubes - crushed 20 01 21* 439 | Fly ash - coal 10 01 02, 10 01 03, 10 01 04*, 10 01 13*, 10 01 16*, 10 01 17, 19 01 13*, 19 01 14, 19 04 02* 440 | Fly ash - oil 10 01 02, 10 01 03, 10 01 04*, 10 01 13*, 10 01 16*, 10 01 17, 19 01 13*, 19 01 14, 19 04 02* 441 | Fly ash - peat 10 01 02, 10 01 03, 10 01 04*, 10 01 13*, 10 01 16*, 10 01 17, 19 01 13*, 19 01 14, 19 04 02* 442 | Foam rubber 04 02 22, 20 01 11, 20 03 07 443 | Foil - aluminium 15 01 04, 19 12 03, 20 01 40 444 | Food - canteen waste 20 01 08 445 | Food - condemned 02 02 03, 02 03 04, 02 05 01, 02 06 01, 02 07 04, 20 01 08 446 | Food - domestic 20 01 08 447 | Food processing waste 02 01 01, 02 01 02, 02 01 03, 02 02 01, 02 02 02, 02 02 03, 02 02 04, 02 03 01, 02 03 04, 02 05 01, 02 06 01, 02 07 01, 02 07 04, 20 01 08 448 | Food washing waste 02 01 01, 02 01 06, 02 02 01, 02 03 01, 02 04 01, 02 07 01 449 | Forestry waste 02 01 07 450 | Formaldehyde 16 03 05*, 16 05 06* 451 | Formic acid 08 03 16*, 16 05 06*, 16 05 08*, 20 01 14* 452 | Foundry furnace ash 10 01 01, 10 01 14*, 10 01 15, 11 05 02, 19 01 12 453 | Foundry sand - non-phenolic 10 09 05*, 10 09 06, 10 09 07*, 10 09 08, 10 10 05*, 10 10 06, 10 10 07*, 10 10 08, 10 12 06 454 | Foundry sand - phenolic 10 09 05*, 10 09 07*, 10 10 05*, 10 10 07* 455 | Fragmentiser residues 19 10 01, 19 10 02, 19 10 03*, 19 10 04, 19 10 05*, 19 10 06 456 | Freezers 16 02 11*, 16 02 13*, 20 01 23* 457 | Fridges 16 02 11*, 16 02 13*, 20 01 23* 458 | Fridges - compression 16 02 11*, 16 02 13* 459 | Fridges - electrical (absorption) 16 02 11*, 16 02 13* 460 | Frit 10 11 03, 10 11 11*, 19 12 05 461 | Fruit 02 03 04, 20 01 08 462 | Fuel - Cleaning waste 05 01 11* 463 | Fuel - paraffin 13 07 01* 464 | Fungicides 02 01 08*, 03 02 01*, 03 02 02*, 06 13 01*, 20 01 19* 465 | Fur - degreasing waste 04 01 03* 466 | Furnace ash (foundries) 10 01 01, 10 01 14*, 10 01 15, 11 05 02, 19 01 12 467 | Furnace bottom ash 10 01 01, 10 01 14*, 10 01 15, 19 01 12 468 | Furnace dust (foundries) 10 01 04*, 10 03 19*, 10 03 20, 10 04 04*, 10 05 03*, 10 06 03*, 10 08 15*, 10 08 16, 10 09 09*, 10 09 10, 10 10 09*, 10 10 10, 10 12 03 469 | Furnace linings 16 11 01*, 16 11 02, 16 11 03*, 16 11 04, 16 11 05*, 16 11 06 470 | Furnace slag 06 09 02, 10 01 01, 10 01 14*, 10 01 15, 10 02 01, 10 02 02, 10 03 04*, 10 03 08*, 10 03 29*, 10 03 30, 10 04 01*, 10 05 01, 10 06 01, 10 07 01, 10 08 09, 10 09 03, 10 10 03, 19 01 12 471 | Furniture - metal 17 04 07, 20 01 40, 20 03 07 472 | Furniture - Off specification, redunant stock 03 01 05 473 | Furniture - office 20 03 07 474 | Galvanizing slab zinc bottom dross 11 05 01 475 | Garden waste 20 02 01, 20 02 02 476 | Gas cylinders 16 05 04*, 16 05 05 477 | Gas powered domestic appliances 20 03 07 478 | Gas purification waste 05 07 01*, 05 07 02 479 | Gas tank (LPG vehicles) 16 01 16 480 | Gas treatment waste 10 02 07*, 10 02 08, 10 03 23*, 10 03 24, 10 04 06*, 10 05 05*, 10 06 06*, 10 07 03, 10 11 15*, 10 11 16, 10 12 09*, 10 12 10, 10 13 12*, 10 13 13, 11 05 03*, 19 01 07* 481 | General administration waste 20 03 01 482 | General commercial waste 20 03 01 483 | General demolition waste 17 09 03*, 17 09 04 484 | General industrial waste 20 03 01 485 | General office waste 20 03 01 486 | General waste restaurant 20 03 01 487 | General waste retail 20 03 01 488 | Genklene 20 01 30 489 | Geotextiles 04 02 22, 20 01 11 490 | Glass 10 11 03, 10 11 11*, 10 11 12, 15 01 07, 16 01 20, 17 02 02, 17 02 04*, 19 12 05, 20 01 02 491 | Glass – cullet 19 12 05 492 | Glass – powdered 10 11 11* 493 | Glass bottles 10 11 12, 15 01 07, 20 01 02 494 | Glass containers 10 11 12, 15 01 07, 20 01 02 495 | Glass containers - contaminated 15 01 10* 496 | Glass fibre 10 11 03, 16 01 20, 17 02 02, 17 02 04*, 20 01 02 497 | Glass pots 10 11 12, 15 01 07, 20 01 02 498 | Glassware - contaminated 10 11 11*, 10 11 13*, 17 02 04* 499 | Glaze 10 12 11*, 10 12 12 500 | Gloves - plastic 20 01 39 501 | Glue – epoxy-based 08 04 09*, 08 04 11*, 08 04 13*, 08 04 15*, 20 01 27* 502 | Glue waste - animal based 08 04 10, 20 01 28 503 | Glue waste - casein based 08 04 09*, 08 04 10 504 | Glycol 16 01 14* 505 | Gold skimmings (thermal metallurgy) 10 07 02 506 | Gold slags 10 07 01 507 | Granules of rubber 19 12 04 508 | Graphite 01 01 02 509 | Grass 20 02 01 510 | Grate ash - MSW combustion residue 19 01 12 511 | Gravel 01 04 08, 17 01 06*, 17 01 07 512 | Greases 04 02 10, 19 08 09*, 19 08 10* 513 | Green liquor 03 03 02 514 | Green waste 02 01 03, 02 01 07, 20 02 01 515 | Grinding bodies 12 01 20*, 12 01 21 516 | Grinding sludge 10 11 13*, 12 01 18* 517 | Grit – blasting 12 01 16*, 12 01 17 518 | Grit – contaminated 12 01 16*, 12 01 17, 13 05 01*, 13 05 08* 519 | Gully emptyings 13 05 02*, 13 05 03*, 13 05 07*, 13 05 08*, 20 03 03 520 | Guns 20 01 40 521 | Gypsum (calcium sulphate) 07 01 10*, 07 03 10*, 07 04 10*, 07 05 10*, 07 06 10*, 07 07 10*, 17 08 01*, 17 08 02 522 | Gypsum plasterboard 17 08 01*, 17 08 02 523 | Hair – human 18 01 04 524 | Hair products and shampoo 16 03 06, 20 01 30 525 | Halide (metal) - lamps 16 02 13* 526 | Halogenated adhesives 08 04 09*, 08 04 11* 527 | Halogenated organics n/o/s 07 01 03*, 07 01 07*, 07 01 09*, 07 02 03*, 07 02 07*, 07 02 09*, 07 03 03*, 07 03 07*, 07 03 09*, 07 04 03*, 07 04 07*, 07 04 09*, 07 05 03*, 07 05 07*, 07 05 09*, 07 06 03*, 07 06 07*, 07 06 09*, 07 07 03*, 07 07 07*, 07 07 09*, 14 06 02*, 14 06 04* 528 | Halon 14 06 01*, 14 06 02* 529 | Hardboard 03 01 04*, 03 01 05, 17 02 01 530 | Hardcore 17 01 07 531 | Hardened adhesives 08 04 10, 20 01 28 532 | Hardened sealants 08 04 10, 20 01 28 533 | HCFCs 14 06 01* 534 | Healthcare risk waste 18 01 03*, 18 02 02* 535 | Herbicides 02 01 08*, 06 13 01*, 20 01 19* 536 | Hides – animal 02 01 02, 02 02 02, 04 01 01 537 | High density polyethylene 02 01 04, 07 02 13, 15 01 02, 17 02 03, 19 12 04, 20 01 39 538 | Hoovers 16 02 14 539 | Horticultural waste 02 01 03, 20 02 01 540 | Hospital – clinical waste 18 01 01, 18 01 02, 18 01 03*, 18 01 04, 18 01 08*, 18 01 09, 18 01 10*, 18 02 01, 18 02 02*, 18 02 03, 18 02 07*, 18 02 08 541 | Hospital waste - clinical 18 01 01, 18 01 02, 18 01 03*, 18 01 04, 18 01 08*, 18 01 09, 18 01 10*, 18 02 01, 18 02 02*, 18 02 03, 18 02 07*, 18 02 08 542 | Hospital waste - domestic 18 01 04, 20 01 08, 20 03 01 543 | Hot melt – adhesives 08 04 10 544 | House clearance waste 20 03 01 545 | Household waste 20 03 01 546 | Household waste - bulky 20 03 07 547 | Household waste - compacted 19 12 12 548 | Household waste - dustbin 20 03 01 549 | Human hair 18 01 04 550 | Human tissue 18 01 02, 18 01 03* 551 | Hydrobromic acid 16 05 06*, 16 05 07*, 20 01 14* 552 | Hydrocarbons - aliphatic 16 03 05*, 16 03 06 553 | Hydrocarbons - refrigerants 14 06 01*, 16 02 11*, 20 01 23* 554 | Hydrochloric acid 06 01 02*, 20 01 14* 555 | Hydrofluoric acid 06 01 03*, 20 01 14* 556 | Hydroxides 06 02 01*, 06 02 03*, 06 02 04* 557 | Ilmenite extraction residues 01 01 01 558 | Incontinence pads (used) 18 01 03*, 18 01 04 559 | Industrial machinery (heavy) 16 02 09*, 16 02 10*, 16 02 11*, 16 02 12*, 16 02 13*, 16 02 14, 16 02 15*, 16 02 16 560 | Industrial machinery (light) 16 02 09*, 16 02 10*, 16 02 11*, 16 02 12*, 16 02 13*, 16 02 14, 16 02 15*, 16 02 16 561 | Industrial waste 20 03 01 562 | Infected animal parts 18 02 02* 563 | Infectious linen (clinical) 18 01 03*, 18 01 04 564 | Infectious materials (clinical) 18 01 03*, 18 01 04 565 | Ink – halogenated 08 03 12*, 08 03 14*, 20 01 27* 566 | Ink - non-halogenated 08 03 07, 08 03 08, 08 03 12*, 08 03 13, 08 03 14*, 08 03 15, 20 01 27*, 20 01 28 567 | Ink - water based 08 03 13, 08 03 15, 20 01 28 568 | Ink jet printer cartridges remanufacturing residues 08 03 17*, 08 03 18 569 | Ink sludge 08 03 07, 08 03 08, 08 03 14*, 08 03 15 570 | Inorganic acids 06 01 01*, 06 01 02*, 06 01 03*, 06 01 04*, 06 01 05*, 06 07 04*, 10 01 09*, 11 01 05*, 11 01 06*, 16 08 05*, 20 01 14* 571 | Inorganic cyanides 06 03 11*, 11 03 01* 572 | Inorganic rocket propellants 16 04 03* 573 | Inorganic wood preservatives 03 02 04*, 06 13 01* 574 | Ion exchange resin 11 01 16*, 19 08 06*, 19 09 05 575 | Iron - scrap 02 01 10, 12 01 01, 12 01 02, 15 01 04, 16 01 17, 17 04 05, 17 04 09*, 19 01 02, 19 10 01, 19 12 02, 20 01 40 576 | Iron chloride 16 03 04 577 | Iron corrugated sheets 02 01 10, 12 01 01, 12 01 02, 15 01 04, 16 01 17, 17 04 05, 17 04 09*, 19 01 02, 19 10 01, 19 12 02, 20 01 40 578 | Isocyanates 08 05 01* 579 | Isopropanol 14 06 03* 580 | Jam 02 03 04, 20 01 08 581 | Jelly - petroleum 16 03 06 582 | Jute 04 02 22, 15 01 09, 19 12 08, 20 01 11 583 | Kerosene 13 07 03* 584 | Ketones 16 03 05*, 16 03 06 585 | Kieselguhr 15 02 02*, 15 02 03 586 | Kitchen waste 02 02 03, 02 03 04, 20 01 08 587 | Laboratory chemicals 16 05 06* 588 | Laboratory smalls 16 05 06* 589 | Lacquer 08 01 11*, 08 01 12, 08 01 17*, 08 01 18, 20 01 27*, 20 01 28 590 | Laminates – plastic 07 02 13, 16 01 19, 17 02 03, 19 12 04, 20 01 39 591 | Lamps 16 02 14 592 | Lamps – sodium 16 02 13* 593 | Lamps/tubes - mercury vapour 16 02 13*, 20 01 21* 594 | Landfill gas condensate 10 01 18*, 10 01 19 595 | Lanolin 04 02 10 596 | Laser printer cartridges remanufacturing residues 08 03 17*, 08 03 18 597 | Latex 07 02 13, 15 01 02, 19 12 04, 20 01 39 598 | Latex and rubber (mixed) 07 02 13, 15 01 02, 19 12 04, 20 01 39 599 | Leachate – landfill 19 07 02*, 19 07 03 600 | Lead – scrap 17 04 03, 19 12 03, 20 01 40 601 | Lead acid batteries (undrained) 16 06 01* 602 | Lead compounds 06 03 13*, 06 03 15*, 06 04 05*, 10 11 11* 603 | Lead dross (thermal metallurgy) 10 04 02* 604 | Lead slags 10 04 01* 605 | Lead waste and scrap 17 04 03, 19 12 03, 20 01 40 606 | Leather 04 01 08, 04 01 09, 19 12 08, 20 01 11 607 | Leather (dyed) - dust 04 01 08 608 | Leather – degreasing waste 04 01 03* 609 | Leather cuttings 04 01 08, 04 01 09, 19 12 08, 20 01 11 610 | Light Bulbs (fluorescent) 20 01 21* 611 | Light bulbs (non fluorescent) 16 02 14, 20 01 36 612 | Lime - spent 03 03 09, 04 01 02, 10 13 04, 17 09 03* 613 | Lime sludge 03 03 09, 04 01 02, 10 13 04, 17 09 03* 614 | Linen 04 02 22, 15 01 09, 19 12 08, 20 01 11 615 | Linings (plastic container) - contaminated 15 01 10* 616 | Linings - furnace 16 11 01*, 16 11 02, 16 11 03*, 16 11 04, 16 11 05*, 16 11 06 617 | Lithium compounds 16 05 06*, 16 05 07* 618 | Litter 20 03 03 619 | Litter bin waste 20 03 01 620 | Lorry bodies 16 01 06 621 | Low density polyethylene 02 01 04, 07 02 13, 15 01 02, 17 02 03, 19 12 04, 20 01 39 622 | LPG (motor vehicle) tanks 16 01 16 623 | Machinery 16 02 09*, 16 02 10*, 16 02 11*, 16 02 12*, 16 02 13*, 16 02 14, 16 02 15*, 16 02 16 624 | Machinery - heavy industrial 16 02 09*, 16 02 10*, 16 02 11*, 16 02 12*, 16 02 13*, 16 02 14, 16 02 15*, 16 02 16 625 | Machinery - light industrial 16 02 09*, 16 02 10*, 16 02 11*, 16 02 12*, 16 02 13*, 16 02 14, 16 02 15*, 16 02 16 626 | Magnesium carbonate 16 05 06*, 16 05 07* 627 | Magnesium compounds 06 03 14, 06 03 16 628 | Magnesium oxide 16 05 06*, 16 05 07* 629 | Magnesium sulphate 16 05 06*, 16 05 07* 630 | Manganese compounds 06 03 13*, 06 03 15*, 06 04 05* 631 | Manure - animal 02 01 06, 18 02 02*, 18 02 03, 20 02 01 632 | Mastic 05 01 17, 17 03 01*, 17 03 02 633 | Materials - infected (clinical) 18 01 01, 18 01 02, 18 01 03*, 18 01 04 634 | Mattresses 04 02 22, 20 03 07 635 | Meat - unfit for consumption 02 02 02, 02 02 03, 20 01 08 636 | Mechanical parts (metal) 16 02 10*, 16 02 11*, 16 02 12*, 16 02 13*, 16 02 14, 16 02 15*, 16 02 16 637 | Medicines - non-prescription 18 01 09, 18 02 08, 20 01 32 638 | Medicines - prescription 18 01 08*, 18 01 09, 18 02 07*, 18 02 08, 20 01 31*, 20 01 32 639 | Mercury - elemental 16 01 08*, 17 09 01* 640 | Mercury compounds 05 07 01*, 06 03 13*, 06 03 15*, 06 04 04*, 06 04 05* 641 | Mercury waste and residues 05 07 01*, 06 03 13*, 06 03 15*, 06 04 04*, 06 04 05*, 06 07 03*, 10 14 01*, 16 01 08*, 16 06 03*, 17 09 01*, 20 01 21* 642 | Metal - fragmentised 19 10 01, 19 10 02 643 | Metal - scrap 02 01 10, 12 01 01, 12 01 02, 12 01 03, 12 01 04, 15 01 04, 15 01 11*, 16 01 17, 16 01 18, 17 04 05, 17 04 07, 17 04 09*, 19 01 02, 19 10 01, 19 10 02, 19 12 02, 19 12 03, 20 01 40 644 | Metal - scrap (ferrous) 02 01 10, 12 01 01, 12 01 02, 15 01 04, 15 01 11*, 16 01 17, 17 04 05, 17 04 07, 17 04 09*, 19 01 02, 19 10 01, 19 12 02, 20 01 40 645 | Metal - scrap (non-ferrous) 02 01 10, 12 01 03, 12 01 04, 15 01 04, 15 01 11*, 16 01 18, 17 04 07, 17 04 09*, 19 10 02, 19 12 03, 20 01 40 646 | Metal chairs 16 01 17, 17 04 07, 20 01 40 647 | Metal containers - contaminated 15 01 04, 15 01 10* 648 | Metal containers - used 15 01 04 649 | Metal doors 17 04 05 650 | Metal furniture 17 04 05, 19 12 02 651 | Metal packaging 15 01 04, 15 01 10*, 15 01 11* 652 | Metal parts - mechanical 16 01 17, 16 01 18, 16 02 13*, 16 02 14, 20 01 40 653 | Metal pesticide containers 15 01 10* 654 | Metal windows 17 04 05 655 | Metalliferous mineral tailings 01 03 04*, 01 03 05*, 01 03 06 656 | Methacrylate 16 05 08* 657 | Methanol 16 05 06*, 16 05 08* 658 | Methyl bromide 16 05 06*, 16 05 08* 659 | Methyl methacrylate 16 05 06*, 16 05 08* 660 | Methylated spirit 14 06 03* 661 | Methylene chloride 16 05 06*, 16 05 08* 662 | Microbiological waste 18 01 03*, 18 01 04 663 | Microwave cookers 16 02 12*, 16 02 14 664 | Milk 02 05 01, 20 01 08 665 | Mill scales 10 02 10 666 | Mine waste 01 01 01, 01 01 02 667 | Mineral processing waste 01 03 04*, 01 03 05*, 01 03 06, 01 03 07*, 01 03 08, 01 03 09, 01 04 07*, 01 04 08, 01 04 09, 01 04 10, 01 04 11, 01 04 12, 01 04 13 668 | Miscellaneous non-combustible waste 20 03 01 669 | Miscible cutting oils - water 12 01 08*, 12 01 09* 670 | Mixed brickwork and mortar 17 09 04 671 | Mixed ferrous and non-ferrous scrap 02 01 10, 12 01 01, 12 01 02, 12 01 03, 12 01 04, 15 01 04, 15 01 11*, 16 01 17, 16 01 18, 17 04 05, 17 04 07, 17 04 09*, 19 01 02, 19 10 01, 19 10 02, 19 12 02, 19 12 03, 20 01 40 672 | Mixed oil and sand 15 02 02* 673 | Mixed oil and sawdust 15 02 02* 674 | Mixed plastics 02 01 04, 07 02 13, 12 01 05, 15 01 02, 16 01 19, 17 02 03, 17 02 04*, 19 12 04, 20 01 39 675 | Mixed scrap metal 02 01 10, 12 01 01, 12 01 02, 12 01 03, 12 01 04, 15 01 04, 15 01 11*, 16 01 17, 16 01 18, 17 04 05, 17 04 07, 17 04 09*, 19 01 02, 19 10 01, 19 10 02, 19 12 02, 19 12 03, 20 01 40 676 | Mixed waste (non hazardous) 20 03 01 677 | Molybdenum compounds 06 03 13*, 06 03 15*, 06 04 05*, 10 11 11* 678 | Mother liquors 07 01 01*, 07 01 03*, 07 01 04*, 07 02 01*, 07 02 03*, 07 02 04*, 07 03 01*, 07 03 03*, 07 03 04*, 07 04 01*, 07 04 03*, 07 04 04*, 07 05 01*, 07 05 03*, 07 05 04*, 07 06 01*, 07 06 03*, 07 06 04*, 07 07 01*, 07 07 03*, 07 07 04* 679 | Motor vehicles 16 01 04*, 16 01 06 680 | Moulding sand 10 09 05*, 10 09 06, 10 09 07*, 10 09 08, 10 10 05*, 10 10 06, 10 10 07*, 10 10 08, 10 12 06 681 | Moulds - calcium sulphate 10 09 05*, 10 09 06, 10 09 07*, 10 09 08, 10 10 05*, 10 10 06, 10 10 07*, 10 10 08, 10 12 06 682 | Moulds - plaster 10 09 05*, 10 09 06, 10 09 07*, 10 09 08, 10 10 05*, 10 10 06, 10 10 07*, 10 10 08, 10 12 06 683 | MSW combustion residue - heat recovery system ash 19 01 12, 19 01 13*, 19 01 14 684 | Mud (oil containing) 01 05 05* 685 | Mud - brine 01 05 08 686 | Mud - drilling 01 05 04, 01 05 05*, 01 05 06*, 01 05 07, 01 05 08 687 | Mud - red (Alumina) 01 03 09 688 | Munitions 16 04 01* 689 | N/o/s textiles 04 02 09, 04 02 21, 04 02 22, 15 01 09, 19 12 08, 20 01 10, 20 01 11 690 | Nappies (used) 18 01 03*, 18 01 04 691 | Nappy liners 18 01 03*, 18 01 04 692 | Napthalene 16 05 06*, 16 05 08* 693 | Needles (clinical) 18 01 01, 18 01 03*, 18 02 01, 18 02 02* 694 | Newspaper 03 03 08, 19 12 01, 20 01 01 695 | Nickel compounds 06 03 13*, 06 03 15*, 06 04 05*, 10 11 11* 696 | Nickel waste and scrap 17 04 07, 19 12 03, 20 01 40 697 | Nitrates 16 05 06*, 16 05 07* 698 | Nitric acid 06 01 05*, 11 01 05*, 11 01 06*, 20 01 14* 699 | Nitriles 16 05 06*, 16 05 07* 700 | Nitrites 16 05 06*, 16 05 07* 701 | Noils of wool 04 02 22, 19 12 08 702 | Non-chlorinated solvents (mixed) 14 06 03* 703 | Non-ferrous scrap metal 02 01 10, 12 01 03, 12 01 04, 15 01 04, 15 01 11*, 16 01 18, 17 04 07, 17 04 09*, 19 10 02, 19 12 03, 20 01 40 704 | Non-ferrous swarf 12 01 03 705 | Non-halogenated adhesives 08 04 09*, 08 04 10, 20 01 27*, 20 01 28 706 | Non-halogenated paint waste 08 01 11*, 08 01 12, 08 01 17*, 08 01 18, 20 01 27*, 20 01 28 707 | Non-halogenated sealants 08 04 09*, 08 04 10 708 | Nylon 04 02 22, 07 02 13, 15 01 09, 19 12 08, 20 01 11 709 | Offal 02 02 02 710 | Office paper 19 12 01, 20 01 01 711 | Oil (n/o/s) and water 13 04 01*, 13 04 02*, 13 04 03*, 13 05 06*, 13 05 07*, 16 07 08* 712 | Oil – acid cracking waste 05 01 12* 713 | Oil – bilge 13 04 01*, 13 04 02*, 13 04 03* 714 | Oil – contaminated 12 01 06*, 12 01 07*, 13 01 01* 715 | Oil – cooking 19 08 09*, 20 01 25 716 | Oil – cutting 12 01 08*, 12 01 09* 717 | Oil – engine 13 02 04*, 13 02 05*, 13 02 06*, 13 02 07*, 13 02 08* 718 | Oil – engine (chlorinated) 13 02 04* 719 | Oil – engine (non-chlorinated) 13 02 05* 720 | Oil – fuel 13 07 01* 721 | Oil – garage 13 02 04*, 13 02 05*, 13 02 06*, 13 02 07*, 13 02 08* 722 | Oil – gear 13 02 04*, 13 02 05*, 13 02 06*, 13 02 07*, 13 02 08* 723 | Oil – gear (non-chlorinated) 13 02 05* 724 | Oil – heat transfer (mineral) 13 03 06*, 13 03 07* 725 | Oil – heavy fuel 13 07 01* 726 | Oil – hydraulic 13 01 01*, 13 01 09*, 13 01 10*, 13 01 11*, 13 01 12*, 13 01 13* 727 | Oil – hydraulic (chlorinated) 13 01 09* 728 | Oil – hydraulic (containing PCBs) 13 01 01* 729 | Oil – hydraulic (non-chlorinated) 13 01 10* 730 | Oil – insulating (mineral) 13 03 06*, 13 03 07* 731 | Oil – insulating (synthetic) 13 03 08*, 13 03 09* 732 | Oil – insulating containing PCB or PCT 13 03 01* 733 | Oil – light fuel 13 07 01* 734 | Oil – lubricating 13 02 04*, 13 02 05*, 13 02 06*, 13 02 07*, 13 02 08* 735 | Oil – lubricating (chlorinated) 13 02 04* 736 | Oil – lubricating (non-chlorinated) 13 02 05* 737 | Oil – machine (halogenated) 12 01 06* 738 | Oil – machine (non-halogenated) 12 01 07* 739 | Oil – machine (synthetic) 12 01 10* 740 | Oil – mineral 12 01 06*, 12 01 07*, 13 01 09*, 13 01 10*, 13 02 04*, 13 02 05*, 13 03 06*, 13 03 07* 741 | Oil – mixed 13 01 13*, 13 02 08*, 13 03 10*, 13 07 03* 742 | Oil – refinery spillage 05 01 05* 743 | Oil – vegetable 02 03 04, 19 08 09*, 20 01 25 744 | Oil – wool 04 02 10 745 | Oil –disperse 08 03 19* 746 | Oil and n/o/s absorbents 15 02 02* 747 | Oil and sand (mixed) 15 02 02* 748 | Oil emulsions - non-chlorinated 12 01 09*, 13 01 05*, 13 08 02* 749 | Oil filters 16 01 07* 750 | Oil filters - used 16 01 07* 751 | Oil fly ash 10 01 04* 752 | Oil interceptor waste 13 05 03* 753 | Oil/water mixtures 13 04 01*, 13 04 02*, 13 04 03*, 13 05 07*, 16 07 08* 754 | Oils (miscible cutting) - water 12 01 08*, 12 01 09* 755 | Oily rags 15 02 02* 756 | Ordnance 16 04 01* 757 | Ore processing waste 01 03 07*, 01 03 08 758 | Organic acids (mixed) 16 05 06*, 16 05 08* 759 | Overburden 01 01 01, 01 01 02 760 | Oxalic acid 11 01 06* 761 | Packaging (mixed) - used 15 01 06, 15 01 10* 762 | Packaging - cardboard 15 01 01, 15 01 10* 763 | Packaging - contaminated (cleanable) 15 01 06, 15 01 10* 764 | Packaging - contaminated (not cleanable) 15 01 06, 15 01 10* 765 | Packaging - metal 15 01 04, 15 01 10*, 15 01 11* 766 | Packaging - paper 15 01 01, 15 01 10* 767 | Packaging - plastic 15 01 02, 15 01 10* 768 | Packaging - wooden 15 01 03, 15 01 10* 769 | Paint - aqueous suspensions 08 01 19*, 08 01 20 770 | Paint - halogenated 08 01 11*, 08 01 17*, 20 01 27* 771 | Paint - non-halogenated 08 01 11*, 08 01 12, 08 01 17*, 08 01 18, 20 01 27*, 20 01 28 772 | Paint - oil based 08 01 11*, 08 01 17*, 20 01 27* 773 | Paint - solvent based 08 01 11*, 08 01 17*, 20 01 27* 774 | Paint - solvent based 08 01 11*, 08 01 17*, 20 01 27* 775 | Paint - water based 08 01 12, 08 01 18, 20 01 28 776 | Paint coatings - PVC 08 01 11*, 08 01 17*, 20 01 27* 777 | Paint powders 08 01 12, 08 02 01, 20 01 28 778 | Paint remover 08 01 21* 779 | Paint sludge (water based) 08 01 15*, 08 01 16 780 | Paint spraying - gunwash 14 06 05* 781 | Paint thinner 14 06 03* 782 | Paint tins 15 01 02, 15 01 04, 15 01 10* 783 | Paints/Polyurethane (non-halogenated solvents) 08 01 11*, 08 01 12, 08 01 17*, 08 01 18, 20 01 27*, 20 01 28 784 | Pallets 15 01 03 785 | Paper 03 03 07, 03 03 08, 19 12 01, 20 01 01 786 | Paper - computer 19 12 01, 20 01 01 787 | Paper - fibre 03 03 10 788 | Paper - filter 15 02 02*, 15 02 03 789 | Paper - filter (contaminated) 15 02 02*, 15 02 03 790 | Paper - office 19 12 01, 20 01 01 791 | Paper - photographic 09 01 07, 09 01 08 792 | Paper and cardboard (mixed) 19 12 01, 20 01 01 793 | Paper containers 15 01 01, 15 01 10* 794 | Paper containers - contaminated 15 01 01, 15 01 10* 795 | Paper packaging 15 01 01, 15 01 10* 796 | Paper pulp 03 03 07, 03 03 10 797 | Paper pulp - de-inked 03 03 07, 03 03 10 798 | Paper sacks 15 01 01, 15 01 10*, 20 01 01 799 | Paper sludge 03 03 02, 03 03 05 800 | Paper towels (used) 18 01 03*, 18 01 04, 18 02 02*, 18 02 03, 20 01 01 801 | Paper wipes - contaminated 15 02 02*, 15 02 03, 18 01 03*, 18 01 04, 18 02 02*, 18 02 03, 20 01 01 802 | Paraffin 13 07 01* 803 | Paraffin - fuel 13 07 01* 804 | Paraffin wax 16 03 06 805 | Parks and garden waste 20 02 01, 20 02 02 806 | Parts - vehicle 16 01 08*, 16 01 09*, 16 01 21*, 16 01 22 807 | PCBs 13 01 01*, 13 03 01*, 16 01 09*, 16 02 09*, 16 02 10*, 17 09 02* 808 | Peat 10 01 03 809 | Pencils 19 12 07, 20 01 38 810 | Perchloroethylene 16 05 06*, 16 05 08* 811 | Perfume (reject) 16 03 06 812 | Permanganates 16 09 01* 813 | Peroxides - organic 16 09 03* 814 | Pesticide containers - metal 15 01 10* 815 | Pesticide containers - plastic 15 01 10* 816 | Pesticides 06 13 01*, 16 03 03*, 16 03 05*, 16 05 06*, 16 05 07*, 16 05 08*, 20 01 19* 817 | Petrol 13 07 02* 818 | Petrol and diesel (mixed) 13 07 03* 819 | Petroleum jelly 16 03 06 820 | Petroleum wax 16 03 06 821 | PFA 10 01 01, 10 01 14*, 10 01 15, 19 01 12 822 | Pharmaceutical products 18 01 08*, 18 01 09, 18 02 07*, 18 02 08, 20 01 31*, 20 01 32 823 | Pharmaceutical waste 07 05 01*, 07 05 03*, 07 05 04*, 07 05 07*, 07 05 08*, 07 05 09*, 07 05 10*, 07 05 11*, 07 05 12, 07 05 13*, 07 05 14, 18 01 08*, 18 01 09, 18 02 07*, 18 02 08, 20 01 31*, 20 01 32 824 | Phosphoric acid 06 01 04* 825 | Phosphorous acid 06 01 04* 826 | Phosphorus slag 06 09 02 827 | Photocopiers 16 02 13*, 16 02 14 828 | Photographic chemicals 09 01 01*, 09 01 02*, 09 01 03*, 09 01 04*, 09 01 05*, 09 01 06*, 09 01 13*, 20 01 17* 829 | Photographic paper 09 01 07, 09 01 08 830 | Pickling liquors (metal pickling) 11 01 05* 831 | Pigments 04 02 16*, 04 02 17 832 | Pigs 02 01 02, 02 02 02, 02 02 03 833 | Pipes (lead) 17 04 03, 19 12 03, 20 01 40 834 | Pitch 17 03 01*, 17 03 02, 17 03 03* 835 | Plant tissue 02 01 03, 02 01 07, 20 02 01 836 | Plastic bottles 15 01 02, 19 12 04 837 | Plastic containers 15 01 02, 19 12 04 838 | Plastic containers - contaminated 15 01 02, 15 01 10* 839 | Plastic film 02 01 04, 07 02 13, 15 01 02, 17 02 03, 19 12 04, 20 01 39 840 | Plastic gloves 20 01 39 841 | Plastic granules 07 02 13, 19 12 04 842 | Plastic packaging 15 01 02, 15 01 10*, 19 12 04 843 | Plastic pesticide containers 15 01 10* 844 | Plastic pipes 17 02 03 845 | Plastic plant pots 15 01 02, 20 01 39 846 | Plastic sheeting 02 01 04, 15 01 02, 17 02 03, 19 12 04, 20 01 39 847 | Plastic windows 17 02 03 848 | Plastic wrapping 02 01 04, 15 01 02, 17 02 03, 19 12 04, 20 01 39 849 | Plastics 02 01 04, 07 02 13, 12 01 05, 15 01 02, 16 01 19, 17 02 03, 17 02 04*, 19 12 04, 20 01 39 850 | Polishes (aerosol) 15 01 04, 15 01 10* 851 | Polyester 04 02 21, 04 02 22, 19 12 08, 20 01 11 852 | Polyester resins 07 02 13 853 | Polymer wastes 04 02 21, 07 02 13 854 | Polymerisation catalyst - phosphoric acid/silica base 16 08 05* 855 | Polymers - synthetic 04 02 21, 07 02 13 856 | Polypropylene 02 01 04, 07 02 13, 12 01 05, 15 01 02, 16 01 19, 17 02 03, 17 02 04*, 19 12 04, 20 01 39 857 | Polypropylene film 02 01 04, 15 01 02, 17 02 03, 19 12 04, 20 01 39 858 | Polysiloxanes (silicones) 07 02 16* 859 | Polystyrene 02 01 04, 07 02 13, 12 01 05, 15 01 02, 16 01 19, 17 02 03, 17 02 04*, 19 12 04, 20 01 39 860 | Polythene 02 01 04, 07 02 13, 12 01 05, 15 01 02, 16 01 19, 17 02 03, 17 02 04*, 19 12 04, 20 01 39 861 | Polythene sheets 02 01 04, 15 01 02, 17 02 03, 19 12 04, 20 01 39 862 | Polyurethane 02 01 04, 07 02 13, 12 01 05, 15 01 02, 16 01 19, 17 02 03, 17 02 04*, 19 12 04, 20 01 39 863 | Polyurethane resin 07 02 13 864 | Polyvinyl acetate 08 04 09*, 20 01 27* 865 | Polyvinyl alcohol 16 05 06*, 16 05 08* 866 | Polyvinyl chloride 07 02 13, 16 01 19, 17 02 03, 19 12 04, 20 01 39 867 | Potassium cyanide 06 03 11*, 11 03 01* 868 | Potassium hydroxide 06 02 04*, 20 01 15* 869 | Potatoes 02 03 04, 20 01 08 870 | Pottery 10 12 08 871 | Poultry waste 02 01 02, 02 02 02, 02 02 03, 20 01 08 872 | Powders - paint 08 01 12, 08 02 01, 20 01 28 873 | Precious metal bearing catalysts 16 08 01 874 | Precious metal dust 10 07 04 875 | Preservatives 02 03 02, 02 06 02, 03 02 01*, 03 02 02*, 03 02 03*, 03 02 04*, 03 02 05*, 03 02 99, 06 13 01* 876 | Preserving agents 02 03 02, 02 06 02 877 | Primary sludge 19 08 05, 19 08 11*, 19 08 12 878 | Printed circuit boards 16 02 15*, 16 02 16 879 | Processed textile fibres - synthetic 04 02 22, 19 12 08, 20 01 11 880 | PTFE 07 02 13, 16 01 19, 17 02 03, 19 12 04, 20 01 39 881 | PVC 07 02 13, 16 01 19, 17 02 03, 19 12 04, 20 01 39 882 | Pyrotechnics 16 04 02* 883 | Quarry spoil 01 01 01, 01 01 02 884 | Quicklime 10 13 04 885 | Radio sets 16 02 14 886 | Rags (used) 15 02 02*, 15 02 03 887 | Rags - contaminated (solvent) 15 02 02*, 15 02 03 888 | Rags - oily 15 02 02*, 15 02 03 889 | Rails (iron and steel) - used 17 04 05 890 | Railway ballast 17 05 07*, 17 05 08 891 | Railway carriages 16 01 04*, 16 01 06 892 | Railway sleepers (concrete) 17 01 01 893 | Railway sleepers (timber) 17 02 01 894 | Red mud (Alumina) 01 03 09 895 | Refractories from combustion 16 11 01*, 16 11 02, 16 11 03*, 16 11 04, 16 11 05*, 16 11 06 896 | Refrigerants - CFC 14 06 01*, 16 02 11*, 20 01 23* 897 | Refrigerants - HCFCs 14 06 01*, 16 02 11*, 20 01 23* 898 | Refrigerants - HFCs 14 06 01*, 16 02 11*, 20 01 23* 899 | Refrigerators 16 02 11*, 16 02 14 900 | Residue - shot blast 12 01 16*, 12 01 17 901 | Residues - additive tank cleaning 16 07 09*, 16 07 99 902 | Resin - polyurethane 07 02 13 903 | Resin-reinforced glass fibre products 10 11 03, 16 01 20, 17 02 02, 17 02 04* 904 | Resins - acrylic polymer 07 02 13 905 | Resins - epoxy 08 04 09*, 08 04 10, 08 04 11*, 08 04 12 906 | Resins - polyester 07 02 13 907 | Resins - polyester saturated 07 02 13 908 | Resins - polyurethane 07 02 13 909 | Resins - styrene polymer 07 02 13 910 | Resins - vinyl acetate polymer 07 02 13 911 | Rhenium waste and scrap 16 08 01 912 | Road metal 10 02 02, 17 01 07 913 | Road sweepings 20 03 03 914 | Road tanker washings 16 07 08*, 16 07 09* 915 | Rock - crushed 01 04 08, 17 05 03*, 17 05 04 916 | Rock - excavated 01 04 08, 17 05 03*, 17 05 04 917 | Rubber (not including tyres) 07 02 13, 19 12 04 918 | Rubber adhesive 08 04 09*, 08 04 10, 20 01 27*, 20 01 28 919 | Rubber and fibre additives 07 02 14*, 07 02 15 920 | Rubber granules 07 02 13, 19 12 04 921 | Rubble 17 01 07 922 | Rubble - contaminated 17 09 03*, 17 09 04 923 | Sacks - contaminated 15 01 10* 924 | Sacks - hessian 15 01 09 925 | Sacks - paper 15 01 01 926 | Sacks - woven 15 01 09 927 | Safety barriers (metal) 17 04 07, 19 12 02 928 | Sand 01 04 09, 10 01 24, 17 05 03*, 17 05 04, 19 01 19, 19 12 09 929 | Sand - contaminated 17 09 03* 930 | Sand and oil (mixed) 15 02 02* 931 | Sanitary towels (used) 18 01 03*, 18 01 04 932 | Sawdust 03 01 04*, 03 01 05 933 | Sawdust - contaminated 03 01 04*, 03 01 05 934 | Sawdust and oil (mixed) 15 02 02* 935 | Scrap aluminium 02 01 10, 12 01 03, 12 01 04, 15 01 04, 16 01 18, 17 04 02, 19 10 02, 19 12 03, 20 01 40 936 | Scrap metal 02 01 10, 12 01 01, 12 01 02, 12 01 03, 12 01 04, 15 01 04, 15 01 11*, 16 01 17, 16 01 18, 17 04 05, 17 04 07, 17 04 09*, 19 01 02, 19 10 01, 19 10 02, 19 12 02, 19 12 03, 20 01 40 937 | Scrap metal (mixed) 02 01 10, 12 01 01, 12 01 02, 12 01 03, 12 01 04, 15 01 04, 15 01 11*, 16 01 17, 16 01 18, 17 04 05, 17 04 07, 17 04 09*, 19 01 02, 19 10 01, 19 10 02, 19 12 02, 19 12 03, 20 01 40 938 | Scrap metal - ferrous 02 01 10, 12 01 01, 12 01 02, 15 01 04, 16 01 17, 17 04 05, 17 04 09*, 19 01 02, 19 10 01, 19 12 02, 20 01 40 939 | Scrap metal - mechanical parts 16 02 10*, 16 02 11*, 16 02 12*, 16 02 13*, 16 02 14, 16 02 15*, 16 02 16 940 | Scrap metal - mixed ferrous and non-ferrous 02 01 10, 12 01 01, 12 01 02, 12 01 03, 12 01 04, 15 01 04, 15 01 11*, 16 01 17, 16 01 18, 17 04 05, 17 04 07, 17 04 09*, 19 01 02, 19 10 01, 19 10 02, 19 12 02, 19 12 03, 20 01 40 941 | Scrap metal - non-ferrous 02 01 10, 12 01 03, 12 01 04, 15 01 04, 15 01 11*, 16 01 18, 17 04 07, 17 04 09*, 19 10 02, 19 12 03, 20 01 40 942 | Scrap television tubes 10 11 11*, 16 02 13*, 19 12 11*, 20 01 21* 943 | Scrap zinc 10 05 10*, 10 05 11, 11 05 01, 17 04 04, 19 12 03 944 | Screens - computer 10 11 11*, 16 02 13*, 19 12 11*, 20 01 21* 945 | Sealant n/o/s 08 04 09*, 08 04 10, 20 01 27*, 20 01 28 946 | Sealants - halogenated 08 04 09*, 20 01 27* 947 | Secondary sludge 19 08 05, 19 08 11*, 19 08 12, 19 08 13*, 19 08 14 948 | Selenium compounds 06 03 13*, 06 03 15*, 06 04 05* 949 | Septic tank sludge 20 03 04 950 | Settees 20 03 07 951 | Settled sludge 04 01 06, 04 01 07, 04 02 19*, 04 02 20, 05 01 09*, 05 01 10, 06 05 02*, 06 05 03, 07 01 11*, 07 01 12, 07 02 11*, 07 02 12, 07 03 11*, 07 03 12, 07 04 11*, 07 04 12, 07 05 11*, 07 05 12, 07 06 11*, 07 06 12, 07 07 11*, 07 07 12, 10 01 20*, 10 01 21, 19 02 05*, 19 02 06, 19 08 05, 19 08 11*, 19 08 12, 19 08 13*, 19 08 14, 19 09 02, 19 09 03, 19 11 05*, 19 11 06, 20 03 04 952 | Sewage 19 08 01, 19 08 05, 19 08 11*, 19 08 12 953 | Sewage sludge 19 08 01, 19 08 05, 19 08 11*, 19 08 12 954 | Sewage sludge - digested 19 08 01, 19 08 05, 19 08 11*, 19 08 12 955 | Shampoo and other hair products 20 01 30 956 | Sharps - animal treatment 18 02 01 957 | Sharps - human treatment 18 01 01 958 | Shavings - wood 03 01 04*, 03 01 05 959 | Sheep 02 01 02 960 | Sheep 02 01 02, 02 02 02, 02 02 03 961 | Shellfish processing waste 02 02 03 962 | Ships 16 01 04*, 16 01 06 963 | Shoddy 04 02 22, 19 12 08 964 | Shopping trolleys 20 01 40 965 | Shotblast residue 12 01 16*, 12 01 17 966 | Silk waste 04 02 22, 15 01 09, 19 12 08, 20 01 11 967 | Silt 17 05 05*, 17 05 06 968 | Silt – contaminated 17 05 05*, 17 05 06 969 | Silver - scrap 09 01 06*, 09 01 07, 09 01 13* 970 | Silver compounds 09 01 06*, 09 01 07, 09 01 13* 971 | Silver dross (thermal metallurgy) 10 07 02 972 | Silver skimmings (thermal metallurgy) 10 07 02 973 | Silver slags 10 07 01 974 | Skimmings - copper (thermal metallurgy) 10 06 02 975 | Skins - animal 02 01 02, 02 02 02, 04 01 01 976 | Skip waste (mixed) 17 09 04, 20 03 01 977 | Slag - blast furnace 10 02 01, 10 02 02 978 | Slag – furnace 10 02 01, 10 02 02 979 | Slag from iron and steel manufacture 10 02 01, 10 02 02 980 | Slags - aluminium 10 03 04*, 10 03 08* 981 | Slags - n/o/s 10 01 01, 10 01 14*, 10 01 15 982 | Slags - zinc 10 05 01 983 | Slaked lime (calcium hydroxide) 06 02 01*, 10 13 04 984 | Slate 01 01 02, 01 04 08 985 | Sleepers - railway (timber) 17 02 01, 17 02 04* 986 | Sludge - biological dewatered effluent treatment 02 02 04, 02 03 05, 02 04 03, 02 05 02, 02 06 03, 02 07 05, 03 03 11, 04 01 06, 04 01 07, 04 02 19*, 04 02 20, 05 01 09*, 05 01 10, 06 05 02*, 06 05 03, 07 01 11*, 07 01 12, 07 02 11*, 07 02 12, 07 03 11*, 07 03 12, 07 04 11*, 07 04 12, 07 05 11*, 07 05 12, 07 06 11*, 07 06 12, 07 07 11*, 07 07 12, 10 01 20*, 10 01 21, 10 11 19*, 10 11 20, 10 12 13, 19 11 05*, 19 11 06 987 | Sludge - contaminated 04 02 19*, 05 01 02*, 05 01 03*, 05 01 04*, 05 01 06*, 05 01 09*, 06 05 02*, 06 05 03, 06 07 03*, 07 01 11*, 07 02 11*, 07 03 11*, 07 04 11*, 07 05 11*, 07 06 11*, 07 07 11*, 08 01 13*, 08 01 15*, 08 03 14*, 08 04 11*, 08 04 13*, 10 01 20*, 10 01 22*, 10 02 13*, 10 03 25*, 10 04 07*, 10 05 06*, 10 06 07*, 10 08 17*, 10 11 13*, 10 11 17*, 11 01 08*, 11 01 09*, 11 01 15*, 11 02 02*, 12 01 14*, 12 01 18*, 13 05 02*, 13 05 03*, 13 08 01*, 14 06 04*, 14 06 05*, 19 02 05*, 19 08 07*, 19 08 11*, 19 08 13*, 19 11 05* 988 | Sludge - crude oil desalter 05 01 02*, 13 08 01* 989 | Sludge - ferric 10 02 13*, 10 02 14, 10 02 15 990 | Sludge - grinding 10 11 13*, 12 01 18* 991 | Sludge - primary 19 08 05, 19 08 11*, 19 08 12 992 | Sludge - secondary 19 08 05, 19 08 11*, 19 08 12, 19 08 13*, 19 08 14 993 | Sludge - settled 04 01 06, 04 01 07, 04 02 19*, 04 02 20, 05 01 09*, 05 01 10, 06 05 02*, 06 05 03, 07 01 11*, 07 01 12, 07 02 11*, 07 02 12, 07 03 11*, 07 03 12, 07 04 11*, 07 04 12, 07 05 11*, 07 05 12, 07 06 11*, 07 06 12, 07 07 11*, 07 07 12, 10 01 20*, 10 01 21, 19 02 05*, 19 02 06, 19 08 05, 19 08 11*, 19 0812, 19 08 13*, 19 08 14, 19 09 02, 19 09 03, 19 11 05*, 19 11 06, 20 03 04 994 | Sludge - sewage 19 08 01, 19 08 05, 19 08 11*, 19 08 12 995 | Sludge - waste water treatment 19 08 01, 19 08 05, 19 08 11*, 19 08 12 996 | Sludge from settling tanks and interceptors 13 05 03* 997 | Soap 16 03 05* 998 | Sodium chloride 01 01 02 999 | Sodium cyanide 06 03 11*, 11 03 01* 1000 | Sodium hydroxide 06 02 04* 1001 | Sodium hypochlorite 16 09 04* 1002 | Sodium lamps 16 02 13* 1003 | Soil 02 04 01, 17 05 03*, 17 05 04, 20 02 02 1004 | Soil – contaminated 17 05 03*, 17 05 04 1005 | Soil and stones (mixed) 17 05 03*, 17 05 04, 20 02 02 1006 | Soil from vegetable washing 02 04 01 1007 | Soiled dressings 18 01 03*, 18 01 04, 18 02 02*, 18 02 03 1008 | Soiled swabs 18 01 03*, 18 01 04, 18 02 02*, 18 02 03 1009 | Solvent contaminated rags 15 02 02* 1010 | Solvent extraction waste 02 03 03 1011 | Solvent-based adhesives 08 04 09*, 20 01 27* 1012 | Solvent-based photographic developer 09 01 03* 1013 | Solvents - chlorinated (mixed) 14 06 02* 1014 | Solvents - non-chlorinated (mixed) 14 06 03* 1015 | Solvents and thinners (mixed) 14 06 02*, 14 06 03* 1016 | Soot 06 13 05* 1017 | Spray booth waste (paint) 08 01 11*, 08 01 12, 08 01 13*, 08 01 14 1018 | Stainless steel waste and scrap 02 01 10, 12 01 01, 12 01 02, 15 01 04, 16 01 17, 17 04 05, 17 04 09*, 19 01 02, 19 10 01, 19 12 02, 20 01 40 1019 | Steel 02 01 10, 12 01 01, 12 01 02, 15 01 04, 16 01 17, 17 04 05, 17 04 09*, 19 01 02, 19 10 01, 19 12 02, 20 01 40 1020 | Steel (of reinforced concrete) 17 04 05, 19 10 01, 19 12 02, 20 01 40 1021 | Steel - scrap 02 01 10, 12 01 01, 12 01 02, 15 01 04, 16 01 17, 17 04 05, 17 04 09*, 19 01 02, 19 10 01, 19 12 02, 20 01 40 1022 | Steel cans 15 01 04 1023 | Steel cladding 02 01 10, 12 01 01, 12 01 02, 15 01 04, 16 01 17, 17 04 05, 17 04 09*, 19 01 02, 19 10 01, 19 12 02, 20 01 40 1024 | Steel drums 15 01 04, 15 01 10* 1025 | Steel pipes 17 04 05, 17 04 09*, 20 01 40 1026 | Steel wool 17 04 05, 17 04 09*, 19 12 02, 20 01 40 1027 | Stoma bags (used) 18 01 03*, 18 01 04 1028 | Stone 01 04 13, 17 05 03*, 17 05 04, 19 12 09, 20 02 02 1029 | Stone cutting dust 01 04 07*, 01 04 13 1030 | Stone cutting powder 01 04 07*, 01 04 13 1031 | Straw 02 01 06 1032 | Street sweepings 20 03 03 1033 | Strippings using methylene chloride 08 01 17*, 08 01 18 1034 | Styrene 16 03 05* 1035 | Sub soil 17 05 03*, 17 05 04, 20 02 02 1036 | Sulphides 01 03 04*, 06 06 02*, 06 06 03 1037 | Sulphur 05 01 16, 05 07 02 1038 | Sulphuric acid 06 01 01*, 10 01 09*, 20 01 14* 1039 | Surfactant - ethoxylated alkyl 20 01 29*, 20 01 30 1040 | Swabs - soiled 18 01 03*, 18 01 04, 18 02 02*, 18 02 03 1041 | Swarf (non-ferrous) 12 01 03, 12 01 04 1042 | Swarf - metal 12 01 01, 12 01 02, 12 01 03, 12 01 04 1043 | Sweepings - floor 20 03 01 1044 | Synthetic fibre waste 04 02 22, 15 01 09, 19 12 08, 20 01 11 1045 | Syringes 18 01 01, 18 02 01 1046 | Tailings - metalliferous minerals 01 03 04*, 01 03 05*, 01 03 06 1047 | Tampons 18 01 03*, 18 01 04 1048 | Tank cleaning residue 16 07 08*, 16 07 09*, 16 07 99 1049 | Tanning sludge 04 01 04, 04 01 05, 04 01 06, 04 01 07 1050 | Tar residues 05 01 07*, 05 01 08*, 05 06 01*, 05 06 03*, 10 03 17*, 10 08 12*, 17 03 01*, 17 03 03* 1051 | Tarmacadam 17 03 01*, 17 03 02 1052 | Tea 02 03 04 1053 | Telephones 16 02 14 1054 | Television sets 16 02 13*, 16 02 14 1055 | Television tubes (scrap) 16 02 15* 1056 | Textile - finishing waste 04 01 09, 04 02 14*, 04 02 15 1057 | Textile fibres (processed) - animal 04 02 22, 15 01 09, 19 12 08, 20 01 11 1058 | Textile fibres (processed) - mixed 04 02 22, 15 01 09, 19 12 08, 20 01 11 1059 | Textile fibres (processed) - synthetic 04 02 22, 15 01 09, 19 12 08, 20 01 11 1060 | Textile fibres (processed) - vegetable 04 02 22, 15 01 09, 19 12 08, 20 01 11 1061 | Textile fibres (unprocessed) - animal 04 02 21 1062 | Textile fibres (unprocessed) - mixed 04 02 21 1063 | Textile fibres (unprocessed) - synthetic 04 02 21 1064 | Textiles (oiled) 15 02 02* 1065 | Textiles - cotton 04 02 22, 15 01 09, 19 12 08, 20 01 11 1066 | Textiles - woollen 04 02 22, 15 01 09, 19 12 08, 20 01 11 1067 | Textiles n/o/s 04 02 22, 15 01 09, 19 12 08, 20 01 11 1068 | Thermosetting plastics 07 02 13 1069 | Thinner - paint 14 06 03* 1070 | Tiles (floor) - ceramic 10 12 08, 17 01 03, 17 01 06*, 19 12 09 1071 | Tiles (floor) - slate 10 12 08, 17 01 03, 17 01 06*, 19 12 09 1072 | Tiles (roof) - clay 10 12 08, 17 01 03, 17 01 06*, 19 12 09 1073 | Tiles (roof) - slate 10 12 08, 17 01 03, 17 01 06*, 19 12 09 1074 | Timber - treated 03 01 04*, 17 02 04*, 19 12 06*, 20 01 37* 1075 | Timber - untreated 03 01 05, 15 01 03, 17 02 01, 19 12 07, 20 01 38 1076 | Tin – scrap 17 04 06, 19 12 03, 20 01 40 1077 | Tin compounds 06 03 13*, 06 03 15*, 06 04 05* 1078 | Tin waste and scrap 17 04 06, 19 12 03, 20 01 40 1079 | Tins - paint 15 01 02, 15 01 04, 15 01 10* 1080 | Tissue - human 18 01 02, 18 01 03* 1081 | Tissue - plant 02 01 03, 02 01 07, 20 02 01 1082 | Tissues 03 03 08, 15 01 01, 19 12 01, 20 01 01 1083 | Tissues and rags - contaminated 15 02 02*, 15 02 03 1084 | Titanium filter cake 06 11 01 1085 | Tobacco - processed 02 03 04 1086 | Tobacco - unprocessed 02 03 01, 02 03 04 1087 | Toilet - chemical waste 20 03 04 1088 | Toluene 14 06 03*, 16 05 06*, 16 05 08* 1089 | Toner cartridges 08 03 17*, 08 03 18 1090 | Toothbrushes - disposable 07 02 13, 20 01 39 1091 | Top soil 02 04 01, 17 05 04, 20 02 02 1092 | Towels (paper) - used 15 02 02*, 15 02 03, 18 01 03*, 18 01 04, 18 02 02*, 18 02 03 1093 | Toys 20 01 39, 20 01 40, 20 03 07 1094 | Transformers (with PCBs or PCTs) 16 02 09* 1095 | Transformers (without PCBs or PCTs) 16 02 13*, 16 02 14 1096 | Transformers with oil cooling systems 16 02 13* 1097 | Transition metal catalysts 16 08 01, 16 08 02*, 16 08 03 1098 | Trees 02 01 03, 02 01 07, 20 02 01 1099 | Tributyltin waste 03 02 03* 1100 | Trichlorethane 14 06 02* 1101 | Trichloroethylene 14 06 02* 1102 | Trichlorotrifluoroethylene 14 06 01* 1103 | Trimmings - hedge and tree 20 02 01 1104 | Trolleys - shopping 20 01 40 1105 | Tubes - fluorescent 20 01 21* 1106 | Tubes - fluorescent (crushed) 20 01 21* 1107 | Tubes - lighting 20 01 21* 1108 | Tubes - sodium vapour 16 02 13* 1109 | Tubes/lamps - mercury vapour 20 01 21* 1110 | Turpentine 14 06 03* 1111 | TVs 16 02 13*, 16 02 14 1112 | Tyres - intact 16 01 03 1113 | Tyres - shredded 16 01 03, 19 12 04 1114 | UPVC cut-offs 17 02 03 1115 | Used stoma bags 18 01 03*, 18 01 04 1116 | UV curing inks 08 03 12*, 08 03 13, 20 01 27*, 20 01 28 1117 | Vacuum cleaners 16 02 14 1118 | Vanadium compounds 06 03 13*, 06 03 15*, 06 04 05* 1119 | Vanadium pentoxide catalyst 16 08 02* 1120 | Varnish 08 01 11*, 08 01 12, 08 01 17*, 08 01 18 1121 | Varnish - halogenated 08 01 11*, 08 01 17* 1122 | varnish remover 08 01 21* 1123 | Vegetable oil 19 08 09*, 20 01 25 1124 | Vegetable oil and water 19 08 09*, 20 01 25 1125 | Vegetable waste 02 01 03, 02 03 04, 20 01 08 1126 | Vegetation 02 01 03, 20 02 01 1127 | Vehicle brake shoes - asbestos 16 01 11* 1128 | Vehicle components 16 01 08*, 16 01 09*, 16 01 10*, 16 01 21*, 16 01 22 1129 | Vehicle parts 16 01 08*, 16 01 09*, 16 01 10*, 16 01 21*, 16 01 22 1130 | Vehicles - cars 16 01 04*, 16 01 06 1131 | Vehicles - commercial 16 01 04*, 16 01 06 1132 | Vehicles - lorries 16 01 04*, 16 01 06 1133 | Vehicles - motor 16 01 04*, 16 01 06 1134 | Vermiculite 01 04 09, 17 05 04, 20 02 02 1135 | Vermin 18 02 02*, 18 02 03 1136 | Video recorders 16 02 14 1137 | Vinyl acetate 16 03 05* 1138 | Vinyl chloride resins 07 02 13, 17 02 03, 19 12 04 1139 | Visual display units 16 02 15* 1140 | Vitreous enamels 10 11 12, 17 02 02, 19 12 05, 20 01 02 1141 | Vitrified ash 19 04 02* 1142 | Washing machines 16 02 14 1143 | Washing waste - food 02 01 01, 02 02 01, 02 03 01, 02 04 01, 02 07 01 1144 | Washings - agrochemical containers 02 01 08*, 02 01 09, 15 01 10*, 16 07 09* 1145 | Waste from markets 20 03 02 1146 | Waste water treatment sludge 19 08 01, 19 08 05, 19 08 11*, 19 08 12 1147 | Water heater elements 17 04 01, 17 04 05 1148 | Water-based adhesives 08 04 10, 20 01 28 1149 | Water/oil mixtures 10 02 11*, 10 03 27*, 10 04 09*, 10 05 08*, 10 06 09*, 10 07 07*, 10 08 19*, 13 04 01*, 13 04 02*, 13 04 03*, 13 05 02*, 13 05 07*, 16 07 08*, 19 08 09*, 19 08 10*, 19 11 03* 1150 | Wax - paraffin 20 01 26* 1151 | Wax - petroleum 16 03 06 1152 | Waxes and fats 12 01 12* 1153 | Weeds 02 01 03, 20 02 01 1154 | Welding waste 12 01 13 1155 | White spirit 14 06 03* 1156 | Windows (metal) 17 04 02, 17 04 07 1157 | Windscreens 16 01 20 1158 | Wire (galvanised coated) soft and hard drawn 17 04 10*, 17 04 11 1159 | Wire (plastic coated) soft and hard drawn 17 04 10*, 17 04 11 1160 | Wire - electrical 17 04 10*, 17 04 11 1161 | Wood 02 01 03, 02 01 07, 03 01 04*, 03 01 05, 03 03 01, 15 01 03, 17 02 01, 17 02 04*, 19 12 06*, 19 12 07, 20 01 37*, 20 01 38, 20 02 01 1162 | Wood cuttings 02 01 03, 02 01 07, 03 01 04*, 03 01 05, 03 03 01, 17 02 01, 17 02 04*, 19 12 06*, 19 12 07, 20 01 37*, 20 01 38, 20 02 01 1163 | Wood preservatives - organometallic 03 02 03* 1164 | Wooden containers - contaminated 15 01 03, 15 01 10* 1165 | Wool 04 02 22, 15 01 09, 19 12 08, 20 01 11 1166 | Wool grease 04 02 10 1167 | Wool scouring sludge 04 02 10, 04 02 19* 1168 | X-ray equipment 16 02 13*, 16 02 14 1169 | Xylene 14 06 03*, 16 05 06*, 16 05 08* 1170 | Yeast 02 06 01 1171 | Yoghurt 02 05 01 1172 | Zinc - scrap 11 05 01, 12 01 03, 12 01 04, 17 04 04, 19 12 03, 20 01 40 1173 | Zinc ashes and residues 11 05 02 1174 | Zinc blast furnace slag 10 05 01 1175 | Zinc compounds 06 03 13*, 06 03 15*, 06 04 05*, 10 11 11* 1176 | Zinc dross (thermal metallurgy) 10 05 10*, 10 05 11 1177 | Zinc slags 10 05 01 1178 | Zinc waste and scrap 11 05 01, 12 01 03, 12 01 04, 17 04 04, 19 12 03, 20 01 40 1179 | Zirconia 16 08 03 1180 | Zirconium compounds 06 03 13*, 06 03 15*, 06 04 05* 1181 | -------------------------------------------------------------------------------- /CodeLinkR/inst/concordances.yaml: -------------------------------------------------------------------------------- 1 | concordances: 2 | - name: 'CN_to_CPA' 3 | versions: 4 | - classification1: 'CN/2016' 5 | classification2: 'CPA/2008' 6 | url: http://ec.europa.eu/eurostat/ramon/other_documents/combined%20nomenclature/conversion_tables/CN_CPA2008_2016.zip 7 | dataFile: CN_CPA2008_2016.xls 8 | colnames: 'Code1,Code2,START,END' 9 | - name: 'CN_to_SITC' 10 | versions: 11 | - classification1: 'CN/2016' 12 | classification2: 'SITC/4' 13 | url: http://ec.europa.eu/eurostat/ramon/other_documents/combined%20nomenclature/conversion_tables/CN_SITC_2016.zip 14 | dataFile: CN_SITC_2016.xls 15 | colnames: 'Code1,Code2,START,END' 16 | - name: 'ISIC_to_ISIC' 17 | versions: 18 | - classification1: 'ISIC/3.1' 19 | classification2: 'ISIC/4' 20 | url: http://unstats.un.org/unsd/cr/downloads/ISIC31-ISIC4.zip 21 | dataFile: ISIC31_ISIC4.txt 22 | colnames: 'Code1,Partial1,Code2,Partial2,Detail' 23 | - classification1: 'ISIC/3.1' 24 | classification2: 'ISIC/3' 25 | url: http://unstats.un.org/unsd/cr/downloads/ISIC31-ISIC3.zip 26 | dataFile: ISIC_Rev_31-ISIC_Rev_3_correspondence.txt 27 | colnames: 'Code1,Partial1,Code2,Partial2,Detail' 28 | - name: 'NAICS_to_ISIC' 29 | versions: 30 | - classification1: 'NAICS/2012' 31 | classification2: 'ISIC/4' 32 | url: http://www.census.gov/eos/www/naics/concordances/2012_NAICS_to_ISIC_4.xls 33 | dataFile: 2012_NAICS_to_ISIC_4.xls 34 | colnames: 'Code1,Title1,Code2,Title2,Note' 35 | - name: 'NACE_to_ISIC' 36 | versions: 37 | - classification1: 'NACE/2' 38 | classification2: 'ISIC/4' 39 | url: http://ec.europa.eu/eurostat/ramon/relations/index.cfm?TargetUrl=ACT_OTH_REL_DLD&StrNomRelCode=NACE%20REV.%202%20-%20ISIC%20REV.%204&StrLanguageCode=EN&StrFormat=CSV 40 | dataFile: 'NACE2_to_ISIC4.csv' 41 | colnames: 'Code1,Code2' 42 | - name: 'HS_to_ISIC' 43 | versions: 44 | - classification1: 'HS/2012' 45 | classification2: 'ISIC/3' 46 | url: http://wits.worldbank.org/data/public/concordance/Concordance_HS_to_I3.zip 47 | dataFile: 'JobID-64_Concordance_HS_to_I3.CSV' 48 | colnames: 'Code1,Description1,Code2,Description2' 49 | - name: 'HS_to_SITC' 50 | versions: 51 | - classification1: 'HS/2012' 52 | classification2: 'SITC/4' 53 | url: http://unstats.un.org/unsd/trade/conversions/HS%202012%20to%20SITC%20Rev.4%20Correlation%20and%20conversion%20tables.xls 54 | dataFile: 'HS%202012%20to%20SITC%20Rev.4%20Correlation%20and%20conversion%20tables.xls' 55 | colnames: 'Code1,Code2,Relationship' 56 | - classification1: 'HS/2012' 57 | classification2: 'SITC/3' 58 | url: http://unstats.un.org/unsd/trade/conversions/HS%202012%20to%20SITC3%20Correlation%20and%20conversion%20tables.xls 59 | dataFile: 'HS%202012%20to%20SITC3%20Correlation%20and%20conversion%20tables.xls' 60 | colnames: 'Code1,Code2,Relationship' 61 | - name: 'NACE_to_NAICS' 62 | versions: 63 | - classification1: 'NACE/2' 64 | classification2: 'NAICS/2012' 65 | url: http://ec.europa.eu/eurostat/ramon/documents/NACE_REV2-US_NAICS_2012.zip 66 | dataFile: NACE_REV2-US_NAICS_2012.xls 67 | colnames: 'Code1,Name1,Code2,Name2,Notes' 68 | - name: 'ISIC_to_CPC' 69 | versions: 70 | - classification1: 'ISIC/4' 71 | classification2: 'CPC/2.1' 72 | url: http://unstats.un.org/unsd/cr/downloads/ISIC4_CPCv21.zip 73 | dataFile: isic4-cpc21.txt 74 | colnames: 'Code1,Code1Partial,Code2,Code2Partial' 75 | -------------------------------------------------------------------------------- /CodeLinkR/inst/python/Turtle2Neo4j.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Mon Jul 18 09:01:52 2016 4 | 5 | @author: cbdavis 6 | """ 7 | 8 | import csv 9 | 10 | 11 | import glob 12 | from rdflib import Graph 13 | 14 | prefixes = """ 15 | PREFIX rdfs: 16 | PREFIX rdf: 17 | PREFIX skos: 18 | """ 19 | 20 | turtleFiles = glob.glob('/home/cbdavis/Desktop/svn/what-links-to-what/CodeLinkR/data/Turtle/*.turtle') 21 | 22 | g = Graph() 23 | for turtleFile in turtleFiles: 24 | print turtleFile 25 | g.load(turtleFile, format="turtle") 26 | 27 | ################# Bulk import Neo4j ################# 28 | 29 | query_result = g.query(prefixes + 30 | """ 31 | select * where { 32 | ?x rdf:type skos:Concept . 33 | OPTIONAL {?x skos:notation ?notation} . 34 | OPTIONAL {?x skos:description ?description} . 35 | OPTIONAL {?x skos:prefLabel ?prefLabel} . 36 | OPTIONAL {?x skos:altLabel ?altLabel} . 37 | OPTIONAL {?x skos:example ?example} . 38 | OPTIONAL {?x skos:scopeNote ?scopeNote} . 39 | } 40 | """) 41 | 42 | with open('/home/cbdavis/Desktop/neo4j_skos_concepts.csv', 'wb') as csvfile: 43 | neo4jwriter = csv.writer(csvfile, delimiter=',', quotechar='"', quoting=csv.QUOTE_MINIMAL) 44 | 45 | headerValues = ['conceptId:ID', 'notation:string', 'description:string', 'prefLabel:string', 'altLabel:string', 'example:string', 'scopeNote:string', ':LABEL'] 46 | neo4jwriter.writerow(headerValues) 47 | 48 | for row in query_result: 49 | rowValues = [row['x'], row['notation'], row['description'], row['prefLabel'], row['altLabel'], row['example'], row['scopeNote'], 'Concept'] 50 | rowValues = ['' if x is None else str(x.encode('utf-8')) for x in rowValues] 51 | rowValues[0] = '`' + rowValues[0] + '`' 52 | neo4jwriter.writerow(rowValues) 53 | 54 | 55 | query_result = g.query(prefixes + """ 56 | select ?x where { 57 | ?x rdf:type skos:ConceptScheme . 58 | } 59 | """) 60 | 61 | with open('/home/cbdavis/Desktop/neo4j_skos_concept_schemes.csv', 'wb') as csvfile: 62 | neo4jwriter = csv.writer(csvfile, delimiter=',', quotechar='"', quoting=csv.QUOTE_MINIMAL) 63 | 64 | headerValues = ['conceptId:ID', ':LABEL'] 65 | neo4jwriter.writerow(headerValues) 66 | 67 | for row in query_result: 68 | rowValues = [str(row['x'].encode('utf-8')), 'ConceptScheme'] 69 | #rowValues = ['' if x is None else str(x.encode('utf-8')) for x in rowValues] 70 | rowValues[0] = '`' + rowValues[0] + '`' 71 | neo4jwriter.writerow(rowValues) 72 | 73 | 74 | # these are the relations we want to look for 75 | # querying rdflib is very slow for some queries, helps to be as specific as possible 76 | relations = ['skos:broader', 'skos:narrower', 'skos:narrowMatch', 'skos:broadMatch', 'skos:exactMatch', 'skos:relatedMatch'] 77 | filename = '/home/cbdavis/Desktop/neo4j_rels.csv' 78 | 79 | # write header, will erase any previous values 80 | with open(filename, 'wb') as csvfile: 81 | neo4jwriter = csv.writer(csvfile, delimiter=',', quotechar='"', quoting=csv.QUOTE_MINIMAL) 82 | 83 | headerValues = [':START_ID', ':END_ID', ':TYPE'] 84 | neo4jwriter.writerow(headerValues) 85 | 86 | for relation in relations: 87 | print relation 88 | 89 | # check that we're linking to something that is a skos:Concept 90 | # this avoids import errors later 91 | # what's not clear are entries like this: 92 | # CN CPA_2008 START END 93 | # 85421134 261130 01/01/1995 31/12/1995 94 | # this appears to be an old CN code, it's not in the 2015 or 2016 documentation 95 | 96 | query_result = g.query(prefixes + """ 97 | select ?s ?o where { 98 | ?s rdf:type skos:Concept . 99 | ?s """ + relation + """ ?o . 100 | ?o rdf:type skos:Concept . 101 | } 102 | """) 103 | 104 | with open(filename, 'a') as csvfile: 105 | neo4jwriter = csv.writer(csvfile, delimiter=',', quotechar='"', quoting=csv.QUOTE_MINIMAL) 106 | 107 | for row in query_result: 108 | s = str(row[0].encode('utf-8')) 109 | #p = str(row[1].encode('utf-8')).replace('http://www.w3.org/2004/02/skos/core#', 'skos:') 110 | p = relation.replace("skos:", "") 111 | o = str(row[1].encode('utf-8')) 112 | 113 | rowValues = [s, o, p] 114 | #rowValues = ['`' + x + '`' for x in rowValues] 115 | rowValues[0] = '`' + rowValues[0] + '`' 116 | rowValues[1] = '`' + rowValues[1] + '`' 117 | 118 | neo4jwriter.writerow(rowValues) 119 | 120 | ### skos:inScheme 121 | 122 | query_result = g.query(prefixes + """ 123 | select ?x ?scheme where { 124 | ?x skos:inScheme ?scheme . 125 | ?scheme rdf:type skos:ConceptScheme . 126 | } 127 | """) 128 | 129 | p = "inScheme" 130 | 131 | with open(filename, 'a') as csvfile: 132 | neo4jwriter = csv.writer(csvfile, delimiter=',', quotechar='"', quoting=csv.QUOTE_MINIMAL) 133 | 134 | for row in query_result: 135 | s = str(row['x'].encode('utf-8')) 136 | #p = str(row[1].encode('utf-8')).replace('http://www.w3.org/2004/02/skos/core#', 'skos:') 137 | 138 | o = str(row['scheme'].encode('utf-8')) 139 | 140 | rowValues = [s, o, p] 141 | #rowValues = ['`' + x + '`' for x in rowValues] 142 | rowValues[0] = '`' + rowValues[0] + '`' 143 | rowValues[1] = '`' + rowValues[1] + '`' 144 | 145 | neo4jwriter.writerow(rowValues) 146 | 147 | # ./bin/neo4j-import --into /home/cbdavis/Desktop/neo4j --multiline-fields=true --nodes /home/cbdavis/Desktop/neo4j_nodes.csv --relationships /home/cbdavis/Desktop/neo4j_rels.csv 148 | # ./bin/neo4j-import --into /home/cbdavis/Downloads/neo4j-community-3.0.3/data/databases/graph.db --multiline-fields=true --nodes /home/cbdavis/Desktop/neo4j_nodes.csv --relationships /home/cbdavis/Desktop/neo4j_rels.csv 149 | 150 | # ./bin/neo4j-import --into /home/cbdavis/Downloads/neo4j-community-3.0.3/data/databases/graph.db --multiline-fields=true --nodes /home/cbdavis/Desktop/neo4j_skos_concepts.csv --nodes /home/cbdavis/Desktop/neo4j_skos_concept_schemes.csv --relationships /home/cbdavis/Desktop/neo4j_rels.csv -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # what-links-to-what 2 | 3 | ## What? 4 | This is an effort to map the interlinkages between various industrial & product classification systems along with other databases of interest (facility pollution, LCA, etc.). 5 | 6 | 7 | 8 | ## Visualized Links 9 | This is a rough map of all the classification and data sets that we are aware of: 10 | 11 | 12 | In [the CodeLinkR folder](./CodeLinkR) we are working on software that can read the classifications and their concordances. The matrices below shows the current status of these efforts. The metadata used is stored in [classifications.yaml](./CodeLinkR/inst/classifications.yaml) and [concordances.yaml](./CodeLinkR/inst/concordances.yaml). 13 | 14 | Which classification codes have been linked: 15 | 16 | 17 | 18 | 21 | 24 | 25 |
19 | 20 | 22 | 23 |
26 | 27 | What this shows us is that if you have one dataset using Combined Nomenclature (CN), it's possible to link it to another dataset using NACE by the following set of translations: CN -> SITC -> HS -> ISIC -> NACE. 28 | 29 | 30 | 31 | Which specific versions of the classification codes have been linked: 32 | 33 | 34 | 35 | ## Data Sources 36 | * [RAMON - Reference And Management Of Nomenclatures: Index of Correspondence Tables](http://ec.europa.eu/eurostat/ramon/relations/index.cfm?TargetUrl=LST_REL) 37 | * [RAMON - Reference And Management Of Nomenclatures: Metadata](http://ec.europa.eu/eurostat/ramon/index.cfm?TargetUrl=DSP_PUB_WELC) 38 | * [United National Statistics Division - Classifications Registry](http://unstats.un.org/unsd/cr/registry/regot.asp?Lg=1) 39 | * [World Bank Product Concordances](http://wits.worldbank.org/product_concordance.html) 40 | 41 | ### Classifications 42 | #### Industrial 43 | * ANZSIC - [Australian and New Zealand Standard Industrial Classification]() 44 | * ISIC - [International Standard Industrial Classification of All Economic Activities](http://unstats.un.org/unsd/cr/registry/regcst.asp?Cl=27) 45 | * JSIC - Japanese Standard Industrial Classification 46 | * NACE - [Statistical Classification of Economic Activities in the European Community (nomenclature statistique des activités économiques dans la Communauté européenne)](https://en.wikipedia.org/wiki/Statistical_Classification_of_Economic_Activities_in_the_European_Community) 47 | * NAICS - [North American Industry Classification System](https://en.wikipedia.org/wiki/North_American_Industry_Classification_System) 48 | * SIC - [Standard Industrial Classification](https://en.wikipedia.org/wiki/Standard_Industrial_Classification) 49 | 50 | #### Product 51 | * BEC - Broad Economic Categories 52 | * BTN - Brussels Tariff Nomenclature 53 | * CAS Registry - [Chemical Abstract Service](https://www.cas.org/content/chemical-substances/faqs) - Registry of chemicals 54 | * CCT - Common Customs Tariff 55 | * CN - [Combined Nomenclature](http://ec.europa.eu/taxation_customs/customs/customs_duties/tariff_aspects/combined_nomenclature/index_en.htm) 56 | * CPA - [Statistical Classification of Products by Activity](http://ec.europa.eu/eurostat/ramon/nomenclatures/index.cfm?TargetUrl=LST_NOM_DTL&StrNom=CPA_2_1&StrLanguageCode=EN&IntPcKey=&StrLayoutCode=HIERARCHIC) 57 | * CPC - [Central Product Classification](http://ec.europa.eu/eurostat/ramon/nomenclatures/index.cfm?TargetUrl=ACT_OTH_DFLT_LAYOUT&StrNom=CPC_2_1&StrLanguageCode=EN) 58 | * GSIN - [Goods and Services Identification Number](https://buyandsell.gc.ca/procurement-data/goods-and-services-identification-number/gsin) 59 | * HS - Harmonized System 60 | * NAPCS - North American Product Classification System 61 | * NHM - [Harmonised Commodity Code 'Nomenclature harmonisée des marchandises'](http://ec.europa.eu/eurostat/ramon/other_documents/nhm/index.cfm?TargetUrl=DSP_NHM) 62 | * NIMEXE - [Nomenclature of Goods for the External Trade Statistics of the Community and Statistics of Trade between Member States](http://ec.europa.eu/eurostat/ramon/other_documents/ancestors/nimexe/index.cfm?TargetUrl=DSP_NIMEXE) 63 | * NST/R - [Standard Goods Classification for Transport Statistics/Revised](http://ec.europa.eu/eurostat/ramon/nomenclatures/index.cfm?TargetUrl=LST_NOM_DTL&StrNom=NSTR_1967&StrLanguageCode=EN&IntPcKey=&StrLayoutCode=HIERARCHIC) 64 | * PRODCOM - [PRODuction COMmunautaire](http://ec.europa.eu/eurostat/ramon/nomenclatures/index.cfm?TargetUrl=LST_NOM&StrGroupCode=CLASSIFIC&StrLanguageCode=EN&IntFamilyCode=&TxtSearch=prodcom&IntCurrentPage=1) 65 | * SITC - Standard International Trade Classification 66 | * SRS - [Substance Registration System](https://www.fda.gov/forindustry/datastandards/substanceregistrationsystem-uniqueingredientidentifierunii/) 67 | * UNSPSC - [United Nations Standard Products and Services Code](https://www.unspsc.org/) 68 | 69 | #### Patents 70 | * CPC - [Cooperative Patent Classification](http://www.uspto.gov/web/patents/classification/cpc/html/cpc-A.html). This is used to classify patents by the USPTO. 71 | * [Concordances](http://www.cooperativepatentclassification.org/cpcConcordances.html) from CPC to IPC and ECLA. 72 | * IPC - [International Patent Classification](http://www.wipo.int/classifications/ipc/en/) 73 | * USPC - [United States Patent Classification](https://www.uspto.gov/web/patents/classification/uspcindex/indextouspc.htm) 74 | 75 | 76 | ## How? 77 | The data is represented using the [graphviz dot format](http://www.graphviz.org/content/dot-language) in the file `WhatLinksToWhat.dot.m4`. We additionally use [m4](http://www.gnu.org/software/m4/m4.html) to help replace variable names with colors representing the different types of classifications. 78 | 79 | The image shown on this page is rendered with [graphviz](http://www.graphviz.org) using: 80 | 81 | ``` 82 | bash ./WhatLinksToWhat.sh 83 | ``` 84 | 85 | This script also generates the `WhatLinksToWhat.dot` file, and you can use this to then render to other formats like svg. 86 | -------------------------------------------------------------------------------- /WhatLinksToWhat.dot: -------------------------------------------------------------------------------- 1 | digraph G { 2 | rankdir=LR 3 | concentrate=true 4 | 5 | /* 6 | I'm bad at colors, someone should figure out a better scheme: 7 | http://www.graphviz.org/doc/info/colors.html 8 | http://colorbrewer2.org/ helps a lot 9 | */ 10 | 11 | 12 | // http://stackoverflow.com/questions/14662092/does-the-dot-language-support-variables-aliases 13 | // You can fill in the colors for the nodes here. The bash script will take care of the rest 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | /****** Define all the Types of Nodes and their colors here ******/ 24 | 25 | 26 | /*** Industrial Classifications **/ 27 | node [fillcolor = "#d73027", style=filled] 28 | NACE 29 | ISIC 30 | NAICS 31 | ANZSIC 32 | "Categories.xml" 33 | IPPC 34 | SIC 35 | SNAP97 36 | "NACE/CLIO" 37 | JSIC /* Japanese Standard Industrial Classification */ 38 | 39 | 40 | /*** Product or Flow Classifications **/ 41 | node [fillcolor = "#f46d43", style=filled] 42 | BEC 43 | BTN 44 | CAS 45 | CCT 46 | CN 47 | COICOP 48 | CPA 49 | CPC 50 | EBOPS 51 | HS 52 | LALL 53 | NAPCS /** https://en.wikipedia.org/wiki/North_American_Product_Classification_System **/ 54 | NHM 55 | NIMEXE 56 | NIPRO 57 | NST 58 | "NST/R" 59 | PRODCOM 60 | SITC 61 | 62 | 63 | node [fillcolor = "#4575b4", style=filled] 64 | EWC 65 | LOW 66 | 67 | 68 | node [fillcolor = "#abd9e9", style=filled] 69 | NUTS 70 | WGS84 71 | 72 | 73 | node [fillcolor = "#74add1", style=filled] 74 | "Domestic IO" 75 | "International IO" 76 | 77 | 78 | node [fillcolor = "#fdae61", style=filled] 79 | EcoInvent 80 | USDA 81 | CPM 82 | NREL 83 | ELCD 84 | NEEDS 85 | 86 | 87 | node [fillcolor = "#fee090", style=filled] 88 | "E-PRTR" 89 | LCPD 90 | "National Business Registries" 91 | TRI 92 | 93 | 94 | node [fillcolor = "#e0f3f8", style=filled] 95 | "Global Synergy Database" 96 | "ie.tudelft.nl" 97 | "NISP Case Studies" 98 | "ISDATA open material synergy DB" 99 | "International Survey on Eco-Industrial Parks" 100 | 101 | 102 | /** Default color for everything else **/ 103 | node [style=filled, fillcolor=white] 104 | 105 | /****** Define all the types of edges (connections here) ******/ 106 | /** Concordances between classification systems **/ 107 | NACE -> ISIC [dir="both"] 108 | NAICS -> ISIC [dir="both"] 109 | NACE -> NAICS [dir="both"] 110 | CPA -> NACE [dir="both"] /** TODO where does this occur? **/ 111 | EWC -> LOW [dir="both"] 112 | EWC -> NACE [dir="both"] 113 | LOW -> NACE [dir="both"] /** TODO where does this occur? **/ 114 | ANZSIC -> ISIC [dir="both"] 115 | NAICS -> NAPCS [dir="both"] 116 | /** LCA Data Sets **/ 117 | ISIC -> EcoInvent 118 | CAS -> EcoInvent 119 | USDA -> ISIC 120 | "Categories.xml" -> NREL 121 | "Categories.xml" -> NEEDS 122 | /** Other Data Sets **/ 123 | SIC -> TRI 124 | NAICS -> TRI 125 | /* 126 | TRI -> "Pollution Prevention Activity Codes" 127 | */ 128 | TRI -> WGS84 129 | "E-PRTR" -> WGS84 130 | NACE -> "E-PRTR" 131 | NUTS -> "E-PRTR" 132 | IPPC -> "E-PRTR" 133 | "NUTS" -> WGS84 134 | "ISDATA open material synergy DB" -> NACE 135 | "ISDATA open material synergy DB" -> EWC 136 | /* 137 | CPA -> "SE IO" 138 | NACE -> "SE IO" 139 | */ 140 | NACE -> "Domestic IO" 141 | NACE -> "International IO" 142 | NACE -> "National Business Registries" 143 | "National Business Registries" -> WGS84 144 | /* 145 | "National Business Registries" -> "Economic Data" 146 | */ 147 | /* 148 | NACE -> "Eurostat" 149 | "Eurostat" -> "Economic Data" 150 | "Eurostat" -> "Social Data" 151 | */ 152 | /* 153 | LCPD -> "Heat Output" 154 | */ 155 | "Domestic IO" -> "International IO" 156 | /* 157 | "Domestic IO" -> "SE IO" 158 | */ 159 | "International Survey on Eco-Industrial Parks" -> WGS84 160 | "ie.tudelft.nl" -> WGS84 161 | 162 | BEC -> CN 163 | BEC -> SITC 164 | BEC -> HS 165 | BTN -> SITC 166 | CCT -> NIMEXE 167 | NIMEXE -> SITC 168 | CCT -> SITC 169 | CN -> CPA 170 | CN -> "NST/R" 171 | CN -> PRODCOM 172 | CN -> SITC 173 | CN -> HS 174 | CN -> NIMEXE 175 | CN -> NST 176 | COICOP -> CPC 177 | COICOP -> CPA 178 | CPA -> CPC 179 | CPA -> NST 180 | CPA -> EBOPS 181 | CPA -> HS 182 | CPC -> HS 183 | CPC -> ISIC 184 | CPC -> PRODCOM 185 | EBOPS -> CPA 186 | EBOPS -> CPC 187 | EWC -> LOW 188 | HS -> SIC 189 | HS -> SITC 190 | HS -> PRODCOM 191 | ISIC -> NACE 192 | ISIC -> CPC 193 | ISIC -> SITC 194 | ISIC -> NAICS 195 | JSIC -> NACE /* Japanese Standard Industrial Classification */ 196 | LALL -> SITC 197 | NACE -> "NACE/CLIO" 198 | NACE -> NAICS 199 | NHM -> NST 200 | NIMEXE -> "NACE/CLIO" 201 | NIMEXE -> NIPRO 202 | NIMEXE -> CN 203 | SNAP97 -> NACE 204 | SIC -> ISIC 205 | SIC -> NACE 206 | 207 | /* HS -> "Product Complexity Index - Observatory of Economic Complexity" */ 208 | 209 | // CD: Don't know how to move this to the top right corner 210 | 211 | subgraph cluster_legend { 212 | label = "Legend"; 213 | "Industrial Classifications" [fillcolor = "#d73027", style=filled] 214 | "Product/Flow Classifications" [fillcolor = "#f46d43", style=filled] 215 | "LCA Databases" [fillcolor = "#fdae61", style=filled] 216 | "Facility-level Data" [fillcolor = "#fee090", style=filled] 217 | "IS Case Studies" [fillcolor = "#e0f3f8", style=filled] 218 | "Geo Data" [fillcolor = "#abd9e9", style=filled] 219 | "Waste Classification" [fillcolor = "#4575b4", style=filled] 220 | } 221 | 222 | 223 | /* 224 | Don't know where to put this yet: 225 | 226 | Very detailed overview of concordances 227 | http://ec.europa.eu/eurostat/ramon/relations/index.cfm?TargetUrl=LST_REL 228 | 229 | classification = detailed categorization/structure to a group of things/artiacts 230 | correlation = linking synonyms between classification data 231 | multi-attribute = linking seperate data types (groups of artifacts??) to other seperate data types 232 | I guess we could classify the data types 233 | economic/MFA/industrial geography 234 | 235 | http://scb.se/en_/Finding-statistics/Statistics-by-subject-area/Business-activities/ 236 | 237 | */ 238 | } 239 | 240 | 241 | -------------------------------------------------------------------------------- /WhatLinksToWhat.dot.m4: -------------------------------------------------------------------------------- 1 | digraph G { 2 | rankdir=LR 3 | concentrate=true 4 | 5 | /* 6 | I'm bad at colors, someone should figure out a better scheme: 7 | http://www.graphviz.org/doc/info/colors.html 8 | http://colorbrewer2.org/ helps a lot 9 | */ 10 | 11 | 12 | // http://stackoverflow.com/questions/14662092/does-the-dot-language-support-variables-aliases 13 | // You can fill in the colors for the nodes here. The bash script will take care of the rest 14 | define(`industrial_classifications_style',`fillcolor = "#d73027", style=filled') 15 | define(`product_classificiations_style',`fillcolor = "#f46d43", style=filled') 16 | define(`lca_data_style',`fillcolor = "#fdae61", style=filled') 17 | define(`facility_level_data_style',`fillcolor = "#fee090", style=filled') 18 | define(`is_case_studies_style',`fillcolor = "#e0f3f8", style=filled') 19 | define(`geo_data_style',`fillcolor = "#abd9e9", style=filled') 20 | define(`io_data_style',`fillcolor = "#74add1", style=filled') 21 | define(`waste_classification_style',`fillcolor = "#4575b4", style=filled') 22 | 23 | /****** Define all the Types of Nodes and their colors here ******/ 24 | 25 | 26 | /*** Industrial Classifications **/ 27 | node [industrial_classifications_style] 28 | NACE 29 | ISIC 30 | NAICS 31 | ANZSIC 32 | "Categories.xml" 33 | IPPC 34 | SIC 35 | SNAP97 36 | "NACE/CLIO" 37 | JSIC /* Japanese Standard Industrial Classification */ 38 | 39 | 40 | /*** Product or Flow Classifications **/ 41 | node [product_classificiations_style] 42 | BEC 43 | BTN 44 | CAS 45 | CCT 46 | CN 47 | COICOP 48 | CPA 49 | CPC 50 | EBOPS 51 | HS 52 | LALL 53 | NAPCS /** https://en.wikipedia.org/wiki/North_American_Product_Classification_System **/ 54 | NHM 55 | NIMEXE 56 | NIPRO 57 | NST 58 | "NST/R" 59 | PRODCOM 60 | SITC 61 | 62 | 63 | node [waste_classification_style] 64 | EWC 65 | LOW 66 | 67 | 68 | node [geo_data_style] 69 | NUTS 70 | WGS84 71 | 72 | 73 | node [io_data_style] 74 | "Domestic IO" 75 | "International IO" 76 | 77 | 78 | node [lca_data_style] 79 | EcoInvent 80 | USDA 81 | CPM 82 | NREL 83 | ELCD 84 | NEEDS 85 | 86 | 87 | node [facility_level_data_style] 88 | "E-PRTR" 89 | LCPD 90 | "National Business Registries" 91 | TRI 92 | 93 | 94 | node [is_case_studies_style] 95 | "Global Synergy Database" 96 | "ie.tudelft.nl" 97 | "NISP Case Studies" 98 | "ISDATA open material synergy DB" 99 | "International Survey on Eco-Industrial Parks" 100 | 101 | 102 | /** Default color for everything else **/ 103 | node [style=filled, fillcolor=white] 104 | 105 | /****** Define all the types of edges (connections here) ******/ 106 | /** Concordances between classification systems **/ 107 | NACE -> ISIC [dir="both"] 108 | NAICS -> ISIC [dir="both"] 109 | NACE -> NAICS [dir="both"] 110 | CPA -> NACE [dir="both"] /** TODO where does this occur? **/ 111 | EWC -> LOW [dir="both"] 112 | EWC -> NACE [dir="both"] 113 | LOW -> NACE [dir="both"] /** TODO where does this occur? **/ 114 | ANZSIC -> ISIC [dir="both"] 115 | NAICS -> NAPCS [dir="both"] 116 | /** LCA Data Sets **/ 117 | ISIC -> EcoInvent 118 | CAS -> EcoInvent 119 | USDA -> ISIC 120 | "Categories.xml" -> NREL 121 | "Categories.xml" -> NEEDS 122 | /** Other Data Sets **/ 123 | SIC -> TRI 124 | NAICS -> TRI 125 | /* 126 | TRI -> "Pollution Prevention Activity Codes" 127 | */ 128 | TRI -> WGS84 129 | "E-PRTR" -> WGS84 130 | NACE -> "E-PRTR" 131 | NUTS -> "E-PRTR" 132 | IPPC -> "E-PRTR" 133 | "NUTS" -> WGS84 134 | "ISDATA open material synergy DB" -> NACE 135 | "ISDATA open material synergy DB" -> EWC 136 | /* 137 | CPA -> "SE IO" 138 | NACE -> "SE IO" 139 | */ 140 | NACE -> "Domestic IO" 141 | NACE -> "International IO" 142 | NACE -> "National Business Registries" 143 | "National Business Registries" -> WGS84 144 | /* 145 | "National Business Registries" -> "Economic Data" 146 | */ 147 | /* 148 | NACE -> "Eurostat" 149 | "Eurostat" -> "Economic Data" 150 | "Eurostat" -> "Social Data" 151 | */ 152 | /* 153 | LCPD -> "Heat Output" 154 | */ 155 | "Domestic IO" -> "International IO" 156 | /* 157 | "Domestic IO" -> "SE IO" 158 | */ 159 | "International Survey on Eco-Industrial Parks" -> WGS84 160 | "ie.tudelft.nl" -> WGS84 161 | 162 | BEC -> CN 163 | BEC -> SITC 164 | BEC -> HS 165 | BTN -> SITC 166 | CCT -> NIMEXE 167 | NIMEXE -> SITC 168 | CCT -> SITC 169 | CN -> CPA 170 | CN -> "NST/R" 171 | CN -> PRODCOM 172 | CN -> SITC 173 | CN -> HS 174 | CN -> NIMEXE 175 | CN -> NST 176 | COICOP -> CPC 177 | COICOP -> CPA 178 | CPA -> CPC 179 | CPA -> NST 180 | CPA -> EBOPS 181 | CPA -> HS 182 | CPC -> HS 183 | CPC -> ISIC 184 | CPC -> PRODCOM 185 | EBOPS -> CPA 186 | EBOPS -> CPC 187 | EWC -> LOW 188 | HS -> SIC 189 | HS -> SITC 190 | HS -> PRODCOM 191 | ISIC -> NACE 192 | ISIC -> CPC 193 | ISIC -> SITC 194 | ISIC -> NAICS 195 | JSIC -> NACE /* Japanese Standard Industrial Classification */ 196 | LALL -> SITC 197 | NACE -> "NACE/CLIO" 198 | NACE -> NAICS 199 | NHM -> NST 200 | NIMEXE -> "NACE/CLIO" 201 | NIMEXE -> NIPRO 202 | NIMEXE -> CN 203 | SNAP97 -> NACE 204 | SIC -> ISIC 205 | SIC -> NACE 206 | 207 | /* HS -> "Product Complexity Index - Observatory of Economic Complexity" */ 208 | 209 | // CD: Don't know how to move this to the top right corner 210 | 211 | subgraph cluster_legend { 212 | label = "Legend"; 213 | "Industrial Classifications" [industrial_classifications_style] 214 | "Product/Flow Classifications" [product_classificiations_style] 215 | "LCA Databases" [lca_data_style] 216 | "Facility-level Data" [facility_level_data_style] 217 | "IS Case Studies" [is_case_studies_style] 218 | "Geo Data" [geo_data_style] 219 | "Waste Classification" [waste_classification_style] 220 | } 221 | 222 | 223 | /* 224 | Don't know where to put this yet: 225 | 226 | Very detailed overview of concordances 227 | http://ec.europa.eu/eurostat/ramon/relations/index.cfm?TargetUrl=LST_REL 228 | 229 | classification = detailed categorization/structure to a group of things/artiacts 230 | correlation = linking synonyms between classification data 231 | multi-attribute = linking seperate data types (groups of artifacts??) to other seperate data types 232 | I guess we could classify the data types 233 | economic/MFA/industrial geography 234 | 235 | http://scb.se/en_/Finding-statistics/Statistics-by-subject-area/Business-activities/ 236 | 237 | */ 238 | } 239 | 240 | 241 | -------------------------------------------------------------------------------- /WhatLinksToWhat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/WhatLinksToWhat.png -------------------------------------------------------------------------------- /WhatLinksToWhat.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | m4 WhatLinksToWhat.dot.m4 > WhatLinksToWhat.dot 3 | dot -Tpng WhatLinksToWhat.dot -o WhatLinksToWhat.png 4 | -------------------------------------------------------------------------------- /images/AdjMatrix-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/images/AdjMatrix-1.png -------------------------------------------------------------------------------- /images/AdjMatrixSimplified-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/images/AdjMatrixSimplified-1.png -------------------------------------------------------------------------------- /images/wltw_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/images/wltw_logo.png -------------------------------------------------------------------------------- /images/wltw_product_industry_linkages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isdata-org/what-links-to-what/675a6897a09d8ae92627ff599b7804dbd85be128/images/wltw_product_industry_linkages.png --------------------------------------------------------------------------------