Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
grantmcdermott committed Mar 11, 2021
1 parent 55a9683 commit bfa0baa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions 16-databases/16-databases.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ At this point, you might be tempted to think of a database as the "thing" that y

## Databases and R

Virtually every database in existence makes use of [**SQL**](https://en.wikipedia.org/wiki/SQL) (**S**tructured **Q**uery **L**anguage ). SQL is an extremely powerful tool and has become something of prerequisite for many data science jobs. ([Exhibit A](https://raw.githack.com/uo-ec607/lectures/master/01-intro/01-Intro.html#21).) However, it is also an archaic language that is much less intuitive than the R tools that we have using thus far in the course. We'll see several examples of this shortly, but first the good news: You already have all the programming skills you need to start working with databases. This is because the tidyverse --- through **dplyr** --- allows for direct communication with databases from your local R environment.
Virtually every database in existence makes use of [**SQL**](https://en.wikipedia.org/wiki/SQL) (**S**tructured **Q**uery **L**anguage ). SQL is an extremely powerful tool and has become something of prerequisite for many data science jobs. ([Exhibit A](https://raw.githack.com/uo-ec607/lectures/master/01-intro/01-Intro.html#whyr).) However, it is also an archaic language that is much less intuitive than the R tools that we have using thus far in the course. We'll see several examples of this shortly, but first the good news: You already have all the programming skills you need to start working with databases. This is because the tidyverse --- through **dplyr** --- allows for direct communication with databases from your local R environment.

What does this mean?

Expand Down Expand Up @@ -689,7 +689,7 @@ dbDisconnect(gfw_con)

## Where to next: Learning and practicing SQL

While we did cover some SQL basics and syntax, my primary goal for this lecture has been to get you up running and running with databases as quickly and painlessly as possible. I really do think that you can get a great deal of mileage using the **dplyr** database integration that we've focused on here. However, learning SQL will make a big difference to your life once you start working with databases regularly. I expect that it will also boost your employment options significantly. The good news is that you are already well on your way to internalising the basic commands and structure of SQL queries. We've seen the `show_query()` function, which is a great way to get started if your coming from R and the tidyverse. Another helpful **dbplyr** resource is the "sql" vignette, so take a look:
While we did cover some SQL basics and syntax, my primary goal for this lecture has been to get you up running with databases as quickly and painlessly as possible. I really do think that you can get a great deal of mileage using the **dplyr** database integration that we've focused on here. However, learning SQL will make a big difference to your life once you start working with databases regularly. I expect that it will also boost your employment options significantly. The good news is that you are already well on your way to internalising the basic commands and structure of SQL queries. We've seen the `show_query()` function, which is a great way to get started if your coming from R and the tidyverse. Another helpful **dbplyr** resource is the "sql" vignette, so take a look:

```{r, eval=FALSE}
vignette('sql', package = 'dbplyr')
Expand Down
4 changes: 2 additions & 2 deletions 16-databases/16-databases.html
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ <h2>Databases 101</h2>
</div>
<div id="databases-and-r" class="section level2">
<h2>Databases and R</h2>
<p>Virtually every database in existence makes use of <a href="https://en.wikipedia.org/wiki/SQL"><strong>SQL</strong></a> (<strong>S</strong>tructured <strong>Q</strong>uery <strong>L</strong>anguage ). SQL is an extremely powerful tool and has become something of prerequisite for many data science jobs. (<a href="https://raw.githack.com/uo-ec607/lectures/master/01-intro/01-Intro.html#21">Exhibit A</a>.) However, it is also an archaic language that is much less intuitive than the R tools that we have using thus far in the course. We’ll see several examples of this shortly, but first the good news: You already have all the programming skills you need to start working with databases. This is because the tidyverse — through <strong>dplyr</strong> — allows for direct communication with databases from your local R environment.</p>
<p>Virtually every database in existence makes use of <a href="https://en.wikipedia.org/wiki/SQL"><strong>SQL</strong></a> (<strong>S</strong>tructured <strong>Q</strong>uery <strong>L</strong>anguage ). SQL is an extremely powerful tool and has become something of prerequisite for many data science jobs. (<a href="https://raw.githack.com/uo-ec607/lectures/master/01-intro/01-Intro.html#whyr">Exhibit A</a>.) However, it is also an archaic language that is much less intuitive than the R tools that we have using thus far in the course. We’ll see several examples of this shortly, but first the good news: You already have all the programming skills you need to start working with databases. This is because the tidyverse — through <strong>dplyr</strong> — allows for direct communication with databases from your local R environment.</p>
<p>What does this mean?</p>
<p>Simply that you can interact with the vast datasets that are stored in relational databases using the <em>same</em> tidyverse verbs and syntax that we already know. All of this is possible thanks to the <strong>dbplyr</strong> package (<a href="https://dbplyr.tidyverse.org/">link</a>), which provides a database backend to <strong>dplyr</strong>. What’s happening even further behind the scenes is that, upon installation, <strong>dbplyr</strong> suggests the <strong>DBI</strong> package (<a href="https://db.rstudio.com/dbi">link</a>) as a dependency. <strong>DBI</strong> provides a common interface that allows <strong>dplyr</strong> to work with many different databases using exactly the same code. You don’t even need to leave your RStudio session or learn SQL!</p>
<blockquote>
Expand Down Expand Up @@ -1096,7 +1096,7 @@ <h4>One last query: Global fishing effort in 2016</h4>
</div>
<div id="where-to-next-learning-and-practicing-sql" class="section level2">
<h2>Where to next: Learning and practicing SQL</h2>
<p>While we did cover some SQL basics and syntax, my primary goal for this lecture has been to get you up running and running with databases as quickly and painlessly as possible. I really do think that you can get a great deal of mileage using the <strong>dplyr</strong> database integration that we’ve focused on here. However, learning SQL will make a big difference to your life once you start working with databases regularly. I expect that it will also boost your employment options significantly. The good news is that you are already well on your way to internalising the basic commands and structure of SQL queries. We’ve seen the <code>show_query()</code> function, which is a great way to get started if your coming from R and the tidyverse. Another helpful <strong>dbplyr</strong> resource is the “sql” vignette, so take a look:</p>
<p>While we did cover some SQL basics and syntax, my primary goal for this lecture has been to get you up running with databases as quickly and painlessly as possible. I really do think that you can get a great deal of mileage using the <strong>dplyr</strong> database integration that we’ve focused on here. However, learning SQL will make a big difference to your life once you start working with databases regularly. I expect that it will also boost your employment options significantly. The good news is that you are already well on your way to internalising the basic commands and structure of SQL queries. We’ve seen the <code>show_query()</code> function, which is a great way to get started if your coming from R and the tidyverse. Another helpful <strong>dbplyr</strong> resource is the “sql” vignette, so take a look:</p>
<div class="sourceCode" id="cb68"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb68-1"><a href="#cb68-1" aria-hidden="true" tabindex="-1"></a><span class="fu">vignette</span>(<span class="st">&#39;sql&#39;</span>, <span class="at">package =</span> <span class="st">&#39;dbplyr&#39;</span>)</span></code></pre></div>
<p>In my experience, though the best best way to learn SQL is simply to <em>start writing your own queries</em>. The <a href="https://console.cloud.google.com/bigquery"><strong>BigQuery web UI</strong></a> is especially helpful in this regard. Not only is it extremely cheap to use (free up to 1 TB), but it also comes with a bunch of useful features like in-built query formatting and preemptive error detection. A good way to start is by copying over someone else’s SQL code — e.g. <a href="https://towardsdatascience.com/bigquery-without-a-credit-card-discover-learn-and-share-199e08d4a064">here</a> or <a href="https://globalfishingwatch.org/data-blog/our-data-in-bigquery/">here</a> — modifying it slightly, and then see if you can run it in the BigQuery web UI.</p>
</div>
Expand Down
Binary file modified 16-databases/16-databases.pdf
Binary file not shown.

0 comments on commit bfa0baa

Please sign in to comment.