for the Global Innovation Index
Jack Gregory
29 November 2022
How does the profiles project fit within the larger gii repository? How are the profiles organized?
The profiles repository contains the following files and folders.
File/Folder | Description |
---|---|
README.md | Provides high-level summary of project operation. |
notes.md | Provides notes related to idml, xml and R. |
build | Contains the main <profiles.R> script. |
src | Contains all source scripts, where the names are directly related to the constituent functions. |
tmpl | Contains an unzipped, unpopulated version of the idml templates. |
out | Not committed to the repository, but collects all outputs when cloned locally. |
What is IDML and its associated file format? How are idml archives structured?
The automated idml elements for the economy profiles are in red:
File/Folder | Description |
---|---|
mimetype | Identifies the “media type” of the file format. |
designmap.xml | Contains the publishing architecture of the document, including where spreads and stories are located. |
MasterSpreads | Contains all MasterSpreads, which outline all standard page elements. |
META-INF | Contains metadata and describes the file encoding used in the document. |
Resources | Contains elements and preferences that are commonly used throughout the document, e.g., colors, fonts and paragraph styles. |
Spreads | Contains all Spreads, which outline page-specific elements and are composed of stories. |
Stories | Contains all Stories, which organize and format the document text. |
XML | Contains XML elements and settings used in the document. |
How does the template function? What are script labels and how are they maintained?
Warning
By design, it is impossible to add arbitrary elements and attributes to idml files.
Unrecognized content is discarded on idml import.
There are two forms of labeling within an idml file:
KeyValuePair
— used within structural elements.For the template, script labels exist within the following elements/nodes:
Element | File | Type | Purpose | Function |
---|---|---|---|---|
Document | designmap.xml | KeyValuePair |
To identify the file type. | To import the template. |
Spread | Spread_*.xml | KeyValuePair |
To identify the file type. | To import the template and replace Self attributes. |
Page | Spread_*.xml | KeyValuePair |
To identify pages. | To replace Name attributes. |
TextFrame | Spread_*.xml | KeyValuePair |
To identify page elements. | To replace Self , ParentStory , PreviousTextFrame and NextTextFrame attributes. |
Story | Story_*.xml | KeyValuePair |
To identify the file type. | To import the template and replace Self attributes. |
Cell | Story_*.xml | ListItem |
To identify cells. | To populate the template. |
Important
Script labels associated with text elements are fragile and can easily be damaged by, e.g., insert, remove and copy-paste actions.
ListItem
labels.KeyValuePair
labels.type
\(\in\) [cntry, cntxt, main, foot].KeyValuePair
labels.type
\(\in\) [cntry, cntxt, main, foot].page
\(\in\) [odd, evn].side
\(\in\) [lft, rgt].KeyValuePair
labels.type
\(\in\) [cntry, cntxt, main, foot].page
\(\in\) [odd, evn].KeyValuePair
labels.type
\(\in\) spread.How is the template imported and organized within the profiles repository? How are the economy profiles populated?
idml_import()
function:
# PREAMBLE ------------------------------------------------
## Initiate
## ... packages
source(here::here("06_profiles/src/preamble.R"))
## ... source files
source(here::here("06_profiles/src/import_xml.R"))
source(here::here("06_profiles/src/convert_idml.R"))
## ... definitions
idml <- here::here("06_profiles/tmpl/idml_tmpl_2022.idml")
dir <- here::here("06_profiles/tmpl/test")
zip <- "C:/Program Files/7-Zip/7z.exe"
# PREAMBLE ------------------------------------------------
## Initiate
## ... packages
source(here::here("06_profiles/src/preamble.R"))
## ... source files
source(here::here("06_profiles/src/import_xml.R"))
source(here::here("06_profiles/src/convert_idml.R"))
## ... definitions
idml <- here::here("06_profiles/tmpl/idml_tmpl_2022.idml")
dir <- here::here("06_profiles/tmpl/test")
zip <- "C:/Program Files/7-Zip/7z.exe"
# IMPORT --------------------------------------------------
import_idml(idml, dir, zip)
# PREAMBLE ------------------------------------------------
## Initiate
## ... packages
source(here::here("06_profiles/src/preamble.R"))
## ... source files
source(here::here("06_profiles/src/import_xml.R"))
source(here::here("06_profiles/src/convert_idml.R"))
## ... definitions
idml <- here::here("06_profiles/tmpl/idml_tmpl_2022.idml")
dir <- here::here("06_profiles/tmpl/test")
zip <- "C:/Program Files/7-Zip/7z.exe"
# IMPORT --------------------------------------------------
import_idml(idml, dir, zip)
> 7-Zip 22.01 (x64) : Copyright (c) 1999-2022 Igor Pavlov : 2022-07-15
>
> Scanning the drive for archives:
> 1 file, 571658 bytes (559 KiB)
>
> Extracting archive: idml_tmpl_2022.idml
> --
> Path = idml_tmpl_2022.idml
> Type = zip
> Physical Size = 571658
>
> Everything is Ok
>
> Folders: 6
> Files: 40
> Size: 7063772
> Compressed: 571658
# PREAMBLE ------------------------------------------------
## Initiate
## ... packages
source(here::here("06_profiles/src/preamble.R"))
## ... source files
source(here::here("06_profiles/src/import_xml.R"))
source(here::here("06_profiles/src/convert_idml.R"))
## ... definitions
idml <- here::here("06_profiles/tmpl/idml_tmpl_2022.idml")
dir <- here::here("06_profiles/tmpl/test")
zip <- "C:/Program Files/7-Zip/7z.exe"
# IMPORT --------------------------------------------------
import_idml(idml, dir, zip)
# PREAMBLE ------------------------------------------------
## Initiate
## ... packages
source(here::here("06_profiles/src/preamble.R"))
## ... source files
source(here::here("06_profiles/src/import_xml.R"))
source(here::here("06_profiles/src/convert_idml.R"))
## ... definitions
idml <- here::here("06_profiles/tmpl/idml_tmpl_2022.idml")
dir <- here::here("06_profiles/tmpl/test")
zip <- "C:/Program Files/7-Zip/7z.exe"
# IMPORT --------------------------------------------------
import_idml(idml, dir, zip)
# PREAMBLE ------------------------------------------------
## Initiate
## ... packages
source(here::here("06_profiles/src/preamble.R"))
## ... source files
source(here::here("06_profiles/src/import_xml.R"))
source(here::here("06_profiles/src/convert_idml.R"))
## ... definitions
idml <- here::here("06_profiles/tmpl/idml_tmpl_2022.idml")
dir <- here::here("06_profiles/tmpl/test")
zip <- "C:/Program Files/7-Zip/7z.exe"
# IMPORT --------------------------------------------------
import_idml(idml, dir, zip)
# PREAMBLE ------------------------------------------------
## Initiate -------------------------------------
## ... packages
source(here::here("06_profiles/src/preamble.R"))
## ... source files
fs::dir_ls(fs::path(here::here(), "06_profiles/src")) %>%
as.list() %>%
purrr::keep(!grepl("preamble", .)) %>%
purrr::walk(source)
# PREAMBLE ------------------------------------------------
## Initiate -------------------------------------
## ... packages
source(here::here("06_profiles/src/preamble.R"))
## ... source files
fs::dir_ls(fs::path(here::here(), "06_profiles/src")) %>%
as.list() %>%
purrr::keep(!grepl("preamble", .)) %>%
purrr::walk(source)
## ... definitions
date <- format(Sys.Date(), "%Y%m%d")
idml <- glue::glue("ep_{date}")
dir <- here::here("06_profiles/tmpl/2022")
zip <- "C:/Program Files/7-Zip/7z.exe"
giiyr <- 2022
# PREAMBLE ------------------------------------------------
## Initiate -------------------------------------
## ... packages
source(here::here("06_profiles/src/preamble.R"))
## ... source files
fs::dir_ls(fs::path(here::here(), "06_profiles/src")) %>%
as.list() %>%
purrr::keep(!grepl("preamble", .)) %>%
purrr::walk(source)
## ... definitions
date <- format(Sys.Date(), "%Y%m%d")
idml <- glue::glue("ep_{date}")
dir <- here::here("06_profiles/tmpl/2022")
zip <- "C:/Program Files/7-Zip/7z.exe"
giiyr <- 2022
## Connect to AWS -------------------------------
con <- DBI::dbConnect(odbc::odbc(), "gii_admin")
# IMPORT GII DATA -----------------------------------------
## Query economy data ---------------------------
sql.econ <- DBI::SQL(glue::glue("
SELECT `econ`.`GIIYR`,
`id`.`ISO3`,
`id`.`ECONOMY_NAME`,
`mod`.`RANK`,
`in`.`INPUT`,
`out`.`OUTPUT`,
`econ`.`INCOME`,
`id`.`REG_UN_CODE`,
`econ`.`POP`,
`econ`.`PPPGDP`,
`econ`.`PPPPC`
FROM `gii`.`economy_id` AS `id`
LEFT JOIN `gii`.`economy` AS `econ` USING (`ISO3`)
RIGHT JOIN (SELECT `GIIYR`,
`ISO3`,
`RANK`
FROM `gii`.`model`
WHERE `CODE`='Index')
AS `mod`
ON `econ`.`GIIYR`=`mod`.`GIIYR` AND `id`.`ISO3`=`mod`.`ISO3`
LEFT JOIN (SELECT `GIIYR`,
`ISO3`,
`RANK` AS `INPUT`
FROM `gii`.`model`
WHERE `CODE`='Inputs')
AS `in`
ON `econ`.`GIIYR`=`in`.`GIIYR` AND `id`.`ISO3`=`in`.`ISO3`
LEFT JOIN (SELECT `GIIYR`,
`ISO3`,
`RANK` AS `OUTPUT`
FROM `gii`.`model`
WHERE `CODE`='Outputs')
AS `out`
ON `econ`.`GIIYR`=`out`.`GIIYR` AND `id`.`ISO3`=`out`.`ISO3`
WHERE `econ`.`GIIYR`={giiyr}
;"))
df.econ <- DBI::dbGetQuery(con, sql.econ)
> # A tibble: 132 × 11
> GIIYR ISO3 ECONOMY_NAME RANK INPUT OUTPUT INCOME REG_UN_CODE POP PPPGDP PPPPC
> <int> <chr> <chr> <int> <int> <int> <chr> <chr> <dbl> <dbl> <dbl>
> 1 2022 AGO Angola 127 129 117 LM SSA 33934. 218. 6820.
> 2 2022 ALB Albania 84 80 89 UM EUR 2873. 44.5 15487
> 3 2022 ARE United Arab Emirates 31 18 52 HI NAWA 9991. 699. 74245.
> 4 2022 ARG Argentina 69 77 62 UM LCN 45606. 1049. 22892.
> 5 2022 ARM Armenia 80 82 73 UM NAWA 2968. 43.6 14701.
> 6 2022 AUS Australia 25 19 32 HI SEAO 25788. 1427. 55492.
> 7 2022 AUT Austria 17 17 21 HI EUR 9043. 531. 59406.
> 8 2022 AZE Azerbaijan 93 79 110 UM NAWA 10223. 156. 15299.
> 9 2022 BDI Burundi 130 127 130 LI SSA 12255. 9.53 779.
> 10 2022 BEL Belgium 26 26 24 HI EUR 11632. 645. 55919.
> # … with 122 more rows
# IMPORT GII DATA -----------------------------------------
## Query model data -----------------------------
sql.mod <- DBI::SQL(glue::glue("
SELECT `mod`.`GIIYR`,
`mod`.`CODE`,
`id`.`NAME`,
`id`.`LEVEL`,
`id`.`NUM`,
`mod`.`ISO3`,
`id`.`PROFILE`,
`mod`.`VALUE_SCREEN`,
`mod`.`SCORE`,
`mod`.`RANK`,
`mod`.`SW_OVERALL`,
`mod`.`SW_INCGRP`,
`mod`.`OUTDATED`,
`mod`.`DMC`
FROM `gii`.`model` AS `mod`
LEFT JOIN `gii`.`index_id` AS `id` USING (`GIIYR`,`CODE`)
WHERE `mod`.`GIIYR`={giiyr}
AND `id`.`LEVEL` IN ('Pillar','SubPillar','Indicator')
ORDER BY `id`.`NUM`, `mod`.`ISO3`
;"))
df.gii <- DBI::dbGetQuery(con, sql.mod)
> # A tibble: 14,388 × 14
> GIIYR CODE NAME LEVEL NUM ISO3 PROFILE VALUE_SCREEN SCORE RANK SW_OVERALL SW_INCGRP OUTDATED DMC
> <int> <chr> <chr> <chr> <chr> <chr> <chr> <dbl> <dbl> <int> <chr> <chr> <int> <int>
> 1 2022 P1 Institutions Pillar IN.1 AGO Score NA 41.9 116 NA NA NA 0
> 2 2022 P1 Institutions Pillar IN.1 ALB Score NA 51.4 84 NA NA NA 0
> 3 2022 P1 Institutions Pillar IN.1 ARE Score NA 83.5 6 S S NA 0
> 4 2022 P1 Institutions Pillar IN.1 ARG Score NA 47.6 96 NA NA NA 0
> 5 2022 P1 Institutions Pillar IN.1 ARM Score NA 59.7 55 NA NA NA 0
> 6 2022 P1 Institutions Pillar IN.1 AUS Score NA 77.2 17 NA NA NA 0
> 7 2022 P1 Institutions Pillar IN.1 AUT Score NA 82.8 8 S NA NA 0
> 8 2022 P1 Institutions Pillar IN.1 AZE Score NA 62.9 46 S NA NA 0
> 9 2022 P1 Institutions Pillar IN.1 BDI Score NA 45.3 106 NA NA NA 0
> 10 2022 P1 Institutions Pillar IN.1 BEL Score NA 71.5 29 NA NA NA 0
> # … with 14,378 more rows
# BUILD INSERTIONS ----------------------------------------
## Country df -----------------------------------
df.cntry <- df.econ |>
dplyr::select(ISO3, ECONOMY_NAME, RANK) |>
dplyr::mutate(RANK = as.character(RANK)) |>
tidyr::pivot_longer(cols=-ISO3, names_to="VAR", values_to="VAL") |>
dplyr::mutate(VAR = dplyr::case_when(VAR=="ECONOMY_NAME" ~ "Name",
VAR=="RANK" ~ "Rank",
TRUE ~ as.character(NA)))
> # A tibble: 10,692 × 3
> ISO3 CODE OUTDATED
> <chr> <chr> <int>
> 1 AGO AppCrea 0
> 2 AGO AppTarriff 0
> 3 AGO BrandVal NA
> 4 AGO CCTLD 0
> 5 AGO CitDoc 0
> 6 AGO CompSoftSpend NA
> 7 AGO CorpIAs NA
> 8 AGO CostRedu 0
> 9 AGO CreaGoodExp 1
> 10 AGO CultServExp NA
> # … with 10,682 more rows
# BUILD INSERTIONS ----------------------------------------
## Context df -----------------------------------
df.cntxt <- df.econ |>
dplyr::select(ISO3, INPUT:PPPPC) |>
dplyr::mutate(INCOME = dplyr::case_when(INCOME=="HI" ~ "High",
INCOME=="UM" ~ "Upper middle",
INCOME=="LM" ~ "Lower middle",
INCOME=="LI" ~ "Low"),
POP = formatC(POP/10^3, format="f", digits=1, big.mark=","),
PPPGDP = formatC(PPPGDP, format="f", digits=1, big.mark=","),
PPPPC = formatC(PPPPC, format="f", digits=0, big.mark=",")) |>
dplyr::mutate(dplyr::across(.cols=dplyr::everything(), .fns=as.character)) |>
tidyr::pivot_longer(cols=-ISO3, names_to="VAR", values_to="VAL") |>
dplyr::mutate(VAR = dplyr::case_when(VAR=="INPUT" ~ "Input_Rank",
VAR=="OUTPUT" ~ "Output_Rank",
VAR=="INCOME" ~ "Income",
VAR=="REG_UN_CODE" ~ "Region",
VAR=="POP" ~ "Pop",
VAR=="PPPGDP" ~ "GDP",
VAR=="PPPPC" ~ "GDPPC",
TRUE ~ as.character(NA)))
> # A tibble: 924 × 3
> ISO3 VAR VAL
> <chr> <chr> <chr>
> 1 AGO Input_Rank 129
> 2 AGO Output_Rank 117
> 3 AGO Income Lower middle
> 4 AGO Region SSA
> 5 AGO Pop 33.9
> 6 AGO GDP 218.0
> 7 AGO GDPPC 6,820
> 8 ALB Input_Rank 80
> 9 ALB Output_Rank 89
> 10 ALB Income Upper middle
> # … with 914 more rows
# BUILD INSERTIONS ----------------------------------------
## Main df --------------------------------------
df.main <- df.gii |>
dplyr::mutate(SCORE = ifelse(PROFILE=="Score", SCORE, VALUE_SCREEN) |>
formatC(digits=1, format="f", big.mark=",") |>
stringr::str_replace("-", "‒")) |>
dplyr::mutate(dplyr::across(c(SCORE, RANK), ~ifelse(is.na(.x) | .x=="NA", "n/a", .x))) |>
dplyr::mutate(RANK = dplyr::case_when(DMC==TRUE ~ glue::glue("[{RANK}]"),
DMC==FALSE | is.na(DMC) ~ as.character(RANK)),
SW_OVERALL = dplyr::case_when(SW_OVERALL=="S" ~ "●",
SW_OVERALL=="W" ~ "○"),
SW_INCGRP = dplyr::case_when(SW_INCGRP=="S" ~ "◆",
SW_INCGRP=="W" ~ "◇")) |>
dplyr::select(ISO3, CODE, SCORE:SW_INCGRP) |>
tidyr::pivot_longer(cols=c(-ISO3, -CODE), names_to="VAR", values_to="VAL") |>
dplyr::mutate(VAR = dplyr::case_when(VAR=="SCORE" ~ "Score",
VAR=="RANK" ~ "Rank",
VAR=="SW_OVERALL" ~ "SW_Overall",
VAR=="SW_INCGRP" ~ "SW_IncGrp",
TRUE ~ as.character(NA)))
> # A tibble: 57,552 × 4
> ISO3 CODE VAR VAL
> <chr> <chr> <chr> <glue>
> 1 AGO P1 Score 41.9
> 2 AGO P1 Rank 116
> 3 AGO P1 SW_Overall NA
> 4 AGO P1 SW_IncGrp NA
> 5 ALB P1 Score 51.4
> 6 ALB P1 Rank 84
> 7 ALB P1 SW_Overall NA
> 8 ALB P1 SW_IncGrp NA
> 9 ARE P1 Score 83.5
> 10 ARE P1 Rank 6
> # … with 57,542 more rows
> # A tibble: 10,692 × 3
> ISO3 CODE OUTDATED
> <chr> <chr> <int>
> 1 AGO AppCrea 0
> 2 AGO AppTarriff 0
> 3 AGO BrandVal NA
> 4 AGO CCTLD 0
> 5 AGO CitDoc 0
> 6 AGO CompSoftSpend NA
> 7 AGO CorpIAs NA
> 8 AGO CostRedu 0
> 9 AGO CreaGoodExp 1
> 10 AGO CultServExp NA
> # … with 10,682 more rows
# BUILD ITERATIONS ----------------------------------------
## Check ISO3 -----------------------------------
## Check countries match across insertion tables
## Create list of iso3 vectors
l.iso3 <- list(df.econ, df.gii, df.cntry, df.cntxt, df.main, df.clock) |>
purrr::map(~sort(unique(.[["ISO3"]]))) |>
purrr::set_names(nm=c("econ","gii","cntry","cntxt","main","clock"))
## Perform equivalence check
stopifnot(length(setdiff(l.iso3$cntry, l.iso3$econ))==0,
length(setdiff(l.iso3$econ, l.iso3$cntry))==0,
length(setdiff(l.iso3$cntry, l.iso3$gii))==0,
length(setdiff(l.iso3$gii, l.iso3$cntry))==0,
length(setdiff(l.iso3$cntry, l.iso3$cntxt))==0,
length(setdiff(l.iso3$cntxt, l.iso3$cntry))==0,
length(setdiff(l.iso3$cntry, l.iso3$main))==0,
length(setdiff(l.iso3$main, l.iso3$cntry))==0,
length(setdiff(l.iso3$cntry, l.iso3$clock))==0,
length(setdiff(l.iso3$clock, l.iso3$cntry))==0)
# BUILD INSERTIONS ----------------------------------------
## Iteration df ---------------------------------
## Build iteration dataframe
df.itr <- df.econ |>
dplyr::select(ISO3, ECONOMY_NAME) |>
dplyr::arrange(ECONOMY_NAME) |>
tibble::rowid_to_column(var="ORDER") |>
dplyr::mutate(PAIR = ifelse(numbers::mod(ORDER, 2)==0, ORDER/2, NA),
ODD = numbers::mod(ORDER, 2)) |>
tidyr::fill(PAIR, .direction="up") |>
dplyr::mutate(PAIR = ifelse(is.na(PAIR), max(PAIR, na.rm=TRUE) + 1, PAIR)) |>
tidyr::nest(order = ORDER, economy = ECONOMY_NAME, iso3 = ISO3, odd = ODD) |>
dplyr::mutate(dplyr::across(-PAIR, ~purrr::map(., ~as.list(.x) |> purrr::flatten())))
# BUILD INSERTIONS ----------------------------------------
## Iteration df ---------------------------------
## Build iteration dataframe
df.itr <- df.econ |>
dplyr::select(ISO3, ECONOMY_NAME) |>
dplyr::arrange(ECONOMY_NAME) |>
tibble::rowid_to_column(var="ORDER") |>
dplyr::mutate(PAIR = ifelse(numbers::mod(ORDER, 2)==0, ORDER/2, NA),
ODD = numbers::mod(ORDER, 2)) |>
tidyr::fill(PAIR, .direction="up") |>
dplyr::mutate(PAIR = ifelse(is.na(PAIR), max(PAIR, na.rm=TRUE) + 1, PAIR)) |>
tidyr::nest(order = ORDER, economy = ECONOMY_NAME, iso3 = ISO3, odd = ODD) |>
dplyr::mutate(dplyr::across(-PAIR, ~purrr::map(., ~as.list(.x) |> purrr::flatten())))
## Select particular rows
df.itr <- dplyr::slice(df.itr, 15:16)
# BUILD INSERTIONS ----------------------------------------
## Iteration df ---------------------------------
## Build iteration dataframe
df.itr <- df.econ |>
dplyr::select(ISO3, ECONOMY_NAME) |>
dplyr::arrange(ECONOMY_NAME) |>
tibble::rowid_to_column(var="ORDER") |>
dplyr::mutate(PAIR = ifelse(numbers::mod(ORDER, 2)==0, ORDER/2, NA),
ODD = numbers::mod(ORDER, 2)) |>
tidyr::fill(PAIR, .direction="up") |>
dplyr::mutate(PAIR = ifelse(is.na(PAIR), max(PAIR, na.rm=TRUE) + 1, PAIR)) |>
tidyr::nest(order = ORDER, economy = ECONOMY_NAME, iso3 = ISO3, odd = ODD) |>
dplyr::mutate(dplyr::across(-PAIR, ~purrr::map(., ~as.list(.x) |> purrr::flatten())))
## Filter for specific countries
df.itr <- dplyr::filter(df.itr, purrr::map_lgl(iso3, ~any(stringr::str_detect(.x, "USA"))))
# BUILD INSERTIONS ----------------------------------------
## Iteration df ---------------------------------
## Build iteration dataframe
df.itr <- df.econ |>
dplyr::select(ISO3, ECONOMY_NAME) |>
dplyr::arrange(ECONOMY_NAME) |>
tibble::rowid_to_column(var="ORDER") |>
dplyr::mutate(PAIR = ifelse(numbers::mod(ORDER, 2)==0, ORDER/2, NA),
ODD = numbers::mod(ORDER, 2)) |>
tidyr::fill(PAIR, .direction="up") |>
dplyr::mutate(PAIR = ifelse(is.na(PAIR), max(PAIR, na.rm=TRUE) + 1, PAIR)) |>
tidyr::nest(order = ORDER, economy = ECONOMY_NAME, iso3 = ISO3, odd = ODD) |>
dplyr::mutate(dplyr::across(-PAIR, ~purrr::map(., ~as.list(.x) |> purrr::flatten())))
# POPULATE IDML -------------------------------------------
## Create lists of xml templates
l.tmpl <- list(
cntry = "Story_cntry_tmpl.xml",
cntxt = "Story_cntxt_tmpl.xml",
main = "Story_main_tmpl.xml",
foot = "Story_foot_tmpl.xml",
spread = "Spread_tmpl.xml",
designmap = "designmap_tmpl.xml"
) |>
purrr::map(~here::here("06_profiles/tmpl/2022", .x))
## Full idml ------------------------------------
itr_pair(df.itr$iso3, df.itr$order, l.tmpl, dir)
> Populate country profiles
> 1 -- ALB & DZA
> 2 -- AGO & ARG
> 3 -- ARM & AUS
> 4 -- AUT & AZE
> 5 -- BHR & BGD
> 6 -- BLR & BEL
> 7 -- BEN & BIH
> 8 -- BWA & BRA
> 9 -- BRN & BGR
> 10 -- BFA & BDI
...
Ready for export
export_idml()
function which compresses the idml and saves it to the <../06_profiles/out/> folder. It then calls the clean_idml()
function which reverts the idml template folder to its “pre-population” state.export_idml()
function which compresses the idml and saves it to the <../06_profiles/out/> folder. It then calls the clean_idml()
function which reverts the idml template folder to its “pre-population” state.export_idml()
function which compresses the idml and saves it to the <../06_profiles/out/> folder. It then calls the clean_idml()
function which reverts the idml template folder to its “pre-population” state.> 7-Zip 22.01 (x64) : Copyright (c) 1999-2022 Igor Pavlov : 2022-07-15
>
> Scanning the drive:
> 6 folders, 140 files, 47585466 bytes (46 MiB)
>
> Creating archive: C:/Users/ajg/Documents/WIPO/GII_Data/06_profiles/out/ep_20221129.idml
>
> Add new data to archive: 6 folders, 140 files, 47585466 bytes (46 MiB)
>
> Files read from disk: 140
> Archive size: 3597119 bytes (3513 KiB)
> Everything is Ok
>
> 7-Zip 22.01 (x64) : Copyright (c) 1999-2022 Igor Pavlov : 2022-07-15
>
> Open archive: C:/Users/ajg/Documents/WIPO/GII_Data/06_profiles/out/ep_20221129.idml
> --
> Path = C:/Users/ajg/Documents/WIPO/GII_Data/06_profiles/out/ep_20221129.idml
> Type = zip
> Physical Size = 3597119
>
> Scanning the drive:
> 1 file, 43 bytes (1 KiB)
>
> Updating archive: C:/Users/ajg/Documents/WIPO/GII_Data/06_profiles/out/ep_20221129.idml
>
> Keep old data in archive: 6 folders, 140 files, 47585466 bytes (46 MiB)
> Add new data to archive: 1 file, 43 bytes (1 KiB)
>
> Files read from disk: 1
> Archive size: 3597290 bytes (3513 KiB)
> Everything is Ok
export_idml()
function which compresses the idml and saves it to the <../06_profiles/out/> folder. It then calls the clean_idml()
function which reverts the idml template folder to its “pre-population” state.export_idml()
function which compresses the idml and saves it to the <../06_profiles/out/> folder. It then calls the clean_idml()
function which reverts the idml template folder to its “pre-population” state.Let’s run some code.