Wolfram Language

Quantities in Probability & Statistics

World Nuclear Reactors

NuclearReactorData provides data on the known nuclear reactors all over the world. Some of them have already been shut down, like Chernobyl. You can select the reactors that are currently operational for the analysis of nuclear energy resources.

In[1]:=
Click for copyable input
reactors = NuclearReactorData[];
In[2]:=
Click for copyable input
active = Keys@ Select[EntityValue["NuclearReactor", "Status", "EntityAssociation"], # === "operational" &];

Extract the annual energy production and the location country.

In[3]:=
Click for copyable input
annualproduction = NuclearReactorData[active, "AnnualEnergyProduction"]; countries = Map[First, NuclearReactorData[active, "Countries"]];

Create a dataset and remove the data points that contain missing values. The number of running reactors is above 400.

In[4]:=
Click for copyable input
data = Transpose[{active, countries, annualproduction}]; data = DeleteMissing[data, 1, 2];
In[5]:=
Click for copyable input
data // Dimensions
Out[5]=

The number of reactors per country.

In[6]:=
Click for copyable input
percountry = GroupBy[data, #1[[2]] &];
In[7]:=
Click for copyable input
numberpercountry = Map[Length, percountry];
In[8]:=
Click for copyable input
BarChart[Sort[numberpercountry], ChartLabels -> Automatic, ChartStyle -> "DarkRainbow", BarOrigin -> Left, BarSpacing -> 1, LabelingFunction -> (Placed[#1, After] &), ImageSize -> Large]
Out[8]=

The number of reactors corresponds to the total nuclear energy produced per country.

In[9]:=
Click for copyable input
energytotals = Map[Total[#[[All, 3]]] &, percountry];
In[10]:=
Click for copyable input
stats = {Min, Max, Mean, Median, Total}; TableForm[#[energytotals] & /@ stats, TableHeadings -> {stats}]
Out[10]//TableForm=

The largest producers of nuclear energy are the United States and France.

In[11]:=
Click for copyable input
TakeLargest[energytotals, 2]
Out[11]=
show complete Wolfram Language input
In[12]:=
Click for copyable input
GeoRegionValuePlot[energytotals, GeoProjection -> "Mercator", GeoRange -> {{-70, 80}, {-170, 190}}, GeoLabels -> (Tooltip[#1, #2] &)]
Out[12]=

The map looks different if you consider the total energy production per capita. Use CountryData to access population totals for each country on the list.

In[13]:=
Click for copyable input
populations = AssociationThread[Keys[energytotals], CountryData[#, "Population"] & /@ Keys[energytotals]];

Calculate nuclear energy per capita.

In[14]:=
Click for copyable input
energypercapita = energytotals/populations;
In[15]:=
Click for copyable input
TableForm[#[energypercapita] & /@ stats, TableHeadings -> {stats}]
Out[15]//TableForm=

On the map, you can see that even though the USA has the largest absolute nuclear energy production, it is not the largest per person, where France and Sweden have the lead.

In[16]:=
Click for copyable input
TakeLargest[energypercapita, 2]
Out[16]=
show complete Wolfram Language input
In[17]:=
Click for copyable input
GeoRegionValuePlot[energypercapita, GeoProjection -> "Mercator", GeoRange -> {{-70, 80}, {-170, 190}}, GeoLabels -> (Tooltip[#1, #2] &)]
Out[17]=

Related Examples

de es fr ja ko pt-br ru zh