- Get the data from Database by using SQL
- Working with Rmd file
- Publishing your own portfolio website with Github Pages
- Open progress form Class 08 and checked on Study Check-In
- Open R Studio Desktop and install package
rmarkdown - Checked on 0 prerequisite in progress form
A fork is a copy of a repository. Forking a repository allows you to freely experiment with changes without affecting the original project. Ref: Fork a repo
- On GitHub.com, navigate to the int214-workshop repository.
- In the top-right corner of the page, click Fork.
- Cloning your forked repository for access this repository locally on your computer. (Guideline: Cloning)
Now, you will have own repository and you can access file on your computer
In this part we will using knowledge about SQL to get data from database. We using sqliteonline which is User-friendly interface for data science to connect the database. I have provide database_int214.db which is mockup database file to do this step. You can see this file in your repository.
- Go to URL: https://sqliteonline.com/
- Load DB: File > Open DB
- Let's try to use sql command to explore dataset in database
- Export to csv named
db_int214which set the first line is column name then saved to your folder.
R Markdown is a file format for making dynamic documents with R. An R Markdown document is written in markdown (an easy-to-write plain text format) and contains chunks of embedded R code. Ref: Rmd We can using Rmd to make a report.
install.packages("rmarkdown")
- Open R Studio desktop and setting working directory to your repository folder.
- Open file
index.Rmdin your repository folder - Click run all and see result
Click button Knit in R Studio Desktop to save in HTML file
GitHub Pages is a static site hosting service that takes HTML, CSS, and JavaScript files straight from a repository on GitHub, optionally runs the files through a build process, and publishes a website. (Ref: GitHub Pages). We will using Github Pages to publish the website from previous step.
Tip: If
index.htmlis present, this will be used instead ofindex.md. If neitherindex.htmlnorindex.mdare present,README.mdwill be used. (Ref)
- Commit and push file
index.htmlto your repository - On GitHub.com, navigate to your repository.
- Under your repository name, click Settings.
- In the left sidebar, click Pages.
- Under "GitHub Pages", use the None or Branch drop-down menu and select a publishing source.
- Optionally, use the drop-down menu to select a folder for your publishing source.
- Click Save.
- Waiting and see the result. (If your Github Pages site is not detecting index.html you can concatenate
/index.htmlat the end of your web url)
See Instruction with Image at: GitHub Pages
