Skip to content

Commit

Permalink
Create automated build
Browse files Browse the repository at this point in the history
  • Loading branch information
RRC_GHA committed Feb 15, 2024
1 parent 525aa39 commit f147a9a
Show file tree
Hide file tree
Showing 24 changed files with 212 additions and 91 deletions.
4 changes: 2 additions & 2 deletions public/2024-02-arctic/index.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.4.549">
<meta name="generator" content="quarto-1.4.550">

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

Expand Down Expand Up @@ -796,7 +796,7 @@ <h2 class="anchored" data-anchor-id="about-this-book">About this book</h2>
<div class="nav-page nav-page-previous">
</div>
<div class="nav-page nav-page-next">
<a href="./session_01.html" class="pagination-link" aria-label="<span class='chapter-number'>1</span>&nbsp; <span class='chapter-title'>Introduction to the Arctic Data Center</span>">
<a href="./session_01.html" class="pagination-link" aria-label="Introduction to the Arctic Data Center">
<span class="nav-page-text"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Introduction to the Arctic Data Center</span></span> <i class="bi bi-arrow-right-short"></i>
</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions public/2024-02-arctic/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@
"href": "session_07.html#joins",
"title": "7  Data Modeling Essentials",
"section": "7.4 Joins",
"text": "7.4 Joins\nFrequently, analysis of data will require merging these separately managed tables back together. There are multiple ways to join the observations in two tables, based on how the rows of one table are merged with the rows of the other. Regardless of the join we will perform, we need to start by identifying the primary key in each table and how these appear as foreign keys in other tables.\nWhen conceptualizing merges, one can think of two tables, one on the left and one on the right.\n\n\n7.4.1 Inner Join\nAn INNER JOIN is when you merge the subset of rows that have matches in both the left table and the right table.\n\n\n\n7.4.2 Left Join\nA LEFT JOIN takes all of the rows from the left table, and merges on the data from matching rows in the right table. Keys that don’t match from the left table are still provided with a missing value (na) from the right table.\n\n\n\n7.4.3 Right Join\nA RIGHT JOIN is the same as a left join, except that all of the rows from the right table are included with matching data from the left, or a missing value. Notice that left and right joins can ultimately be the same depending on the positions of the tables\n\n\n\n7.4.4 Full Outer Join\nFinally, a FULL OUTER JOIN includes all data from all rows in both tables, and includes missing values wherever necessary.\n\nSometimes people represent joins as Venn diagrams, showing which parts of the left and right tables are included in the results for each join. This representation is useful, however, they miss part of the story related to where the missing value comes from in each result.\n\n\n\nImage source: R for Data Science, Wickham & Grolemund.\n\n\nWe suggest reading the Relational Data chapter in the “R for Data Science” book for more examples and best practices about joins.\n\n\n7.4.5 Entity-Relationship models\nAn Entity-Relationship model (E-R model), also known as an E-R diagram, is a way to draw a compact diagram that reflects the structure and relationships of the tables in a relational database. These can be particularly useful for big databases that have many tables and complex relationships between them.\nWe will explain the steps to drawing a simplified E-R model with our previous plants and sites tables.\nStep 1: Identify the entities in the relational database and add each one in a box. In our case, entities are [plants] and [sites], since we are gathering observations about both of these.\n\n\n\n\n\nStep 2: Add variables for each entity and identify keys. Add the variables as a list inside each box. Then, identify the primary and foreign keys in each of the boxes. To visualize this, we have indicated\n\nthe primary key (of each entity) in red and\nany foreign keys in blue .\n\n\n\n\n\n\nStep 3: Add relationships between entities.\n\nDraw a line between the boxes of any two entities that have a relationship.\nIdentify which box has the primary key of the other as a foreign key. Let’s call the box that has the foreign key [box1] and the other box [box2]. Using the previous diagram we can see that “site” is the primary key of [sites] and appears as a foreign key in [plants]. So [plants] is [box1] and [sites] is [box2].\nAdd a word describing how [box1] is related to [box2] above the line connecting the two boxes. So, for example, we need to describe how [plants] is related to [sites]. The relation is “a plant is located in a site”, so we write “located” above the line indicating the relationship between [plants] and [sites].\n\n\n\n\n\n\nStep 4: Add cardinality to every relationship in the diagram. At this step we want to quantify how many items in an entity are related to another entity. This is easiest if we reuse the description we found in the previous step. For example, “a plant is located in one site”. Then we add the symbol for “one” at the end of the line going from [plants] to [sites].\n\n\n\n\n\nTo finish, we also indicate how many plants are related to a single site. Since “a site has many plants”, we add the symbol for “many” at the end of the line going from [sites] to [plants]\n\n\n\n\n\nThat’s it! The symbols we used at the end of the lines are called ERD “crow’s foot”. You can see all the existing ones together with an example in the next diagram.\n\n\n\n\n\n\n\nNote\n\n\n\nIf you need to produce a publishable E-R model such as the one above, Mermaid is a great option. Read more about how to use this tool to create diagrams here .",
"text": "7.4 Joins\nFrequently, analysis of data will require merging these separately managed tables back together. There are multiple ways to join the observations in two tables, based on how the rows of one table are merged with the rows of the other. Regardless of the join we will perform, we need to start by identifying the primary key in each table and how these appear as foreign keys in other tables.\nWhen conceptualizing merges, one can think of two tables, one on the left and one on the right.\n\n\n7.4.1 Inner Join\nAn INNER JOIN is when you merge the subset of rows that have matches in both the left table and the right table.\n\n\n\n7.4.2 Left Join\nA LEFT JOIN takes all of the rows from the left table, and merges on the data from matching rows in the right table. Keys that don’t match from the left table are still provided with a missing value (na) from the right table.\n\n\n\n7.4.3 Right Join\nA RIGHT JOIN is the same as a left join, except that all of the rows from the right table are included with matching data from the left, or a missing value. Notice that left and right joins can ultimately be the same depending on the positions of the tables\n\n\n\n7.4.4 Full Outer Join\nFinally, a FULL OUTER JOIN includes all data from all rows in both tables, and includes missing values wherever necessary.\n\nSometimes people represent joins as Venn diagrams, showing which parts of the left and right tables are included in the results for each join. This representation is useful, however, they miss part of the story related to where the missing value comes from in each result.\n\n\n\nImage source: R for Data Science, Wickham & Grolemund.\n\n\nWe suggest reading the Relational Data chapter in the “R for Data Science” book for more examples and best practices about joins.\n\n\n7.4.5 Entity-Relationship models\nAn Entity-Relationship model (E-R model), also known as an E-R diagram, is a way to draw a compact diagram that reflects the structure and relationships of the tables in a relational database. These can be particularly useful for big databases that have many tables and complex relationships between them.\nWe will explain the steps to drawing a simplified E-R model with our previous plants and sites tables.\nStep 1: Identify the entities in the relational database and add each one in a box. In our case, entities are [plants] and [sites], since we are gathering observations about both of these.\n\n\n\n\n\nStep 2: Add variables for each entity and identify keys. Add the variables as a list inside each box. Then, identify the primary and foreign keys in each of the boxes. To visualize this, we have indicated\n\nthe primary key (of each entity) in red and\nany foreign keys in blue .\n\n\n\n\n\n\nStep 3: Add relationships between entities.\n\nDraw a line between the boxes of any two entities that have a relationship.\nIdentify which box has the primary key of the other as a foreign key. Let’s call the box that has the foreign key [box1] and the other box [box2]. Using the previous diagram we can see that “site” is the primary key of [sites] and appears as a foreign key in [plants]. So [plants] is [box1] and [sites] is [box2].\nAdd a word describing how [box1] is related to [box2] above the line connecting the two boxes. So, for example, we need to describe how [plants] is related to [sites]. The relation is “a plant is located in a site”, so we write “located” above the line indicating the relationship between [plants] and [sites].\n\n\n\n\n\n\nStep 4: Add cardinality to every relationship in the diagram. At this step we want to quantify how many items in an entity are related to another entity. This is easiest if we reuse the description we found in the previous step. For example, “a plant is located in one site”. Then we add the symbol for “one” at the end of the line going from [plants] to [sites].\n\n\n\n\n\nTo finish, we also indicate how many plants are related to a single site. Since “a site has many plants”, we add the symbol for “many” at the end of the line going from [sites] to [plants]\n\n\n\n\n\nThat’s it!\n\n7.4.5.1 EDR Crow’s Foot\nThe symbols we used at the end of the lines are called ERD “crow’s foot”. You can see all the existing ones together with an example in the next diagram.\n\n\n\n\n\n\n\nNote\n\n\n\nIf you need to produce a publishable E-R model such as the one above, Mermaid is a great option. Read more about how to use this tool to create diagrams here .",
"crumbs": [
"<span class='chapter-number'>7</span>  <span class='chapter-title'>Data Modeling Essentials</span>"
]
Expand Down Expand Up @@ -554,7 +554,7 @@
"href": "session_07.html#activity",
"title": "7  Data Modeling Essentials",
"section": "7.7 Activity",
"text": "7.7 Activity\nWe will work on an in-person, offline activity to practice identifying tidy data, normalizing data, draing E-R models, and performing joins. The data tables we will use have been adapted from the following dataset for teaching purposes:\nWarren, P.S., A. Kinzig, C.A. Martin, and L. Machabee. 2021. Ecological and social Interactions in urban parks: bird surveys in local parks in the central Arizona-Phoenix metropolitan area ver 10. Environmental Data Initiative. https://doi.org/10.6073/pasta/f6f004bc7112ce266fde2b80fad19ff4 (Accessed 2023-06-28).",
"text": "7.7 Activity\nIn groups of 3-4 we will do two activities that will help us put into practice the concepts of tidy data, identifying keys and structuring relational data.\n\n7.7.1 Exercise 1:Identifying Tidy Data\n\n\n\n\n\n\nDoes the table follow the tidy data principles?\n\n\n\n\nLook at the tables on this file and determine if they follow the three tidy data principles. If not, which ones aren’t met?\nHow would you wrangle the data to make it tidy? Describe the steps you would take to tidy the data.\nSketch how would the tidy version look like.\n\n\n\n\n\n7.7.2 Excersice 2: Relational Databases\n\n\n\n\n\n\nPrompt\n\n\n\n\nOur funding agency requires that we take surveys of individuals who complete our training courses so that we can report on the demographics of our trainees and how effective they find our courses to be.\n\n\n\n\n\n\n\n\n\nDesign data collection tables\n\n\n\n\nIn your small groups, design a set of tables that will capture information collected in a participant survey that would apply to many courses.\nDon’t focus on designing a comprehensive set of questions for the survey, one or two simple questions would be sufficient (eg: “Did the course meet your expectations?”, “What could be improved?”, “To what degree did your knowledge increase?”).\nInclude variables (columns) with basic set of information from the surveys and about the courses, such as the date of the course and name of the course, etc.\n\n\n\n\n\n\n\n\n\nCreate entity relationsip model\n\n\n\nAfter you have thought about what kind of information you care collecting, let’s break it down and build the entity-relationship model.\n\nIdentify the entities in the relational database and add each one in a box.\nAdd variables for each entity.\nIdentify the primary and foreign keys for those entities that relate to each other.\nAdd “words” describing how each entity relates\nAdd cardinality to every relationship in the diagram. This mean, use the EDR Crow’s Foot Quick Reference to quantify how many items in an entity are related to another entity.",
"crumbs": [
"<span class='chapter-number'>7</span>  <span class='chapter-title'>Data Modeling Essentials</span>"
]
Expand Down
6 changes: 3 additions & 3 deletions public/2024-02-arctic/session_01.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.4.549">
<meta name="generator" content="quarto-1.4.550">

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

