416 lines
25 KiB
Org Mode
416 lines
25 KiB
Org Mode
#+Title:Evolução de rebanho leiteiro em PRV
|
||
#+AUTHOR: Adenor Wendling
|
||
#+DATE: 08-31-2023
|
||
#+OPTIONS: creator:nil timestamp:nil
|
||
#+PROPERTY: header-args:R :results output :session *R2* :cmdline :tangle yes
|
||
#+PROPERTY: header-args:R+ :exports both
|
||
#+SLUG: orgmode-excel
|
||
#+TAGS: tabelas, org-mode, composição ideal
|
||
#+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
|
||
#+HTML_HEAD: <style> #content{max-width:1800px;}</style>
|
||
#+HTML_HEAD: <style> p{max-width:800px;}</style>
|
||
#+HTML_HEAD: <style> li{max-width:800px;}</style>
|
||
#+HTML_HEAD: <style> pre.src{background: #f5f5f5;color:black;}</style>
|
||
|
||
|
||
|
||
* TODO
|
||
Continuar planilha
|
||
#+startup 2023-08-02
|
||
|
||
|
||
Vou estudar o emacs calc, tentando elaborar uma planilha para evolução do
|
||
|
||
|
||
|
||
Vou utilizar os manuais on line <https://orgmode.org/manual/Field-and-range-formulas.html>
|
||
e <https://orgmode.org/org.html#Built_002din-Table-Editor>
|
||
|
||
* Indices
|
||
IP = intervalo entre partos (12 meses) (setq IP "12")
|
||
|
||
PP = primeiro parto (24 meses) (setq PP "24")
|
||
|
||
PL = PerÃodo de lactação (10 meses)(setq PL "10")
|
||
|
||
CL = capacidade de lotação (20UGM) (setq CL "20")
|
||
IndMor = Indice de mortalidade de bezerras
|
||
IRP = Índice de renovação do plantel - substituição de vacas velhas ou ruins
|
||
|
||
|
||
* Relação UGM e categoria animal
|
||
|
||
#+Caption: UGM de referência de acordo com a categoria animal
|
||
#+NAME: Tab1
|
||
| Cataegoria animal | UGM | abrev |
|
||
|-----------------------+------+-------|
|
||
| Vacas em lactação | 1 | vaca |
|
||
| Vacas secas | 1 | vase |
|
||
| Bezerras até 12 meses | 0.25 | Beze |
|
||
| Novilhas até 18 meses | 0.50 | No18 |
|
||
| Novilhas até 24 meses | 0.75 | No24 |
|
||
| Outros | 1 | Outr |
|
||
|-----------------------+------+-------|
|
||
|
||
Os dados acima são padronizados, sendo que, por padrão, 1 UGM equivale a 500 kg de peso vivo. Desta forma, pode ser necessário ajustar as UGMs e acordo com o peso dos animais de cada fazenda.
|
||
* Composição do Rebanho
|
||
A composição do rebanho de cada estabelecimento varia conforme os objetivos, índices e manejo adotado. De modo geral busca-se uma composição com maior participação de categorias produtivas, ou seja, em caso de atividade leiteira, busca-se maior número de animais na categoria *vacas em lactação*.
|
||
Os dados da tabela 2 refletem a composição de um rebanho com finalidade de produção de leite, considerando um manejo reprodutivo e de alimentação excelentes.
|
||
|
||
#+Caption: Composição ideal em porcentagem , número de animais e UGM, com base em 10 vacas em lactação.
|
||
#+NAME: C_ideal
|
||
| | Categoria de animais | Cabeças | %cab% | UGM | %UGM |
|
||
|---+-----------------------+---------+-------+------+-------|
|
||
| # | Vacas em lactação | 10 | 47.6 | 10 | 60.6 |
|
||
| # | Vacas secas | 2 | 9.5 | 2 | 12.1 |
|
||
| # | Bezerras ate 12 meses | 3 | 14.3 | 0.75 | 4.5 |
|
||
| # | Novilhas até 18 meses | 3 | 14.3 | 1.5 | 9.1 |
|
||
| # | Novilhas até 24 meses | 3 | 14.3 | 2.25 | 13.6 |
|
||
| # | Outros animais | | 0.0 | 0 | 0.0 |
|
||
| # | Total | 21 | 100.0 | 16.5 | 100.0 |
|
||
| ^ | | Tcab | | Tugm | |
|
||
|---+-----------------------+---------+-------+------+-------|
|
||
#+TBLFM: $4=$3*100/$Tcab;%.1f::@2$5=@2$3*remote(Tab1,@2$2)::@8$3=@2$3+@3$3+@4$3+@5$3+@6$3+@7$3::@3$5=@3$3*remote(Tab1, @3$2)::@4$5=@4$3*remote(Tab1, @4$2)::@5$5=@5$3*remote(Tab1, @5$2)::@6$5=@6$3*remote(Tab1, @6$2)::@7$5=@7$3*remote(Tab1, @7$2)::@8$5=vsum(@2..@7)::$6=$5*100/$Tugm;%.1f
|
||
|
||
|
||
|
||
A composição do rebanho é dinâmico, com espectativa de crescimento ao longo do tempo, até alcançar o limite de suporte das pastagens
|
||
ou de outro limitante definido pela infraestrutura ou de trabalho da fazenda. A espectativa de crescimento se deve à previsão de 1 parto anual
|
||
por vaca, que gera um incremento anual de 50% de fêmeas em relação ao número de vacas, e do descarte de 25% das vacas.
|
||
Quando for atingido o limite de vacas na fazenda, pode-se vender o excedente de fêmeas em idade de terneiras, novilhas prenhas, ou vacas,
|
||
de acordo com a conveniência da fazenda. Entretanto, o limite é medido em UGM, o que também vai limitar a opção pela venda de animais maiores.
|
||
Com base nos índices definidos em conjunto com a fazenda, estimamos que a evolução do rebanho de apresente conforme a tabela 3, ressalvando que
|
||
esses valores não são absolutos, pois podem ocorrer imprevistos que alterem a evolução. Da mesma forma, havendo alteração nos índices esperados,
|
||
haverá impacto na evolução do rebanho, o que não caracteriza necessariamente erro de previsão ou de manejo.
|
||
|
||
|
||
|
||
* Tabela inicial, com o dimensionamento atual e previsão de entradas e saídas de animais
|
||
Os dados desta tabela deve ser alterados conforme necessário para alcançar a evolução do rebanho desejada.
|
||
As tabelas de composição de rebanho serão calculadas automáticamente, com base nos dados anotados na tabela <Tab0>.
|
||
#+Caption: Entradas e saídas de animais do rebanho durante os primeiros 6 anos (até estabilizar)
|
||
#+NAME:Tab0
|
||
| | Constante | ano 1 | ano 2 | ano 3 | ano 4 | ano 5 | ano .. | observação |
|
||
|---+------------------------+-------+-------+-------+-------+-------+--------+--------------|
|
||
| | Partos/vaca/ano | 1 | 1 | 1 | 1 | 1 | 1 | |
|
||
| ^ | | PV1 | PV2 | PV3 | PV4 | PV5 | PV6 | |
|
||
|---+------------------------+-------+-------+-------+-------+-------+--------+--------------|
|
||
| | Vacas Existentes | 20 | - | - | - | - | - | - a calcular |
|
||
| ^ | | VE1 | | | | | | |
|
||
| | Novilhas exist. | 05 | - | - | - | - | - | - a calcular |
|
||
| ^ | | NE1 | | | | | | |
|
||
| | Bezerras existentes | 0 | - | - | - | - | - | - a calcular |
|
||
| ^ | | TE1 | | | | | | |
|
||
|---+------------------------+-------+-------+-------+-------+-------+--------+--------------|
|
||
| | Novilhas >- vacas | 0 | 0 | 0 | 0 | 0 | 0 | NÃO ALTERAR |
|
||
| ^ | | TN1 | TN2 | TN3 | TN4 | TN5 | TN6 | |
|
||
| | % Bezerras -> novilhas | 0.4 | 0.4 | 0.4 | 0.4 | 0.4 | 0.4 | % S_Nascidos |
|
||
| ^ | | BA1 | BA2 | BA3 | BA4 | BA5 | BA6 | |
|
||
|---+------------------------+-------+-------+-------+-------+-------+--------+--------------|
|
||
| | Vacas a vender | 0 | 0 | 0 | 6 | 14 | 9 | |
|
||
| ^ | | VV1 | VV2 | VV3 | VV4 | VV5 | VV6 | |
|
||
| | Novilhas a vender | 0 | 0 | 0 | 0 | 7 | 8 | |
|
||
| ^ | | NV1 | NV2 | NV3 | NV4 | NV5 | NV6 | |
|
||
| | Bezerras a vender | 0 | 0 | 0 | 0 | 0 | 0 | |
|
||
| ^ | | BV1 | BV2 | BV3 | BV4 | BV5 | BV6 | |
|
||
|---+------------------------+-------+-------+-------+-------+-------+--------+--------------|
|
||
| | Vacas a comprar | 0 | 0 | 0 | 0 | 0 | 0 | |
|
||
| ^ | | VC1 | VC2 | VC3 | VC4 | VC5 | VC6 | |
|
||
| | Novilhas a comprar | 2 | 0 | 0 | 0 | 0 | 0 | |
|
||
| ^ | | NC1 | NC2 | NC3 | NC4 | NC5 | NC6 | |
|
||
| | Bezerras a compras | 0 | 0 | 0 | 0 | 0 | 0 | |
|
||
| ^ | | BC1 | BC2 | BC3 | BC4 | BC5 | BC6 | |
|
||
|---+------------------------+-------+-------+-------+-------+-------+--------+--------------|
|
||
|
||
Com a evolução estimada através dos indicadores:
|
||
. 1 parto por vaca por ano;
|
||
. Primeiro parto aos 18 meses
|
||
. Descarte de 25% das vacas a partir do 3º ano
|
||
. Capacidade de suporte para 40 vacas
|
||
. Aproveitamento de 40% dos nascidos para repsição
|
||
Temos o seguinte:
|
||
>> Iniciamos com 20 vacas
|
||
>> Compramos 5 novilhas cobertas
|
||
>> No segundo ano serão compradas 2 novilhas
|
||
|
||
|
||
* Composição anual do rebanho da fazenda
|
||
** Ano 1
|
||
#+Caption: Composição do rebanho na fazenda VITRUVIO (ANO 1)
|
||
#+NAME: Tab3_1
|
||
| | Categoria | ExttAnt | TIR | Compra | Venda | Saldo | TIC | ExttFin |
|
||
|---+-----------------+---------+-----+--------+-------+-------+-----+---------|
|
||
| # | VACAS >24 | 20 | 0 | 0 | 0 | 20 | 0 | 20 |
|
||
| ^ | | EAV | TRV | COV | VEV | SAV | TCV | EFV |
|
||
| # | NOVILHAS 12<>24 | 5 | 0 | 2 | 0 | 7 | 7 | 0 |
|
||
| ^ | | EAN | TRN | CON | VEN | SAN | TCN | EFN |
|
||
| # | BEZERRAS <12 | 0 | 8 | 0 | 0 | 8 | 8 | 0 |
|
||
| ^ | | EAB | FRB | COB | VEB | SAB | TCB | EFB |
|
||
| # | Outros | | 0 | 0 | 0 | | 0 | 0 |
|
||
| ^ | | EAO | FRO | COO | VEO | SAO | TCO | EFO |
|
||
#+TBLFM: $EAV=remote(Tab0, $VE1)::$EFV=$SAV-$TCV::$SAV=$EAV+$TRV+$COV-$VEV::$TCN=($EAN+$TRN+$CON-$VEV)::$VEV=remote(Tab0, $VV1):: $EAN=remote(Tab0, $NE1)::$TRN=remote(Tab0, $TN1)::$CON=remote(Tab0, $NC1)::$VEN=remote(Tab0, $NV1)::$SAN=$EAN+$TRN+$CON-$VEN::$EFN=$SAN-$TCN::$EAB=remote(Tab0, $TE1)::$FRB=$EFV*remote(Tab0, $BA1);%.0f::$SAB=$EAB+$FRB+$COB-$VEB::$TCB=$SAB::$EFB=$SAB-$TCB
|
||
|
||
|
||
Na tabela 4 consta o número de animais para cada categoria, com as ocorrencias do ano. No caso das vacas, não há alteração, visto que não há entradas, nem saídas, e o número inicial é o mesmo do final. No caso das novilhas, há movimentação, com a transferência interna de 5 (que passam de bezerras para novilhas), compra de 2, e transferência cedendo 5 para serem vacas no próximo ano. Assim, o ano inicia com 1 novilha, e termina com 3.
|
||
|
||
|
||
** Ano 2
|
||
|
||
#+Caption: Composição do rebanho na fazenda VITRUVIO (ANO 2)
|
||
#+NAME: Tab3_2
|
||
| | CATEGORIA | EXTTANT | TIR | COMPRA | VENDA | SALDO | TIC | EXTTFIN |
|
||
|---+-----------------+---------+-----+--------+-------+-------+-----+---------|
|
||
| # | VACAS >24 | 20 | 7 | 0 | 0 | 27 | 0 | 27 |
|
||
| ^ | | EAV | TRV | COV | VEV | SAV | TCV | EFV |
|
||
| # | Novilhas 12<>24 | 0 | 8 | 0 | 0 | 8 | 8 | 0 |
|
||
| ^ | | EAN | TRN | CON | VEN | SAN | TCN | EFN |
|
||
| # | Bezerras <12 | 0 | 11 | 0 | 0 | 11 | 11 | 0 |
|
||
| ^ | | EAB | FRB | COB | VEB | SAB | TCB | EFB |
|
||
| # | outros | 1 | | | | 1 | | 1 |
|
||
| ^ | | EAO | FRO | COO | VEO | SAO | TCO | EFO |
|
||
|---+-----------------+---------+-----+--------+-------+-------+-----+---------|
|
||
#+TBLFM: $EAV=remote(Tab3_1, $EFV)::$TRV=remote(Tab3_1, $TCN)::$COV=remote(Tab0,$VC2)::$VEV=remote(Tab0, $VV2)::$SAV=$EAV+$TRV+$COV-$VEV::$EFV=$SAV::$EAN=remote(Tab3_1, $EFN)::$TRN=remote(Tab3_1, $TCB)::$CON=remote(Tab0,$NC2)::$VEN=remote(Tab0, $NV2)::$SAN=$EAN+$TRN+$CON-$VEN::$TCN=$SAN::$EFN=$SAN-$TCN::$EAB=remote(Tab3_1, $EFB)::$FRB=$EFV*remote(Tab0, $BA2);%.0f::$COB=remote(Tab0,$BC2)::$VEB=remote(Tab0,$BV2)::$SAB=$EAB+$FRB+$COB-$VEB::$TCB=$SAB::$EFB=$SAB-$TCB
|
||
|
||
Comentários sobre tabela 5
|
||
** Ano 3
|
||
|
||
Na tabela 3.3 podemos observar...
|
||
#+Caption: Composição do rebanho na fazenda VITRUVIO (ANO 3)
|
||
#+NAME: Tab3_3
|
||
| | CATEGORIA | EXTTANT | TIR | COMPRA | VENDA | SALDO | TIC | EXTTFIN |
|
||
|---+-----------------+---------+-----+--------+-------+-------+-----+---------|
|
||
| # | VACAS >24 | 27 | 8 | 0 | 0 | 35 | 0 | 35 |
|
||
| ^ | | EAV | TRV | COV | VEV | SAV | TCV | EFV |
|
||
| # | Novilhas 12<>24 | 0 | 11 | 0 | 0 | 11 | 11 | 0 |
|
||
| ^ | | EAN | TRN | CON | VEN | SAN | TCN | EFN |
|
||
| # | Bezerras <12 | 0 | 14 | 0 | 0 | 14 | 14 | 0 |
|
||
| ^ | | EAB | FRB | COB | VEB | SAB | TCB | EFB |
|
||
| # | outros | 1 | | | | 1 | | 1 |
|
||
| ^ | | EAO | FRO | COO | VEO | SAO | TCO | EFO |
|
||
|---+-----------------+---------+-----+--------+-------+-------+-----+---------|
|
||
#+TBLFM: $EAV=remote(Tab3_2, $EFV)::$TRV=remote(Tab3_2, $TCN)::$COV=remote(Tab0,$VC3)::$VEV=remote(Tab0, $VV3)::$SAV=$EAV+$TRV+$COV-$VEV::$EFV=$SAV::$EAN=remote(Tab3_2, $EFN)::$TRN=remote(Tab3_2, $TCB)::$CON=remote(Tab0,$NC3)::$VEN=remote(Tab0, $NV3)::$SAN=$EAN+$TRN+$CON-$VEN::$TCN=$SAN::$EFN=$SAN-$TCN::$EAB=remote(Tab3_2, $EFB)::$FRB=$EFV*remote(Tab0, $BA3);%.0f::$COB=remote(Tab0,$BC3)::$VEB=remote(Tab0,$BV3)::$SAB=$EAB+$FRB+$COB-$VEB::$TCB=$SAB::$EFB=$SAB-$TCB
|
||
Comentários sobre a tabela 6
|
||
|
||
** Ano 4
|
||
|
||
#+Caption: Composição do rebanho na fazenda VITRUVIO (ANO 4)
|
||
#+NAME: Tab3_4
|
||
| | CATEGORIA | EXTTANT | TIR | COMPRA | VENDA | SALDO | TIC | EXTTFIN |
|
||
|---+-----------------+---------+-----+--------+-------+-------+-----+---------|
|
||
| # | VACAS >24 | 35 | 11 | 0 | 6 | 40 | 0 | 40 |
|
||
| ^ | | EAV | TRV | COV | VEV | SAV | TCV | EFV |
|
||
| # | Novilhas 12<>24 | 0 | 14 | 0 | 0 | 14 | 14 | 0 |
|
||
| ^ | | EAN | TRN | CON | VEN | SAN | TCN | EFN |
|
||
| # | Bezerras <12 | 0 | 16 | 0 | 0 | 16 | 16 | 0 |
|
||
| ^ | | EAB | FRB | COB | VEB | SAB | TCB | EFB |
|
||
| # | outros | 1 | | | | 1 | | 1 |
|
||
| ^ | | EAO | FRO | COO | VEO | SAO | TCO | EFO |
|
||
|---+-----------------+---------+-----+--------+-------+-------+-----+---------|
|
||
#+TBLFM: $EAV=remote(Tab3_3, $EFV)::$TRV=remote(Tab3_3, $TCN)::$COV=remote(Tab0,$VC4)::$VEV=remote(Tab0, $VV4)::$SAV=$EAV+$TRV+$COV-$VEV::$EFV=$SAV::$EAN=remote(Tab3_3, $EFN)::$TRN=remote(Tab3_3, $TCB)::$CON=remote(Tab0,$NC4)::$VEN=remote(Tab0, $NV4)::$SAN=$EAN+$TRN+$CON-$VEN::$TCN=$SAN::$EFN=$SAN-$TCN::$EAB=remote(Tab3_3, $EFB)::$FRB=$EFV*remote(Tab0, $BA4);%.0f::$COB=remote(Tab0,$BC4)::$VEB=remote(Tab0,$BV4)::$SAB=$EAB+$FRB+$COB-$VEB::$TCB=$SAB::$EFB=$SAB-$TCB
|
||
|
||
Comentários da tabela 7
|
||
** Ano 5
|
||
|
||
#+NAME: Tab3_5
|
||
#+Caption: Composição do rebanho na fazenda VITRUVIO (ANO 5)
|
||
:PROPERTIES:
|
||
:TABLE_EXPORT_FILE: Documents/Tabela 3.5.csv
|
||
:TABLE_EXPORT_FORMAT: orgtbl-to-csv
|
||
:END:
|
||
| | CATEGORIA | EXTTANT | TIR | COMPRA | VENDA | SALDO | TIC | EXTTFIN |
|
||
|---+-----------------+---------+-----+--------+-------+-------+-----+---------|
|
||
| # | VACAS >24 | 40 | 14 | 0 | 14 | 40 | 0 | 40 |
|
||
| ^ | | EAV | TRV | COV | VEV | SAV | TCV | EFV |
|
||
| # | Novilhas 12<>24 | 0 | 16 | 0 | 7 | 9 | 9 | 0 |
|
||
| ^ | | EAN | TRN | CON | VEN | SAN | TCN | EFN |
|
||
| # | Bezerras <12 | 0 | 16 | 0 | 0 | 16 | 16 | 0 |
|
||
| ^ | | EAB | FRB | COB | VEB | SAB | TCB | EFB |
|
||
| # | outros | 1 | | | | 1 | | 1 |
|
||
| ^ | | EAO | FRO | COO | VEO | SAO | TCO | EFO |
|
||
|---+-----------------+---------+-----+--------+-------+-------+-----+---------|
|
||
| | | | | | | | | |
|
||
#+TBLFM: $EAV=remote(Tab3_4, $EFV)::$TRV=remote(Tab3_4, $TCN)::$COV=remote(Tab0,$VC5)::$VEV=remote(Tab0, $VV5)::$SAV=$EAV+$TRV+$COV-$VEV::$EFV=$SAV::$EAN=remote(Tab3_4, $EFN)::$TRN=remote(Tab3_4, $TCB)::$CON=remote(Tab0,$NC5)::$VEN=remote(Tab0, $NV5)::$SAN=$EAN+$TRN+$CON-$VEN::$TCN=$SAN::$EFN=$SAN-$TCN::$EAB=remote(Tab3_4, $EFB)::$FRB=$EFV*remote(Tab0, $BA5);%.0f::$COB=remote(Tab0,$BC5)::$VEB=remote(Tab0,$BV4)::$SAB=$EAB+$FRB+$COB-$VEB::$TCB=$SAB::$EFB=$SAB-$TCB
|
||
|
||
Comentários da tabela 8
|
||
|
||
** Ano 6
|
||
e, finalmente, na tabela 9, a composição do rebanho no sexto ano após a implementeação e adoção do PRV na propriedade VITRUVIO.
|
||
|
||
|
||
#+name:Tab3_6
|
||
#+caption: Composição do rebanho na fazenda VITRUVIO (ANO 6)
|
||
| | CATEGORIA | EXTTANT | TIR | COMPRA | VENDA | SALDO | TIC | EXTTFIN |
|
||
|---+-----------------+---------+-----+--------+-------+-------+-----+---------|
|
||
| # | VACAS >24 | 40 | 9 | 0 | 9 | 40 | 0 | 40 |
|
||
| ^ | | EAV | TRV | COV | VEV | SAV | TCV | EFV |
|
||
| # | Novilhas 12<>24 | 0 | 16 | 0 | 8 | 8 | 8 | 0 |
|
||
| ^ | | EAN | TRN | CON | VEN | SAN | TCN | EFN |
|
||
| # | Bezerras <12 | 0 | 16 | 0 | 0 | 16 | 16 | 0 |
|
||
| ^ | | EAB | FRB | COB | VEB | SAB | TCB | EFB |
|
||
| # | outros | 1 | | | | 1 | | 1 |
|
||
| ^ | | EAO | FRO | COO | VEO | SAO | TCO | EFO |
|
||
|---+-----------------+---------+-----+--------+-------+-------+-----+---------|
|
||
#+TBLFM: $EAV=remote(Tab3_5, $EFV)::$TRV=remote(Tab3_5, $TCN)::$COV=remote(Tab0,$VC6)::$VEV=remote(Tab0, $VV6)::$SAV=$EAV+$TRV+$COV-$VEV::$EFV=$SAV::$EAN=remote(Tab3_5, $EFN)::$TRN=remote(Tab3_5, $TCB)::$CON=remote(Tab0,$NC6)::$VEN=remote(Tab0, $NV6)::$SAN=$EAN+$TRN+$CON-$VEN::$TCN=$SAN::$EFN=$SAN-$TCN::$EAB=remote(Tab3_5, $EFB)::$FRB=$EFV*remote(Tab0, $BA6);%.0f::$COB=remote(Tab0,$BC6)::$VEB=remote(Tab0,$BV6)::$SAB=$EAB+$FRB+$COB-$VEB::$TCB=$SAB::$EFB=$SAB-$TCB
|
||
|
||
|
||
|
||
* Resumo da evolução
|
||
Esta tabela é a que efetivamente interessa para ser apresentada ao cliente, ou para análise técnica, pois apresenta o resumo (resultado da evolução) proposto para a fazenda.
|
||
|
||
Tabela com os dados resumidos referente aos animais existentes anualmente
|
||
Os dados da tabela abaixo resultam da estimativa de evolução de rebanho, de acordo com os dados da tabela de dados.
|
||
|
||
** Entradas e saídas
|
||
| | Ano | 2004 | 2005 | 2006 | 2007 | 2008 | 2009 |
|
||
|---+--------------------+------+------+------+------+------+------|
|
||
| # | Vacas entradas | 0 | 0 | 0 | 0 | 0 | 0 |
|
||
| # | Novilhas entradas | 2 | 0 | 0 | 0 | 0 | 0 |
|
||
| # | Terneiras entradas | 0 | 0 | 0 | 0 | 0 | 0 |
|
||
|---+--------------------+------+------+------+------+------+------|
|
||
| # | Total entradas | 2 | 0 | 0 | 0 | 2 | 0 |
|
||
|---+--------------------+------+------+------+------+------+------|
|
||
| # | Vacas saídas | 0 | 0 | 0 | 6 | 14 | 9 |
|
||
| # | Novilhas saídas | 0 | 0 | 0 | 0 | 7 | 8 |
|
||
| # | Terneiras saídas | 0 | 0 | 0 | 0 | 0 | 0 |
|
||
|---+--------------------+------+------+------+------+------+------|
|
||
| # | Total saídas | 0 | 0 | 0 | 6 | 14 | 17 |
|
||
|---+--------------------+------+------+------+------+------+------|
|
||
| | | | | | | | |
|
||
#+TBLFM:@2$3=remote(Tab3_1, $COV)::@2$4=remote(Tab3_2, $COV)::@2$5=remote(Tab3_3, $COV)::@2$6=remote(Tab3_4, $COV)::@2$7=remote(Tab3_5, $COV)::@2$8=remote(Tab3_6, $COV)::@3$3=remote(Tab3_1, $CON)::@3$4=remote(Tab3_2, $CON)::@3$5=remote(Tab3_3, $CON)::@3$6=remote(Tab3_4, $CON)::@3$7=remote(Tab3_5, $CON)::@3$8=remote(Tab3_6, $CON)::@4$3=remote(Tab3_1, $COB)::@4$4=remote(Tab3_2, $COB)::@4$5=remote(Tab3_3, $COB)::@4$6=remote(Tab3_4, $COB)::@4$7=remote(Tab3_5, $COB)::@4$8=remote(Tab3_6, $COB)::@5$3=@2$3+@3$3+@4$3::@5$4=@2$4+@3$4+@4$4::@5$5=@2$5+@3$5+@4$5::@5$6=@2$6+@3$6+@4$6::@5$7=@2$7+@3$3+@4$7::@5$8=@2$8+@3$8+@4$8::@6$3=remote(Tab3_1, $VEV)::@6$4=remote(Tab3_2, $VEV)::@6$5=remote(Tab3_3, $VEV)::@6$6=remote(Tab3_4, $VEV)::@6$7=remote(Tab3_5, $VEV)::@6$8=remote(Tab3_6, $VEV)::@7$3=remote(Tab3_1, $VEN)::@7$4=remote(Tab3_2, $VEN)::@7$5=remote(Tab3_3, $VEN)::@7$6=remote(Tab3_4, $VEN)::@7$7=remote(Tab3_5, $VEN)::@7$8=remote(Tab3_6, $VEN)::@8$3=remote(Tab3_1, $VEB)::@8$4=remote(Tab3_2, $VEB)::@8$5=remote(Tab3_3, $VEB)::@8$6=remote(Tab3_4, $VEB)::@8$7=remote(Tab3_5, $VEB)::@8$8=remote(Tab3_6, $VEB)::@9$3=@6$3+@7$3+@8$3::@9$4=@6$4+@7$4+@8$4::@9$5=@6$5+@7$5+@8$5::@9$6=@6$6+@7$6+@8$6::@9$7=@6$7+@7$3+@8$7::@9$8=@6$8+@7$8+@8$8
|
||
|
||
** Animais existentes
|
||
#+NAME:TABELA4
|
||
#+CAPTION: Resumo da evolução do rebanho (Animais existentes anualmente) nos primeiros anos do projeto
|
||
:PROPERTIES:
|
||
:TABLE_EXPORT_FILE: data/Tabela4.csv
|
||
:TABLE_EXPORT_FORMAT: orgtbl-to-csv
|
||
:END:
|
||
| | Ano | 2004 | 2005 | 2006 | 2007 | 2008 | 2009 |
|
||
|---+-----------+------+------+------+------+------+------|
|
||
| # | Vacas | 20 | 27 | 35 | 40 | 40 | 40 |
|
||
| # | Novilhas | 7 | 8 | 11 | 14 | 9 | 8 |
|
||
| # | Terneiras | 8 | 11 | 14 | 16 | 16 | 16 |
|
||
|---+-----------+------+------+------+------+------+------|
|
||
| # | Total | 35 | 46 | 60 | 70 | 63 | 64 |
|
||
| # | | | | | | | |
|
||
#+TBLFM:@2$3=remote(Tab3_1, $SAV)::@2$4=remote(Tab3_2, $SAV)::@2$5=remote(Tab3_3, $SAV)::@2$6=remote(Tab3_4, $SAV)::@2$7=remote(Tab3_5, $SAV)::@2$8=remote(Tab3_6, $SAV)::@3$3=remote(Tab3_1, $SAN)::@3$4=remote(Tab3_2, $SAN)::@3$5=remote(Tab3_3, $SAN)::@3$6=remote(Tab3_4, $SAN)::@3$7=remote(Tab3_5, $SAN)::@3$8=remote(Tab3_6, $SAN)::@4$3=remote(Tab3_1, $SAB)::@4$4=remote(Tab3_2, $SAB)::@4$5=remote(Tab3_3, $SAB)::@4$6=remote(Tab3_4, $SAB)::@4$7=remote(Tab3_5, $SAB)::@4$8=remote(Tab3_6, $SAB)::@5$3=@2$3+@3$3+@4$3::@5$4=@2$4+@3$4+@4$4::@5$5=@2$5+@3$5+@4$5::@5$6=@2$6+@3$6+@4$6::@5$7=@2$7+@3$3+@4$7::@5$8=@2$8+@3$8+@4$8
|
||
|
||
|
||
* TODO Resolver exportar ou criar data.tabela. Para continuar, é necessário exportar a Tabela acima. Faço pelo menu Table - Export to file. Nome do Arquivo a exportar = Tabela$.csv.>>
|
||
|
||
*** Importação dos dados dos animais existentes
|
||
#+begin_src R
|
||
library (data.table)
|
||
library(tidyr)
|
||
library(dplyr)
|
||
library (ggplot2)
|
||
#+end_src
|
||
|
||
#+RESULTS:
|
||
|
||
#+begin_src R
|
||
Evol_exist <- fread("data/Tabela4.csv", check.names =FALSE, header=TRUE)
|
||
str(Evol_exist)
|
||
|
||
#Transpor a tabela
|
||
Evol_exist1<-dcast(melt(Evol_exist, id.vars="Ano"),variable ~Ano)
|
||
# deu um trabalho para n ão aparecer uma linha nova com os nomes da colunas...
|
||
str(Evol_exist1)
|
||
Evoluc<-Evol_exist1%>%
|
||
pivot_longer(!variable, names_to="Categoria", values_to="Cabecas")%>%
|
||
dplyr::mutate(Ano=variable)
|
||
#View(Evoluc)
|
||
str(Evoluc)
|
||
|
||
#+end_src
|
||
|
||
#+RESULTS:
|
||
#+begin_example
|
||
Classes ‘data.table’ and 'data.frame': 5 obs. of 7 variables:
|
||
$ Ano : chr "Vacas" "Novilhas" "Terneiras" "Total" ...
|
||
$ 2004: int 20 7 8 35 NA
|
||
$ 2005: int 27 8 11 46 NA
|
||
$ 2006: int 35 11 14 60 NA
|
||
$ 2007: int 40 14 16 70 NA
|
||
$ 2008: int 40 9 16 63 NA
|
||
$ 2009: int 40 8 16 64 NA
|
||
- attr(*, ".internal.selfref")=<externalptr>
|
||
Classes ‘data.table’ and 'data.frame': 6 obs. of 6 variables:
|
||
$ variable : Factor w/ 6 levels "2004","2005",..: 1 2 3 4 5 6
|
||
$ V1 : int NA NA NA NA NA NA
|
||
$ Novilhas : int 7 8 11 14 9 8
|
||
$ Terneiras: int 8 11 14 16 16 16
|
||
$ Total : int 35 46 60 70 63 64
|
||
$ Vacas : int 20 27 35 40 40 40
|
||
- attr(*, ".internal.selfref")=<externalptr>
|
||
- attr(*, "sorted")= chr "variable"
|
||
tibble [30 × 4] (S3: tbl_df/tbl/data.frame)
|
||
$ variable : Factor w/ 6 levels "2004","2005",..: 1 1 1 1 1 2 2 2 2 2 ...
|
||
$ Categoria: chr [1:30] "V1" "Novilhas" "Terneiras" "Total" ...
|
||
$ Cabecas : int [1:30] NA 7 8 35 20 NA 8 11 46 27 ...
|
||
$ Ano : Factor w/ 6 levels "2004","2005",..: 1 1 1 1 1 2 2 2 2 2 ...
|
||
#+end_example
|
||
|
||
|
||
*** Gráfico da evolução do rebanho
|
||
|
||
** Gráfico 1
|
||
#+header: :width 8 :height 8 :family Times
|
||
#+begin_src R :file ..fig/evol1.png :results file graphics
|
||
|
||
Evoluc<-ggplot(Evoluc, aes(x=Ano, y=Cabecas, group = Categoria))+
|
||
geom_line (aes(color=Categoria))+
|
||
geom_point(aes(color=Categoria))
|
||
getwd()
|
||
png(filename="fig/Evoluc1.png")
|
||
plot(Evoluc)
|
||
|
||
Evoluc
|
||
|
||
|
||
|
||
#+end_src
|
||
|
||
#+RESULTS:
|
||
[[file:~/fig/Evoluc11.png]]
|
||
|
||
**
|
||
|
||
* TODO - Resolver exportação figura no arquivo html
|
||
|
||
|
||
|
||
|
||
|
||
** Animais vendidos
|
||
| # | Vacas vendidas | | | | | | | | | | | | | | | |
|
||
| # | Novilhas vendidas | | | | | | | | | | | | | | | |
|
||
| # | Terneiras vendidas | | | | | | | | | | | | | | |
|
||
|
||
|
||
* Figuras (só para testar)
|
||
Exemplo 2
|
||
#+caption:Vacas com água, pasto e sombra.
|
||
#+ATTR_HTML:width 300 px :align center :title Action!
|
||
[[https://nuvem.multifarm.top/apps/files/?dir=/Photos&openfile=457851]]
|
||
|
||
|
||
Exemplo 3 -
|
||
#+begin_export html
|
||
<div id="subtittle" style="float: center; text-aling:center;">
|
||
<p>
|
||
<font size="1"> Composição do rebanho. Nes propriedade, os animais são divididos em dois lotes para o pastoreio.</font>
|
||
</p>
|
||
<p>
|
||
<a href="http://multifarm.top">
|
||
<img src= "[[https://nuvem.multifarm.top/apps/files/?dir=/Photos&openfile=457848]]" width = "250"/>
|
||
</a>
|
||
</p>
|
||
</div>
|
||
#+end_export>
|
||
|
||
|
||
#+Caption: Composição do rebanho. Nes propriedade, os animais são divididos em dois lotes para o pastoreio.
|
||
#+ATTR_HTML: width 200 px :aling center
|
||
[[https://nuvem.multifarm.top/apps/files/?dir=/Photos&openfile=457848]]
|