From c202d34c1461f6f11ac88b03c05cd97c07bd40f3 Mon Sep 17 00:00:00 2001
From: Laura <laura.marcela.becerra@gmail.com>
Date: Tue, 21 Feb 2023 21:58:54 -0500
Subject: [PATCH] changes in Cambio Climatico

---
 Book/CambioClimaticoII.md  | 106 ++++-----------------------------
 Book/CambioClimaticoIII.md | 116 +++++++++++++++++++++++++++++++++++++
 2 files changed, 128 insertions(+), 94 deletions(-)

diff --git a/Book/CambioClimaticoII.md b/Book/CambioClimaticoII.md
index c10e62a..7023235 100644
--- a/Book/CambioClimaticoII.md
+++ b/Book/CambioClimaticoII.md
@@ -33,6 +33,14 @@ Los datos, recolectados durante muchos años, revelan los signos y patrones de u
 
 ## Incremento de la temperatura
 
+````{margin}
+```{note}
+Aqui va una explicacion de la grafica !
+```
+````
+
+
+
 ```{code-cell} 
 :tags: [hide-input]
 
@@ -56,7 +64,7 @@ fig.update_layout (
     xaxis_title="Año",
     yaxis_title="Anomalía Térmica",
     autosize=False,
-    width=800,
+    width=750,
     height=500,
     margin=dict(
         l=50,
@@ -108,104 +116,14 @@ fig.show()
 
 ```
 
-## Emisión de CO$_2$
 
-```{code-cell}
-:tags: [hide-input]
 
-import plotly.graph_objs as go
-import pandas as pd
-from plotly.subplots import make_subplots
-
-#df = pd.read_csv(r'https://nyc3.digitaloceanspaces.com/owid-public/data/co2/owid-co2-data.csv')
-df = pd.read_csv('./datos/owid-co2-data.csv')
-
-continents = ['Europe','North America','South America','Asia','Oceania']
-co2continents = df[df['country'].isin(continents)]
-
-co2continents = co2continents.rename(columns={"country": "Región"})    
-fig = make_subplots(rows=1, cols=2)
-#fig= go.FigureWidget()
-
-labels = ['Europa','América del Norte','América del Sur','Asia','Oceania']
-colors= ['rgb(31, 119, 180)', 'rgb(255, 127, 14)',
-                       'rgb(44, 160, 44)', 'rgb(214, 39, 40)',
-                       'rgb(148, 103, 189)', 'rgb(140, 86, 75)',
-                       'rgb(227, 119, 194)', 'rgb(127, 127, 127)',
-                       'rgb(188, 189, 34)', 'rgb(23, 190, 207)']
-ymax = co2continents["year"].max()+10
-ymin = co2continents["year"].min()-10
-
-i=0
-for c in continents:
-    df = co2continents[co2continents['Región']== c ]
-    fig.add_scatter( x = df['year'], y = df['co2'] , name=labels[i],legendgroup=labels[i],text=labels[i], row=1, col=1,
-                  line=dict(color=colors[i]) )
-    i+=1
-    
-i=0
-for c in continents:
-    df = co2continents[co2continents['Región']== c ]
-    fig.add_scatter( x = df['year'], y = df["share_global_co2"] ,  name=labels[i], legendgroup=labels[i],text=labels[i], row=1, col=2,
-                 showlegend=False, line=dict(color=colors[i]) )
-    i+=1
+<center><iframe width="600" height="350" src="https://www.youtube.com/embed/LwRTw_7NNJs" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe><center>
 
 
-note = 'datos tomados de https://ourworldindata.org/co2-and-greenhouse-gas-emissions'
-fig.add_annotation(
-    showarrow=False,
-    text=note,
-    font=dict(size=10), 
-    xref='x domain',
-    x=1.6,
-    yref='y domain',
-    y=-0.205
-    )
+## Aumento del nivel del mar
 
-fig.update_layout (   
-    xaxis_title="Año",
-    yaxis_title="co2 [Toneladas]",
-    xaxis2_title="Año",
-    yaxis2_title="Porcentaje global [%]",
-    autosize=False,
-    width=1200,
-    height=500,
-    margin=dict(
-        l=50,
-        r=50,
-        b=50,
-        t=50,
-        pad=4),
-    legend_title="Región",
-    font=dict(
-        family="Rockwell",
-        size=16,
-        #color="RebeccaPurple"
-    ),
-    plot_bgcolor='rgba(0,0,0,0)'
-)
-
-fig.update_xaxes(
-    ticks='outside',
-    showline=True,
-    linecolor='black',
-    gridcolor='lightgrey',
-    range=[ymin,ymax]
-)
-fig.update_yaxes(
-    ticks='outside',
-    showline=True,
-    linecolor='black',
-    gridcolor='lightgrey'
-)
-
-
-
-    
-fig.show()
-
-
-```
+## Retroceso de los Glaciares
 
 
 
diff --git a/Book/CambioClimaticoIII.md b/Book/CambioClimaticoIII.md
index 4751d9e..bf6dd18 100644
--- a/Book/CambioClimaticoIII.md
+++ b/Book/CambioClimaticoIII.md
@@ -1 +1,117 @@
+---
+jupytext:
+  cell_metadata_filter: -all
+  formats: md:myst
+  text_representation:
+    extension: .md
+    format_name: myst
+    format_version: 0.13
+    jupytext_version: 1.11.5
+kernelspec:
+  display_name: Python 3
+  language: python
+  name: python3
+---
+
+
 # Causas y efectos del cambio climático 
+
+## Emisión de CO$_2$
+
+```{code-cell}
+:tags: [hide-input]
+
+import plotly.graph_objs as go
+import pandas as pd
+from plotly.subplots import make_subplots
+
+#df = pd.read_csv(r'https://nyc3.digitaloceanspaces.com/owid-public/data/co2/owid-co2-data.csv')
+df = pd.read_csv('./datos/owid-co2-data.csv')
+
+continents = ['Europe','North America','South America','Asia','Oceania']
+co2continents = df[df['country'].isin(continents)]
+
+co2continents = co2continents.rename(columns={"country": "Región"})    
+fig = make_subplots(rows=1, cols=2)
+#fig= go.FigureWidget()
+
+labels = ['Europa','América del Norte','América del Sur','Asia','Oceania']
+colors= ['rgb(31, 119, 180)', 'rgb(255, 127, 14)',
+                       'rgb(44, 160, 44)', 'rgb(214, 39, 40)',
+                       'rgb(148, 103, 189)', 'rgb(140, 86, 75)',
+                       'rgb(227, 119, 194)', 'rgb(127, 127, 127)',
+                       'rgb(188, 189, 34)', 'rgb(23, 190, 207)']
+ymax = co2continents["year"].max()+10
+ymin = co2continents["year"].min()-10
+
+i=0
+for c in continents:
+    df = co2continents[co2continents['Región']== c ]
+    fig.add_scatter( x = df['year'], y = df['co2'] , name=labels[i],legendgroup=labels[i],text=labels[i], row=1, col=1,
+                  line=dict(color=colors[i]) )
+    i+=1
+    
+i=0
+for c in continents:
+    df = co2continents[co2continents['Región']== c ]
+    fig.add_scatter( x = df['year'], y = df["share_global_co2"] ,  name=labels[i], legendgroup=labels[i],text=labels[i], row=1, col=2,
+                 showlegend=False, line=dict(color=colors[i]) )
+    i+=1
+
+
+note = 'datos tomados de https://ourworldindata.org/co2-and-greenhouse-gas-emissions'
+fig.add_annotation(
+    showarrow=False,
+    text=note,
+    font=dict(size=10), 
+    xref='x domain',
+    x=1.6,
+    yref='y domain',
+    y=-0.205
+    )
+
+fig.update_layout (   
+    xaxis_title="Año",
+    yaxis_title="co2 [Toneladas]",
+    xaxis2_title="Año",
+    yaxis2_title="Porcentaje global [%]",
+    autosize=False,
+    width=1200,
+    height=500,
+    margin=dict(
+        l=50,
+        r=50,
+        b=50,
+        t=50,
+        pad=4),
+    legend_title="Región",
+    font=dict(
+        family="Rockwell",
+        size=16,
+        #color="RebeccaPurple"
+    ),
+    plot_bgcolor='rgba(0,0,0,0)'
+)
+
+fig.update_xaxes(
+    ticks='outside',
+    showline=True,
+    linecolor='black',
+    gridcolor='lightgrey',
+    range=[ymin,ymax]
+)
+fig.update_yaxes(
+    ticks='outside',
+    showline=True,
+    linecolor='black',
+    gridcolor='lightgrey'
+)
+
+
+
+    
+fig.show()
+
+
+```
+
-- 
GitLab