Skip to content

Commit

Permalink
Update config.py for french graphs
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahrieubland committed May 20, 2024
1 parent 541da95 commit b9749dc
Show file tree
Hide file tree
Showing 2 changed files with 189 additions and 33 deletions.
220 changes: 188 additions & 32 deletions pinkbombs/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,11 @@
"arguments": [
"Year",
"Tons of wild salmon catch in Atlantic waters",
"Wild Altantic salmon collapse",
[
'#151c97'
],
],
},
"salmon-collapse-fr": {
"filename": "discrease_wild_salmon_1.1_fr.csv",
"function": pb.make_area_single_chart,
"parser": pd.read_csv,
"arguments": [
"Année",
"Saumon pêché dans l'Atlantique en tonnes",
"Effondrement des stocks de saumon sauvage",
"Tonnes of wild salmon catch in Atlantic waters",
[
'#151c97'
],
True,
],
},
"hyper-growth": {
Expand All @@ -36,19 +24,22 @@
"Year",
"Tonnes - live weight",
"Country",
"Hyper-growth in salmon farming",
"Farmed salmon production by country",
"Tonnes of farmed salmon produced",
1975,
True,
True,
],
},
},
"hyper-growth-grouped": {
"filename": "hyper_growth_salmon_farming_1.2.csv",
"function": pb.make_area_order_chart_grouped,
"filename": "numbers_salmons_farmed_1.0.csv",
"function": pb.make_area_chart_options,
"parser": pd.read_csv,
"arguments": [
"Year",
"Tonnes - live weight",
"Hyper-growth in salmon farming",
"#fd442f",
"Number of salmons (5kg each)",
"Production of farmed salmons",
"Number of salmons produced every year",
],
},
"top-10": {
Expand All @@ -60,13 +51,14 @@
"Country",
"Flag",
"% of total",
"Top 10 countries producing salmon (2021)",
"Tonnes of farmed salmon produced",
"Country",
"Top 10 countries producing salmon by tonnes (2021)",
None,
None,
[
'#151c97',
'#ff4530'
]
],
True,
],
},
"evolution-map": {
Expand All @@ -79,6 +71,7 @@
"Year",
"Tonnes - live weight",
"Evolution of salmon farming by country",
1980,
[
'#151c97',
],
Expand All @@ -103,10 +96,11 @@
"Employees 2022",
"Note",
],
"Top 10 companies producing salmon",
"Volume of salmon produced in tonnes (2022)",
"Company",
"Top 10 companies producing salmon by tonnes (2022)",
None,
None,
"#151c97",
True,
],
},
"top-land": {
Expand All @@ -124,10 +118,11 @@
"Countries of projects",
"Note",
],
"Top 10 RAS companies producing salmon",
"Top 10 land-based salmon productors (ambitions)",
"Company ambition for salmon production in tonnes",
"Company",
None,
"#151c97",
True,
False,
],
},
Expand All @@ -138,8 +133,10 @@
"arguments": [
"Company",
"Mortality_rate",
"Mortality rate by Companies",
"Company",
"Mortality rates of farmed salmons by company (2014-2022)",
None,
"Mortality Rate (%)",
True,
],
},
"alternatives": {
Expand All @@ -162,3 +159,162 @@
"arguments": [],
},
}

MAPPINGFR = {
"salmon-collapse": {
"filename": "discrease_wild_salmon_1.1_fr.csv",
"function": pb.make_area_single_chart,
"parser": pd.read_csv,
"arguments": [
"Année",
"Saumon pêché dans l'Atlantique en tonnes",
"Saumon pêché dans l'Atlantique en tonnes",
[
'#151c97'
],
True,
],
},
"hyper-growth": {
"filename": "hyper_growth_salmon_farming_1.2_fr.csv",
"function": pb.make_area_order_chart,
"parser": pd.read_csv,
"arguments": [
"Année",
"Tonnes de saumon produit en élevage",
"Pays",
"Production de saumon d'élevage par pays",
"Tonnes de saumon produit en élevage",
1975,
True,
True,
],
},
"hyper-growth-grouped": {
"filename": "numbers_salmons_farmed_1.0_fr.csv",
"function": pb.make_area_chart_options,
"parser": pd.read_csv,
"arguments": [
"Année",
"Nombre de saumons (5kg chacun)",
"Production de saumons d'élevage",
"Nombre de saumons produits chaque année",
],
},
"top-10": {
"filename": "top_10_countries_producing_1.3_fr.csv",
"function": pb.make_color_bar_chart,
"parser": pd.read_csv,
"arguments": [
"Tonnes de saumon",
"Pays",
"Drapeau",
"% du total",
"Top 10 pays producteurs de saumon par tonnes (2021)",
None,
None,
[
'#151c97',
'#ff4530'
],
True,
],
},
"evolution-map": {
"filename": "evolution_salmon_farming_country_iso_1.4_fr.csv",
"function": pb.make_animated_bubble_map,
"parser": pd.read_csv,
"arguments": [
"alpha-3",
"Pays",
"Année",
"Tonnes de saumon",
"Evolution de l'élevage du saumon par pays",
1980,
[
'#151c97',
],
],
},
"top-comp": {
"filename": "top_10_companies_producing_2.1_fr.csv",
"function": pb.make_simple_bar_chart,
"parser": pd.read_csv,
"arguments": [
"Tonnes de saumon 2022",
"Producteur",
"Drapeau",
"Revenus 2022",
"Employés 2022",
[
"Nom commercial",
"Date de création",
"Siège",
"Site internet",
"Revenus 2022",
"Employés 2022",
"Note",
],
"Top 10 producteurs de saumon par tonnes (2022)",
None,
None,
"#151c97",
True,
],
},
"top-land": {
"filename": "top_10_ras_companies_2.3_fr.csv",
"function": pb.make_simple_bar_chart,
"parser": pd.read_csv,
"arguments": [
"Production en tonnes",
"Producteur",
"Drapeau",
"Revenus 2022 dollars",
"Employés 2022",
[
"Nombre de projets",
"Pays des projets",
"Note",
],
"Top 10 producteurs de saumon d'élevage terrestre (ambitions)",
"Ambitions des producteurs pour la production de saumon en tonnes",
None,
"#151c97",
True,
False,
],
},
"mortality-rates": {
"filename": "mortality_rates_4.4_fr.csv",
"function": pb.make_simple_box_chart,
"parser": pd.read_csv,
"arguments": [
"Producteur",
"Taux de mortalité",
"Taux de mortalité des saumons d'élevage par producteur (2014-2022)",
None,
"Taux de mortalité (%)",
True,
],
},
"alternatives": {
"filename": "carbon_bombs_pie_chart_5.1.csv",
"function": pb.make_matrix_alternatives,
"parser": pd.read_csv,
"arguments": [
900,
500,
True,
],
},
}

MAPSFR = {
"ras-map": {
"filename": "ras_projects_for_map_2.4.csv",
"function": pb.make_ras_bubble_map,
"parser": pd.read_csv,
"arguments": [],
},
}
2 changes: 1 addition & 1 deletion pinkbombs/graphs/test_graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"Tonnes - live weight",
"Country",
title="Farmed salmon production by country",
y_title="Tonnes of salmon produced in farms",
y_title="Tonnes of farmed salmon produced",
min_date = 1975,
reorder=True,
hide_zoom=True,
Expand Down

0 comments on commit b9749dc

Please sign in to comment.