Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Moncora
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
halleyUIS
Moncora
Commits
c202d34c
Commit
c202d34c
authored
2 years ago
by
Laura Marcela Becerra
Browse files
Options
Downloads
Patches
Plain Diff
changes in Cambio Climatico
parent
abe055f2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Book/CambioClimaticoII.md
+12
-94
12 additions, 94 deletions
Book/CambioClimaticoII.md
Book/CambioClimaticoIII.md
+116
-0
116 additions, 0 deletions
Book/CambioClimaticoIII.md
with
128 additions
and
94 deletions
Book/CambioClimaticoII.md
+
12
−
94
View file @
c202d34c
...
...
@@ -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=
80
0,
width=
75
0,
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
...
...
This diff is collapsed.
Click to expand it.
Book/CambioClimaticoIII.md
+
116
−
0
View file @
c202d34c
---
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()
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment