Skip to content

Commit

Permalink
Merge pull request #17 from solichatuszhrh/main
Browse files Browse the repository at this point in the history
add assignments
  • Loading branch information
gerkovink authored Jan 17, 2024
2 parents 37ff010 + 936fab0 commit 39ba17e
Show file tree
Hide file tree
Showing 94 changed files with 8,499 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Solichatus Zahroh/README.md
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 added Solichatus Zahroh/SolichatusZahroh_Wk1.zip
Binary file not shown.
1,009 changes: 1,009 additions & 0 deletions Solichatus Zahroh/SolichatusZahroh_Wk2/ex2-speaker.html

Large diffs are not rendered by default.

1,009 changes: 1,009 additions & 0 deletions Solichatus Zahroh/SolichatusZahroh_Wk2/ex2.html

Large diffs are not rendered by default.

190 changes: 190 additions & 0 deletions Solichatus Zahroh/SolichatusZahroh_Wk2/ex2.qmd
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 not shown.
Binary file not shown.
Binary file not shown.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 39ba17e

Please sign in to comment.