Expand Down Expand Up @@ -776,12 +776,12 @@ <h3 data-number="1.1.9" class="anchored" data-anchor-id="summary"><span class="h
</script>
<nav class="page-navigation">
<div class="nav-page nav-page-previous">
<a href="./index.html" class="pagination-link aria-label=" about="" the="" course"="">
<a href="./index.html" class="pagination-link" aria-label="About the course">
<i class="bi bi-arrow-left-short"></i> <span class="nav-page-text">About the course</span>
</a>
</div>
<div class="nav-page nav-page-next">
<a href="./session_02.html" class="pagination-link" aria-label="<span class='chapter-number'>2</span>&nbsp; <span class='chapter-title'>RStudio &amp; git Setup</span>">
<a href="./session_02.html" class="pagination-link" aria-label="RStudio &amp; git Setup">
<span class="nav-page-text"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">RStudio &amp; git Setup</span></span> <i class="bi bi-arrow-right-short"></i>
</a>
</div>
Expand Down
6 changes: 3 additions & 3 deletions public/2024-02-arctic/session_02.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.4.549">
<meta name="generator" content="quarto-1.4.550">

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

Expand Down Expand Up @@ -950,12 +950,12 @@ <h2 data-number="2.7" class="anchored" data-anchor-id="github-authentication"><s
</script>
<nav class="page-navigation">
<div class="nav-page nav-page-previous">
<a href="./session_01.html" class="pagination-link aria-label=" &lt;span="" to="" the="" arctic="" data="" center&lt;="" span&gt;"="">
<a href="./session_01.html" class="pagination-link" aria-label="Introduction to the Arctic Data Center">
<i class="bi bi-arrow-left-short"></i> <span class="nav-page-text"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Introduction to the Arctic Data Center</span></span>
</a>
</div>
<div class="nav-page nav-page-next">
<a href="./session_03.html" class="pagination-link" aria-label="<span class='chapter-number'>3</span>&nbsp; <span class='chapter-title'>Literate Analysis with Quarto</span>">
<a href="./session_03.html" class="pagination-link" aria-label="Literate Analysis with Quarto">
<span class="nav-page-text"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Literate Analysis with Quarto</span></span> <i class="bi bi-arrow-right-short"></i>
</a>
</div>
Expand Down
6 changes: 3 additions & 3 deletions public/2024-02-arctic/session_03.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.4.549">
<meta name="generator" content="quarto-1.4.550">

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

