Skip to content

Commit

Permalink
added riley and bondibene
Browse files Browse the repository at this point in the history
  • Loading branch information
benzipperer committed Nov 20, 2023
1 parent 298c6a3 commit c320101
Show file tree
Hide file tree
Showing 27 changed files with 7,664 additions and 2,897 deletions.
2 changes: 1 addition & 1 deletion _targets.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ citation_authors <- "Arindrajit Dube and Ben Zipperer"
citation_year <- 2023
citation_title <- "Minimum wage own-wage elasticity database"
citation_url <- "https://economic.github.io/owe"
data_version <- "0.6.1"
data_version <- "0.7.0"
owe_sheet <- "1-uBymldLhp5IsG-qiRmUGDy883ij8vjYdx6YpbHAing"

## Functions
Expand Down
205 changes: 182 additions & 23 deletions docs/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.3.450">
<meta name="generator" content="quarto-1.4.489">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

Expand Down Expand Up @@ -55,12 +55,11 @@

<body class="nav-fixed fullcontent">


<div id="quarto-search-results"></div>
<header id="quarto-header" class="headroom fixed-top">
<nav class="navbar navbar-expand-lg navbar-dark ">
<nav class="navbar navbar-expand-lg " data-bs-theme="dark">
<div class="navbar-container container-fluid">
<div class="navbar-brand-container">
<div class="navbar-brand-container mx-auto">
<a class="navbar-brand" href="./index.html">
<span class="navbar-title">OWE database</span>
</a>
Expand All @@ -71,40 +70,40 @@
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-nav-scroll me-auto">
<li class="nav-item">
<a class="nav-link" href="./index.html" rel="" target="">
<span class="menu-text">Overview</span></a>
<a class="nav-link" href="./index.html">
<span class="menu-text">Overview</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="./table.html" rel="" target="">
<span class="menu-text">Explore</span></a>
<a class="nav-link" href="./table.html">
<span class="menu-text">Explore</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="./download.html" rel="" target="">
<span class="menu-text">Download</span></a>
<a class="nav-link" href="./download.html">
<span class="menu-text">Download</span></a>
</li>
<li class="nav-item">
<a class="nav-link active" href="./documentation.html" rel="" target="" aria-current="page">
<span class="menu-text">Documentation</span></a>
<a class="nav-link active" href="./documentation.html" aria-current="page">
<span class="menu-text">Documentation</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="./news.html" rel="" target="">
<span class="menu-text">What’s New</span></a>
<a class="nav-link" href="./news.html">
<span class="menu-text">What’s New</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="./submit.html" rel="" target="">
<span class="menu-text">Submit</span></a>
<a class="nav-link" href="./submit.html">
<span class="menu-text">Submit</span></a>
</li>
</ul>
<ul class="navbar-nav navbar-nav-scroll ms-auto">
<li class="nav-item compact">
<a class="nav-link" href="https://github.com/economic/owe" rel="" target=""><i class="bi bi-github" role="img" aria-label="OWE GitHub">
<a class="nav-link" href="https://github.com/economic/owe"> <i class="bi bi-github" role="img" aria-label="OWE GitHub">
</i>
<span class="menu-text"></span></a>
<span class="menu-text"></span></a>
</li>
</ul>
<div class="quarto-navbar-tools">
</div>
</div> <!-- /navcollapse -->
<div class="quarto-navbar-tools">
</div>
</div> <!-- /container-fluid -->
</nav>
</header>
Expand All @@ -131,8 +130,10 @@ <h1 class="title">Documentation</h1>
</div>



</header>


<p>Description of database</p>
<p>Paper abstract and link</p>

