Aula Introdução Quarto

Author

Marina

Published

October 3, 2024

Título gigante

Título normal

Título menorzim

Tipos de ênfase e formatação

Uma palavra em negrito e uma em itálico. Você pode destacar um texto muito importante

Aqui vc pode escreve qq coisa
Que vai ficar numa caixa de de destaque
Inclusive códigos do R - mas não vão rodar
x <- 2+2

Bloco de notas

Esse vai ser meu bloco de notas

Fica bonitinho

Fazer uma lista

  • Coisas para aprender:
    • Lista
      • R
      • Phyton
      • C++

Inserir caixas de dicas, warnings, etc.

Note

Essa é uma caixa de aviso!

Warning

Essa é uma caixa de ATENÇÃO!

Dica maravilhosa

Essa é uma DICA

Inserir imagens

Meus amores

Totoro

Floresta tropical

Floresta tropical

Figura 1.Floresta tropical úmida

Figura 1.Floresta tropical úmida

Trabalhando com o R

library(tidyverse)
emissions <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2024/2024-05-21/emissions.csv')

head(emissions)
# A tibble: 6 × 7
   year parent_entity     parent_type commodity production_value production_unit
  <dbl> <chr>             <chr>       <chr>                <dbl> <chr>          
1  1962 Abu Dhabi Nation… State-owne… Oil & NGL            0.913 Million bbl/yr 
2  1962 Abu Dhabi Nation… State-owne… Natural …            1.84  Bcf/yr         
3  1963 Abu Dhabi Nation… State-owne… Oil & NGL            1.83  Million bbl/yr 
4  1963 Abu Dhabi Nation… State-owne… Natural …            4.42  Bcf/yr         
5  1964 Abu Dhabi Nation… State-owne… Oil & NGL            7.3   Million bbl/yr 
6  1964 Abu Dhabi Nation… State-owne… Natural …           17.3   Bcf/yr         
# ℹ 1 more variable: total_emissions_MtCO2e <dbl>

Gráfico simples

names(emissions)
[1] "year"                   "parent_entity"          "parent_type"           
[4] "commodity"              "production_value"       "production_unit"       
[7] "total_emissions_MtCO2e"
plot(emissions$total_emissions_MtCO2e~emissions$year)

Firulagens dos gráficos

Code
plot(emissions$total_emissions_MtCO2e~emissions$year)

Figura 2. Emissão de Carbono por ano

Equações

Para equações no meio do texto, escevemos entre cifrões: \(2\pi*r^2\)

Para equações destacadas:

\[RE = (1- \frac{Nut_{old}}{Nut_{mat}} MLCF)*100\]

Tabelas

kableExtra

Warning: package 'kableExtra' was built under R version 4.4.1

Attaching package: 'kableExtra'
The following object is masked from 'package:dplyr':

    group_rows
tab <- kable(head(emissions))
kable_styling(tab, full_width = F, bootstrap_options = c("striped","hover", "condensed"))
year parent_entity parent_type commodity production_value production_unit total_emissions_MtCO2e
1962 Abu Dhabi National Oil Company State-owned Entity Oil & NGL 0.91250 Million bbl/yr 0.3638848
1962 Abu Dhabi National Oil Company State-owned Entity Natural Gas 1.84325 Bcf/yr 0.1343552
1963 Abu Dhabi National Oil Company State-owned Entity Oil & NGL 1.82500 Million bbl/yr 0.7277697
1963 Abu Dhabi National Oil Company State-owned Entity Natural Gas 4.42380 Bcf/yr 0.3224525
1964 Abu Dhabi National Oil Company State-owned Entity Oil & NGL 7.30000 Million bbl/yr 2.9110786
1964 Abu Dhabi National Oil Company State-owned Entity Natural Gas 17.32655 Bcf/yr 1.2629390

Fazer abas

Figura 3. Entidades responsáveis pelas emissões
year parent_entity parent_type commodity production_value production_unit total_emissions_MtCO2e
1962 Abu Dhabi National Oil Company State-owned Entity Oil & NGL 0.91250 Million bbl/yr 0.3638848
1962 Abu Dhabi National Oil Company State-owned Entity Natural Gas 1.84325 Bcf/yr 0.1343552
1963 Abu Dhabi National Oil Company State-owned Entity Oil & NGL 1.82500 Million bbl/yr 0.7277697
1963 Abu Dhabi National Oil Company State-owned Entity Natural Gas 4.42380 Bcf/yr 0.3224525
1964 Abu Dhabi National Oil Company State-owned Entity Oil & NGL 7.30000 Million bbl/yr 2.9110786
1964 Abu Dhabi National Oil Company State-owned Entity Natural Gas 17.32655 Bcf/yr 1.2629390
Tabela 1. Dataset

FIM