Expand Down Expand Up @@ -1360,12 +1360,12 @@ <h2 data-number="3.10" class="anchored" data-anchor-id="troubleshooting-my-rmark
</script>
<nav class="page-navigation">
<div class="nav-page nav-page-previous">
<a href="./session_02.html" class="pagination-link aria-label=" &lt;span="" &amp;="" git="" setup&lt;="" span&gt;"="">
<a href="./session_02.html" class="pagination-link" aria-label="RStudio &amp; git Setup">
<i class="bi bi-arrow-left-short"></i> <span class="nav-page-text"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">RStudio &amp; git Setup</span></span>
</a>
</div>
<div class="nav-page nav-page-next">
<a href="./session_04.html" class="pagination-link" aria-label="<span class='chapter-number'>4</span>&nbsp; <span class='chapter-title'>Data Managment Plans</span>">
<a href="./session_04.html" class="pagination-link" aria-label="Data Managment Plans">
<span class="nav-page-text"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Data Managment Plans</span></span> <i class="bi bi-arrow-right-short"></i>
</a>
</div>
Expand Down
6 changes: 3 additions & 3 deletions public/2024-02-arctic/session_04.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.4.549">
<meta name="generator" content="quarto-1.4.550">

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

Expand Down Expand Up @@ -798,12 +798,12 @@ <h3 data-number="4.1.10" class="anchored" data-anchor-id="additional-resources">
</script>
<nav class="page-navigation">
<div class="nav-page nav-page-previous">
<a href="./session_03.html" class="pagination-link aria-label=" &lt;span="" analysis="" with="" quarto&lt;="" span&gt;"="">
<a href="./session_03.html" class="pagination-link" aria-label="Literate Analysis with Quarto">
<i class="bi bi-arrow-left-short"></i> <span class="nav-page-text"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Literate Analysis with Quarto</span></span>
</a>
</div>
<div class="nav-page nav-page-next">
<a href="./session_05.html" class="pagination-link" aria-label="<span class='chapter-number'>5</span>&nbsp; <span class='chapter-title'>Documenting and Publishing Data</span>">
<a href="./session_05.html" class="pagination-link" aria-label="Documenting and Publishing Data">
<span class="nav-page-text"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Documenting and Publishing Data</span></span> <i class="bi bi-arrow-right-short"></i>
</a>
</div>
Expand Down
Loading

0 comments on commit f147a9a

Please sign in to comment.