Katalog
Her finner du en liste over alle funksjoner i Metodebiblioteket. Bruk alternativknappen for å filtrere funksjoner.
viewof lang = Inputs.radio(new Map([["ALLE", " "], ["R", "rfunc"], ["python", "python"]]),
{label: "Programmeringsspråk: ", value: " "}
)
viewof tema = Inputs.radio(new Map([["ALLE", " "], ["kontrollere","kontrollere"],
["imputere","imputere"],
["strukturere","strukturere"],
["vekting og estimering","vektberegning"],
["indeksberegning","indeksberegning"],
["usikkerhetsberegning","usikkerhetsberegning"],
["sesongjustering","sesongjustering"],
["konfidensialitet","konfidensialitet"],
["analyse","analyse"],
["maskinlæring", "maskinlaering"]]),
{label: "Metodeområde: ", value: " "}
)
// Filter data based on check boxes
/*
filtered = testdata.filter(function(data) {
return lang.every(r=> data.keyword.includes(r)) &&
tema.every(r=> data.keyword.includes(r))
;
})
*/
filtered = testdata.filter(r => r.keyword.includes(lang) &&
r.keyword.includes(tema));
function overflow_large(words) {
return (x) => htl.html`<div style="
display: inline-block;
width: 450px;
white-space: pre-line;
break-text: auto;
overflow-wrap: normal;
height: auto;
word-wrap: break-word;
overflow: auto;
">${x.toLocaleString("en")}`;
}
// Function for formatting names
function overflow_names(words) {
return (x) => htl.html`<div style="
display: inline-block;
width: 250px;
white-space: pre-line;
break-text: auto;
overflow-wrap: normal;
height: auto;
word-wrap: break-word;
overflow: auto;
">${x.toLocaleString("en")}`;
}
// Function for adding hyperlinks
function get_url(new_url) {
return (x) => htl.html`<a href=${x.split(";")[1]} target=_blank>${x.split(";")[0]} </a>`;
}
viewof filter_dt = Inputs.search(filtered)
table_out = Inputs.table(filter_dt, { columns: [
"func_link",
"pack_link",
"navn",
"description"
],
header: {
func_link: "Funksjon",
pack_link: "Pakke",
navn: "Navn",
description: "Beskrivelse"
},
format: {
func_link: get_url(
filter_dt,
(d) => d["func_lnk"]
),
pack_link: get_url(
filter_dt,
(d) =>d["pack_lnk"]
),
navn: overflow_names(
filter_dt,
(x) => x["navn"]
),
description: overflow_large(
filter_dt,
(x) => x["description"]
),
},
rows: 100
})