Skip to content

Commit

Permalink
Merge pull request #29 from ecohealthalliance/dev
Browse files Browse the repository at this point in the history
edit chapters; fix #18; fix #19; fix #16
  • Loading branch information
ernestguevarra authored Dec 1, 2024
2 parents 226aaa6 + b38cbdb commit 45f31bd
Show file tree
Hide file tree
Showing 15 changed files with 577 additions and 124 deletions.
125 changes: 125 additions & 0 deletions 01-dolt.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
---
output-file: dolt.html
---

# Dolt {#sec-dolt}

Dolt is a SQL database you can fork, clone, branch, merge, push and pull just like a Git repository. Connect to Dolt just like any MySQL database to run SQL queries. Use the command line interface to import CSV files, commit your changes, push them to a remote, or merge your teammate's changes.

All the commands you know from Git work exactly the same in Dolt. Git versions files, Dolt versions tables. It's like Git and MySQL had a baby.

Dolt is a [version controlled database](/tools.html#sec-version-controlled-database). Dolt is [Git for Data](/tools.html#sec-dolt-for-data). Dolt is a [Versioned MySQL Replica](tools.html#sec-versioned-mysql-replica).

## Version Controlled Database {#sec-version-controlled-database}

Dolt is a [version controlled SQL database](https://www.dolthub.com/blog/2021-09-17-database-version-control/). Connect to Dolt just like any MySQL database to run SQL queries. Use Dolt [system tables](https://docs.dolthub.com/sql-reference/version-control/dolt-system-tables), [functions](https://docs.dolthub.com/sql-reference/version-control/dolt-sql-functions), or [procedures](https://docs.dolthub.com/sql-reference/version-control/dolt-sql-procedures) to access version control information and features.

## Git for Data {#sec-dolt-for-data}

Dolt is [Git for data](https://www.dolthub.com/blog/2020-03-06-so-you-want-git-for-data/). Dolt matches the [Git CLI](https://docs.dolthub.com/cli-reference/cli) exactly. When you would have run `git add`, you run `dolt add`. When you would have run `git commit`, you run `dolt commit`.

## Versioned MySQL Replica {#sec-versioned-mysql-replica}

Dolt can be deployed as a [Versioned MySQL Replica](https://www.dolthub.com/blog/2023-03-15-getting-started-versioned-mysql-replica/). Because Dolt is MySQL compatible, Dolt can be configured just like any other MySQL replica. A Dolt replica gives you features of a [version controlled database](https://www.dolthub.com/blog/2021-09-17-database-version-control/) without migrating from MySQL.

## Installing Dolt {#sec-install-dolt}

Dolt is extremely simple to install. Dolt is a single ~100 megabyte program. To install it, you download or compile that program and put it on your PATH. To install in specific operating systems, follow the instructions below:

::: {.panel-tabset}

### Windows {#sec-install-dolt-windows}

#### winget {#sec-install-dolt-windows-winget .unnumbered}

```bash
winget install dolt
```

<br/>

#### Chocolatey {#sec-install-dolt-windows-chocolatey .unnumbered}

```bash
choco install dolt
```

Both `.msi` files and `.zip` files are available.

<br/>

#### Scoop {#sec-install-dolt-windows-scoop .unnumbered}

```bash
scoop install dolt
```

<br/>

#### MSI Files {#sec-install-dolt-windows-msi .unnumbered}

The easiest way to install Dolt on Windows is to use the MSI files that are provided with each release. They can be found in the Assets section of every release. Grab the latest [here](https://github.com/dolthub/dolt/releases/latest).

<br/>

#### `.zip` Archive {#sec-install-dolt-windows-zip .unnumbered}

For those preferring to install Dolt manually a zipped archive is provided with the requisite executables. It can be found in assets along with the [latest release](https://github.com/dolthub/dolt/releases/latest).

### macOS {#sec-install-dolt-mac}

#### Install Script {#sec-install-dolt-macos-install-script .unnumbered}

The download script for Linux can be used, as OSX is a `*nix` system. It will download the appropriate binary, and place it in `/usr/local/bin`:

```bash
sudo bash -c 'curl -L https://github.com/dolthub/dolt/releases/latest/download/install.sh | bash'
```

<br/>

#### Homebrew {#sec-install-dolt-macos-homebrew .unnumbered}

A Homebrew formula is available with with every release, so Mac users using Homebrew for package management can build Dolt from source with a single command:

```bash
$ brew install dolt
==> Downloading https://homebrew.bintray.com/bottles/dolt-0.18.3.catalina.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/c03cc532d5045fa090cb4e0f141883685de3765bf1d221e400c750b3ae89e328?response-content-disposition=attachment%3Bfilename%3D%22dolt-0.18.3.catalina.bottle.tar.gz%22&Policy=eyJTdGF0
######################################################################## 100.0%
==> Pouring dolt-0.18.3.catalina.bottle.tar.gz
🍺 /usr/local/Cellar/dolt/0.18.3: 7 files, 56.9MB
```

which will install Dolt as follows:

```bash
$ ls -ltr $(which dolt)
lrwxr-xr-x 1 oscarbatori admin 30 Aug 26 16:49 /usr/local/bin/dolt -> ../Cellar/dolt/0.18.3/bin/dolt
```

<br/>

#### MacPorts {#sec-install-dolt-macos-macport .unnumbered}

On macOS, Dolt can also be installed via a [community-managed port](https://ports.macports.org/port/dolt/) via [MacPorts](https://www.macports.org/):

```bash
sudo port install dolt
```

### Linux {#sec-install-dolt-linux}

For Linux users, an installation script is available that will detect your architecture, download the appropriate binary, and place in `/usr/local/bin`:

```bash
sudo bash -c 'curl -L https://github.com/dolthub/dolt/releases/latest/download/install.sh | sudo bash'
```

The use of `sudo` is required to ensure the binary lands in your path.

:::




31 changes: 31 additions & 0 deletions 02-dolthub.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
output-file: dolthub.html
---

# DoltHub {#sec-dolthub}

[DoltHub](https://www.dolthub.com) is a place to share Dolt databases. We host public data for free! DoltHub adds a modern, secure, always on database management web GUI to the Dolt ecosystem. Edit your database on the web, have another person review it via a pull request, and have the production database pull it to deploy.

## What is DoltHub {#sec-what-is-dolthub}

DoltHub is GitHub for Dolt. DoltHub acts as a [Dolt remote](https://docs.dolthub.com/concepts/dolt/git/remotes) you can [clone](https://docs.dolthub.com/cli-reference/cli#dolt-clone), [push](https://docs.dolthub.com/cli-reference/cli#dolt-push), [pull](https://docs.dolthub.com/cli-reference/cli#dolt-pull) and [fetch](https://docs.dolthub.com/cli-reference/cli#dolt-fetch) from. DoltHub adds [permissions](https://docs.dolthub.com/concepts/dolthub/permissions), [pull requests](https://docs.dolthub.com/concepts/dolthub/prs), [issues](https://docs.dolthub.com/concepts/dolthub/issues), and [forks](https://docs.dolthub.com/concepts/dolthub/forks) to the Dolt ecosystem. Additionally, DoltHub has a modern SQL workbench built in so you can explore and change databases on the web.

## Getting Started {#sec-dolthub-getting-started}

DoltHub has many uses. We recommend getting started by [sharing a database](https://docs.dolthub.com/products/dolthub/data-sharing).

This documentation will walk you through discovering data on DoltHub, cloning a copy locally, making a change on a fork, and submitting a pull request to the original database.

## DoltHub API {#sec-dolthub-api}

DoltHub has an [API](https://docs.dolthub.com/products/dolthub/api) you can script against. The documentation covers:

1. [Authentication](https://docs.dolthub.com/products/dolthub/api/authentication)

2. [SQL API](https://docs.dolthub.com/products/dolthub/api/sql) - Used to make read or write SQL queries to a DoltHub database

3. [CSV API](https://docs.dolthub.com/products/dolthub/api/csv) - Used to download CSV format files of DoltHub tables

4. [Database API](https://docs.dolthub.com/products/dolthub/api/database) - Used to interact with DoltHub databases and pull requests

5. [Hooks](https://docs.dolthub.com/products/dolthub/api/hooks) - Used to receive change events to your DoltHub databases
12 changes: 12 additions & 0 deletions 03-rstats.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
output-file: rstats.html
---

# R {#sec-rstats}

[R](https://cran.r-project.org) is a free and open-source programming language and software environment for statistical computing and graphics. It was first developed in the early 1990s by Ross Ihaka and Robert Gentleman at the University of Auckland, New Zealand, and is now widely used by statisticians, data analysts, and researchers across various fields.

R provides a wide range of statistical and graphical techniques, including linear and nonlinear modeling, classical statistical tests, time-series analysis, classification, clustering, and more. It also has a large and active community of users and developers who contribute to the development of new packages and extensions for the language.

R is popular in the field of data science, as it provides a powerful and flexible platform for analyzing and visualizing data. It can be used in conjuction with other tools such as Airtable through community-developed packages making it particularly well-suited for the current use-case of the RIG.

Loading

0 comments on commit 45f31bd

Please sign in to comment.