-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from solichatuszhrh/main
add assignments
- Loading branch information
Showing
94 changed files
with
8,499 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Portfolio Hosted on GitHub | ||
Link to GitHub template <https://github.com/solichatuszhrh/privateporto> | ||
|
||
Link to the website <https://solichatuszhrh.github.io/privateporto/> | ||
|
||
|
||
|
||
# R-package | ||
Link to Github <https://github.com/solichatuszhrh/NewtonRaphson> |
Binary file not shown.
1,009 changes: 1,009 additions & 0 deletions
1,009
Solichatus Zahroh/SolichatusZahroh_Wk2/ex2-speaker.html
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,190 @@ | ||
--- | ||
title: "See This!" | ||
author: | ||
- name: Solichatus Zahroh | ||
orcid: 0009-0009-7911-0256 | ||
email: [email protected] | ||
affiliation: Utrecht University | ||
date: 24 Oct 2023 | ||
date-format: "DD MMM YYYY" | ||
bibliography: C:/Users/Zenius/Downloads/references.bib | ||
nocite: | | ||
@killaars | ||
editor: source | ||
format: | ||
revealjs: | ||
progress: true | ||
multiplex: true | ||
transition: fade | ||
slide-number: true | ||
margin: 0.075 | ||
logo: "logo.png" | ||
toc: false | ||
toc-depth: 1 | ||
toc-title: Outline | ||
scrollable: true | ||
reference-location: margin | ||
footer: Solichatus Zahroh - UU | ||
--- | ||
|
||
## Introduction | ||
|
||
This is the example of the Week 2 exercise. The contents in this presentation are not related to each other. | ||
|
||
## Figure | ||
|
||
The first figure is a centered still figure. | ||
|
||
![A dinosaur generated by AI](fig1.png){width="300," fig-align="center"} | ||
|
||
The above figure is center-aligned <br> The caption is left-aligned | ||
|
||
## Interactive Table | ||
|
||
This table represents names, age, and education of six people (not real data). | ||
|
||
| No | Name | Age | Education | | ||
|:---:|:------:|:------:|:-------------------:| | ||
| 1 | Abby | **10** | *Elementary school* | | ||
| 2 | Boddie | **22** | *WO* | | ||
| 3 | Clara | **32** | *VWO* | | ||
| 4 | Donny | **15** | *HAVO* | | ||
| 5 | Easter | **51** | *MBO* | | ||
| 6 | Fey | **4** | *Kindergarten* | | ||
|
||
: List of Buyers | ||
|
||
## Moving Figure {auto-animate="true" auto-animate-easing="ease-in-out"} | ||
|
||
This figure shows animation of three squares to three circles in three different colours. | ||
|
||
::: r-hstack | ||
::: {data-id="box1" auto-animate-delay="0" style="background: #33fffc; width: 200px; height: 200px; margin: 15px;"} | ||
::: | ||
|
||
::: {data-id="box2" auto-animate-delay="0.3" style="background: #b394b6; width: 200px; height: 200px; margin: 15px;"} | ||
::: | ||
|
||
::: {data-id="box3" auto-animate-delay="0.6" style="background: #afe3ab; width: 200px; height: 200px; margin: 15px;"} | ||
::: | ||
::: | ||
|
||
## {auto-animate="true" auto-animate-easing="ease-in-out"} | ||
|
||
::: r-stack | ||
::: {data-id="box1" style="background: #33fffc; width: 450px; height: 450px; border-radius: 200px;"} | ||
::: | ||
|
||
::: {data-id="box2" style="background: #b394b6; width: 300px; height: 300px; border-radius: 200px;"} | ||
::: | ||
|
||
::: {data-id="box3" style="background: #afe3ab; width: 150px; height: 150px; border-radius: 200px;"} | ||
::: | ||
::: | ||
|
||
## Two-Column Slide {style="text-align: justify;"} | ||
|
||
::: columns | ||
::: {.column width="40%"} | ||
A travel survey is conducted to find out the movement patterns of people in a particular area (@harding_are_2021). Initially, it was conducted with paper-based interviews and recently travel surveys can be conducted through an application or web-based surveys by collecting travel diaries completed by respondents (@shen_review_2014). However, the efficacy of this approach is somewhat limited as each respondent should document the daily activities undertaken. An innovation in travel surveys by collecting respondents' locations using Global Positional System (GPS) sensor data was recognized by Statistics Netherlands (Centraal Bureau voor de Statistiek or CBS) in 2017. | ||
::: | ||
|
||
::: {.column width="10%"} | ||
<!-- empty column to create gap --> | ||
::: | ||
|
||
::: {.column width="40%"} | ||
The growing popularity of smartphones is enabling the emergence of smart city applications (@f_de_s_soares_combined_2019-1). Collecting GPS sensor data could be useful for identifying movement patterns and portraying the movement behaviour (@calabrese_understanding_2013). Based on the GPS sensor data, an automated diary is generated for the survey respondent, wherein each day is discretized into distinct segments representing stationary periods (stops) and periods of travel (tracks). This approach, in addition, can reduce recall bias, can collect a lot of data with minimal effort and is less time-consuming, although validation problems might be encountered (@zhou_smartphone-based_2022-1). | ||
::: | ||
|
||
For supplementary information, these two @yu_xiao_transportation_2012, @omrani_predicting_2015 are good references. | ||
::: | ||
|
||
## Equation | ||
|
||
This is the example of an equation. When $a_n$ is $3n+1$ then $n$ is odd and when $n$ is even $a_n =n / 2$. \begin{equation*} | ||
a_n = \begin{cases} | ||
3n + 1 & \text{ if } n \text{ is odd} \\ | ||
\int_{1}^{n} 2x \,dx & \text{ otherwise} | ||
\end{cases} | ||
\end{equation*} | ||
|
||
For example, if $n=3,4,5$, then $a_n$: \begin{align} | ||
a_3 = 3 \times 3 + 1 = 10 \\ | ||
a_4 = 4^2 - 1^2 = 15\\ | ||
a_5 = 3 \times 5 + 1 = 16 | ||
\end{align} | ||
|
||
## Reference List | ||
|
||
Here are the list of references (Two-Column slide). | ||
|
||
::: {#refs} | ||
::: | ||
|
||
## Bibliographic | ||
|
||
::: {#refs} | ||
::: | ||
|
||
## R-code Displayed Not Executed | ||
|
||
In this program, we convert decimal number entered by the user into binary using a recursive function. Decimal number is converted into binary by dividing the number successively by 2 and printing the remainder in reverse order. | ||
|
||
```{r} | ||
#| eval: false | ||
#| echo: true | ||
convert_to_binary <- function(n) { | ||
if(n > 1) { | ||
convert_to_binary(as.integer(n/2)) | ||
} | ||
cat(n %% 2) | ||
} | ||
convert_to_binary (100) | ||
``` | ||
|
||
## R-code Executed Not Displayed | ||
|
||
This is an example of the ggplot implementation to create a plot. The dataset used in this code is iris dataset. | ||
|
||
```{r} | ||
#| echo: false | ||
library(ggplot2) | ||
ggplot(data=iris,aes(x=Sepal.Width, y=Sepal.Length,color=Species)) + geom_point() + theme_minimal() | ||
``` | ||
|
||
## Cached and Labeled R-code | ||
|
||
This data set contains statistics, in arrests per 100,000 residents for assault, murder, and rape in each of the 50 US states in 1973. Also given is the percent of the population living in urban areas. A data frame with 50 observations on 4 variables. - Murder numeric Murder arrests (per 100,000) - Assault numeric Assault arrests (per 100,000) - UrbanPop numeric Percent urban population - Rape numeric Rape arrests (per 100,000) | ||
|
||
```{r} | ||
#| cache: true | ||
#| code-line-numbers: true | ||
#| label: PCA | ||
library(ggplot2) | ||
library(dplyr) | ||
library(corrplot) | ||
library(corrr) | ||
library(DT) | ||
corrplot(cor(USArrests), order = "hclust") | ||
pca.res <- prcomp(USArrests, scale = TRUE) | ||
pca.res$rotation | ||
pca.var <- pca.res$sdev ^2 | ||
var.ratio <- pca.var/sum(pca.var) | ||
plot(var.ratio , xlab=" Principal Component ", ylab=" Proportion of | ||
Variance Explained ", ylim=c(0,1) ,type="b") | ||
``` | ||
|
||
## Reproducible Environment | ||
|
||
```{r} | ||
library(renv) | ||
renv::init() | ||
renv::activate() | ||
renv::status() | ||
``` |
Binary file added
BIN
+381 Bytes
...Zahroh/SolichatusZahroh_Wk2/ex2_cache/revealjs/PCA_f61bb0136664dc6359f89c79526f4fb8.RData
Binary file not shown.
Binary file added
BIN
+2.59 KB
...s Zahroh/SolichatusZahroh_Wk2/ex2_cache/revealjs/PCA_f61bb0136664dc6359f89c79526f4fb8.rdb
Binary file not shown.
Binary file added
BIN
+167 Bytes
...s Zahroh/SolichatusZahroh_Wk2/ex2_cache/revealjs/PCA_f61bb0136664dc6359f89c79526f4fb8.rdx
Binary file not shown.
12 changes: 12 additions & 0 deletions
12
Solichatus Zahroh/SolichatusZahroh_Wk2/ex2_cache/revealjs/__packages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
base | ||
methods | ||
datasets | ||
utils | ||
grDevices | ||
graphics | ||
stats | ||
ggplot2 | ||
dplyr | ||
corrplot | ||
corrr | ||
DT |
Binary file added
BIN
+33.2 KB
Solichatus Zahroh/SolichatusZahroh_Wk2/ex2_files/figure-revealjs/PCA-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+12.9 KB
Solichatus Zahroh/SolichatusZahroh_Wk2/ex2_files/figure-revealjs/PCA-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+25.6 KB
...tus Zahroh/SolichatusZahroh_Wk2/ex2_files/figure-revealjs/unnamed-chunk-2-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions
7
Solichatus Zahroh/SolichatusZahroh_Wk2/ex2_files/libs/clipboard/clipboard.min.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
Solichatus Zahroh/SolichatusZahroh_Wk2/ex2_files/libs/quarto-html/popper.min.js
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
Solichatus Zahroh/SolichatusZahroh_Wk2/ex2_files/libs/quarto-html/quarto-html.min.css
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
171 changes: 171 additions & 0 deletions
171
...tus Zahroh/SolichatusZahroh_Wk2/ex2_files/libs/quarto-html/quarto-syntax-highlighting.css
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.