Expand Down Expand Up @@ -218,10 +219,9 @@ <h1 class="title">Documentation</h1>
// clear code selection
e.clearSelection();
});
function tippyHover(el, contentFn) {
function tippyHover(el, contentFn, onTriggerFn, onUntriggerFn) {
const config = {
allowHTML: true,
content: contentFn,
maxWidth: 500,
delay: 100,
arrow: false,
Expand All @@ -231,8 +231,17 @@ <h1 class="title">Documentation</h1>
interactive: true,
interactiveBorder: 10,
theme: 'quarto',
placement: 'bottom-start'
placement: 'bottom-start',
};
if (contentFn) {
config.content = contentFn;
}
if (onTriggerFn) {
config.onTrigger = onTriggerFn;
}
if (onUntriggerFn) {
config.onUntrigger = onUntriggerFn;
}
window.tippy(el, config);
}
const noterefs = window.document.querySelectorAll('a[role="doc-noteref"]');
Expand All @@ -246,6 +255,128 @@ <h1 class="title">Documentation</h1>
const note = window.document.getElementById(id);
return note.innerHTML;
});
}
const xrefs = window.document.querySelectorAll('a.quarto-xref');
const processXRef = (id, note) => {
// Strip column container classes
const stripColumnClz = (el) => {
el.classList.remove("page-full", "page-columns");
if (el.children) {
for (const child of el.children) {
stripColumnClz(child);
}
}
}
stripColumnClz(note)
const typesetMath = (el) => {
if (window.MathJax) {
// MathJax Typeset
window.MathJax.typeset([el]);
} else if (window.katex) {
// KaTeX Render
var mathElements = el.getElementsByClassName("math");
var macros = [];
for (var i = 0; i < mathElements.length; i++) {
var texText = mathElements[i].firstChild;
if (mathElements[i].tagName == "SPAN") {
window.katex.render(texText.data, mathElements[i], {
displayMode: mathElements[i].classList.contains('display'),
throwOnError: false,
macros: macros,
fleqn: false
});
}
}
}
}
if (id === null || id.startsWith('sec-')) {
// Special case sections, only their first couple elements
const container = document.createElement("div");
if (note.children && note.children.length > 2) {
for (let i = 0; i < 2; i++) {
container.appendChild(note.children[i].cloneNode(true));
}
typesetMath(container);
return container.innerHTML
} else {
typesetMath(note);
return note.innerHTML;
}
} else {
// Remove any anchor links if they are present
const anchorLink = note.querySelector('a.anchorjs-link');
if (anchorLink) {
anchorLink.remove();
}
typesetMath(note);
return note.innerHTML;
}
}
for (var i=0; i<xrefs.length; i++) {
const xref = xrefs[i];
tippyHover(xref, undefined, function(instance) {
instance.disable();
let url = xref.getAttribute('href');
let hash = undefined;
if (url.startsWith('#')) {
hash = url;
} else {
try { hash = new URL(url).hash; } catch {}
}
if (hash) {
const id = hash.replace(/^#\/?/, "");
const note = window.document.getElementById(id);
if (note !== null) {
try {
const html = processXRef(id, note.cloneNode(true));
instance.setContent(html);
} finally {
instance.enable();
instance.show();
}
} else {
// See if we can fetch this
fetch(url.split('#')[0])
.then(res => res.text())
.then(html => {
const parser = new DOMParser();
const htmlDoc = parser.parseFromString(html, "text/html");
const note = htmlDoc.getElementById(id);
if (note !== null) {
const html = processXRef(id, note);
instance.setContent(html);
}
}).finally(() => {
instance.enable();
instance.show();
});
}
} else {
// See if we can fetch a full url (with no hash to target)
// This is a special case and we should probably do some content thinning / targeting
fetch(url)
.then(res => res.text())
.then(html => {
const parser = new DOMParser();
const htmlDoc = parser.parseFromString(html, "text/html");
const note = htmlDoc.querySelector('main.content');
if (note !== null) {
// This should only happen for chapter cross references
// (since there is no id in the URL)
// remove the first header
if (note.children.length > 0 && note.children[0].tagName === "HEADER") {
note.children[0].remove();
}
const html = processXRef(null, note);
instance.setContent(html);
}
}).finally(() => {
instance.enable();
instance.show();
});
}
}, function(instance) {
});
}
let selectedAnnoteEl;
const selectorForAnnotation = ( cell, annotation) => {
Expand Down Expand Up @@ -288,6 +419,7 @@ <h1 class="title">Documentation</h1>
}
div.style.top = top - 2 + "px";
div.style.height = height + 4 + "px";
div.style.left = 0;
let gutterDiv = window.document.getElementById("code-annotation-line-highlight-gutter");
if (gutterDiv === null) {
gutterDiv = window.document.createElement("div");
Expand All @@ -313,6 +445,32 @@ <h1 class="title">Documentation</h1>
});
selectedAnnoteEl = undefined;
};
// Handle positioning of the toggle
window.addEventListener(
"resize",
throttle(() => {
elRect = undefined;
if (selectedAnnoteEl) {
selectCodeLines(selectedAnnoteEl);
}
}, 10)
);
function throttle(fn, ms) {
let throttle = false;
let timer;
return (...args) => {
if(!throttle) { // first call gets through
fn.apply(this, args);
throttle = true;
} else { // all the others get throttled
if(timer) clearTimeout(timer); // cancel #2
timer = setTimeout(() => {
fn.apply(this, args);
timer = throttle = false;
}, ms);
}
};
}
// Attach click handler to the DT
const annoteDls = window.document.querySelectorAll('dt[data-target-cell]');
for (const annoteDlNode of annoteDls) {
Expand Down Expand Up @@ -376,4 +534,5 @@ <h1 class="title">Documentation</h1>




</body></html>
Loading

0 comments on commit c320101

Please sign in to comment.