Skip to content

Commit

Permalink
looking at renaming countries
Browse files Browse the repository at this point in the history
no solution yet
  • Loading branch information
heathermirletz committed Sep 10, 2024
1 parent f24e475 commit 6dec6f5
Show file tree
Hide file tree
Showing 5 changed files with 179 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15069,23 +15069,104 @@ <h1 id="Import-and-update-Grid-electricity-mix-by-country-Automatically">Import

</div>

</div><div class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs ">
</div><div class="jp-Cell jp-CodeCell jp-Notebook-cell ">
<div class="jp-Cell-inputWrapper">
<div class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser">
</div>
<div class="jp-InputArea jp-Cell-inputArea">
<div class="jp-InputPrompt jp-InputArea-prompt">In&nbsp;[7]:</div>
<div class="jp-InputPrompt jp-InputArea-prompt">In&nbsp;[38]:</div>
<div class="jp-CodeMirrorEditor jp-Editor jp-InputArea-editor" data-type="inline">
<div class="CodeMirror cm-s-jupyter">
<div class=" highlight hl-ipython3"><pre><span></span><span class="c1">#for unique values of area, do a pivot table with year on index, variable on column, and value in thingy</span>
<span class="c1">#emberdata_vars_perc['Area'].unique()</span>
<span class="n">emberdata_vars_perc</span><span class="p">[</span><span class="s1">'Area'</span><span class="p">]</span><span class="o">.</span><span class="n">unique</span><span class="p">()</span>
</pre></div>

</div>
</div>
</div>
</div>

<div class="jp-Cell-outputWrapper">
<div class="jp-Collapser jp-OutputCollapser jp-Cell-outputCollapser">
</div>


<div class="jp-OutputArea jp-Cell-outputArea">

<div class="jp-OutputArea-child">


<div class="jp-OutputPrompt jp-OutputArea-prompt">Out[38]:</div>




<div class="jp-RenderedText jp-OutputArea-output jp-OutputArea-executeResult" data-mime-type="text/plain">
<pre>array([&#39;Afghanistan&#39;, &#39;Africa&#39;, &#39;Albania&#39;, &#39;Algeria&#39;, &#39;American Samoa&#39;,
&#39;Angola&#39;, &#39;Antigua and Barbuda&#39;, &#39;Argentina&#39;, &#39;Armenia&#39;, &#39;Aruba&#39;,
&#39;ASEAN&#39;, &#39;Asia&#39;, &#39;Australia&#39;, &#39;Austria&#39;, &#39;Azerbaijan&#39;,
&#39;Bahamas (the)&#39;, &#39;Bahrain&#39;, &#39;Bangladesh&#39;, &#39;Barbados&#39;, &#39;Belarus&#39;,
&#39;Belgium&#39;, &#39;Belize&#39;, &#39;Benin&#39;, &#39;Bermuda&#39;, &#39;Bhutan&#39;, &#39;Bolivia&#39;,
&#39;Bosnia Herzegovina&#39;, &#39;Botswana&#39;, &#39;Brazil&#39;, &#39;Brunei Darussalam&#39;,
&#39;Bulgaria&#39;, &#39;Burkina Faso&#39;, &#39;Burundi&#39;, &#39;Cabo Verde&#39;, &#39;Cambodia&#39;,
&#39;Cameroon&#39;, &#39;Canada&#39;, &#39;Cayman Islands (the)&#39;,
&#39;Central African Republic (the)&#39;, &#39;Chad&#39;, &#39;Chile&#39;, &#39;China&#39;,
&#39;Colombia&#39;, &#39;Comoros (the)&#39;,
&#39;Congo (the Democratic Republic of the)&#39;, &#39;Congo (the)&#39;,
&#39;Cook Islands (the)&#39;, &#39;Costa Rica&#39;, &#34;Cote d&#39;Ivoire&#34;, &#39;Croatia&#39;,
&#39;Cuba&#39;, &#39;Cyprus&#39;, &#39;Czechia&#39;, &#39;Denmark&#39;, &#39;Djibouti&#39;, &#39;Dominica&#39;,
&#39;Dominican Republic (the)&#39;, &#39;Ecuador&#39;, &#39;Egypt&#39;, &#39;El Salvador&#39;,
&#39;Equatorial Guinea&#39;, &#39;Eritrea&#39;, &#39;Estonia&#39;, &#39;Eswatini&#39;, &#39;Ethiopia&#39;,
&#39;EU&#39;, &#39;Europe&#39;, &#39;Falkland Islands (the) [Malvinas]&#39;,
&#39;Faroe Islands (the)&#39;, &#39;Fiji&#39;, &#39;Finland&#39;, &#39;France&#39;,
&#39;French Guiana&#39;, &#39;French Polynesia&#39;, &#39;G20&#39;, &#39;G7&#39;, &#39;Gabon&#39;,
&#39;Gambia (the)&#39;, &#39;Georgia&#39;, &#39;Germany&#39;, &#39;Ghana&#39;, &#39;Gibraltar&#39;,
&#39;Greece&#39;, &#39;Greenland&#39;, &#39;Grenada&#39;, &#39;Guadeloupe&#39;, &#39;Guam&#39;,
&#39;Guatemala&#39;, &#39;Guinea&#39;, &#39;Guinea-Bissau&#39;, &#39;Guyana&#39;, &#39;Haiti&#39;,
&#39;Honduras&#39;, &#39;Hong Kong&#39;, &#39;Hungary&#39;, &#39;Iceland&#39;, &#39;India&#39;,
&#39;Indonesia&#39;, &#39;Iran (Islamic Republic of)&#39;, &#39;Iraq&#39;, &#39;Ireland&#39;,
&#39;Israel&#39;, &#39;Italy&#39;, &#39;Jamaica&#39;, &#39;Japan&#39;, &#39;Jordan&#39;, &#39;Kazakhstan&#39;,
&#39;Kenya&#39;, &#39;Kiribati&#39;, &#34;Korea (the Democratic People&#39;s Republic of)&#34;,
&#39;Kosovo&#39;, &#39;Kuwait&#39;, &#39;Kyrgyzstan&#39;,
&#34;Lao People&#39;s Democratic Republic (the)&#34;,
&#39;Latin America and Caribbean&#39;, &#39;Latvia&#39;, &#39;Lebanon&#39;, &#39;Lesotho&#39;,
&#39;Liberia&#39;, &#39;Libya&#39;, &#39;Lithuania&#39;, &#39;Luxembourg&#39;, &#39;Macao&#39;,
&#39;Madagascar&#39;, &#39;Malawi&#39;, &#39;Malaysia&#39;, &#39;Maldives&#39;, &#39;Mali&#39;, &#39;Malta&#39;,
&#39;Martinique&#39;, &#39;Mauritania&#39;, &#39;Mauritius&#39;, &#39;Mexico&#39;, &#39;Middle East&#39;,
&#39;Moldova&#39;, &#39;Mongolia&#39;, &#39;Montenegro&#39;, &#39;Montserrat&#39;, &#39;Morocco&#39;,
&#39;Mozambique&#39;, &#39;Myanmar&#39;, &#39;Namibia&#39;, &#39;Nauru&#39;, &#39;Nepal&#39;,
&#39;Netherlands&#39;, &#39;New Caledonia&#39;, &#39;New Zealand&#39;, &#39;Nicaragua&#39;,
&#39;Niger (the)&#39;, &#39;Nigeria&#39;, &#39;Niue&#39;, &#39;North America&#39;,
&#39;North Macedonia&#39;, &#39;Norway&#39;, &#39;Oceania&#39;, &#39;OECD&#39;, &#39;Oman&#39;, &#39;Pakistan&#39;,
&#39;Palestine, State of&#39;, &#39;Panama&#39;, &#39;Papua New Guinea&#39;, &#39;Paraguay&#39;,
&#39;Peru&#39;, &#39;Philippines (the)&#39;, &#39;Poland&#39;, &#39;Portugal&#39;, &#39;Puerto Rico&#39;,
&#39;Qatar&#39;, &#39;Reunion&#39;, &#39;Romania&#39;, &#39;Russian Federation (the)&#39;,
&#39;Rwanda&#39;, &#39;Saint Helena, Ascension and Tristan da Cunha&#39;,
&#39;Saint Kitts and Nevis&#39;, &#39;Saint Lucia&#39;,
&#39;Saint Pierre and Miquelon&#39;, &#39;Saint Vincent and the Grenadines&#39;,
&#39;Samoa&#39;, &#39;Sao Tome and Principe&#39;, &#39;Saudi Arabia&#39;, &#39;Senegal&#39;,
&#39;Serbia&#39;, &#39;Seychelles&#39;, &#39;Sierra Leone&#39;, &#39;Singapore&#39;, &#39;Slovakia&#39;,
&#39;Slovenia&#39;, &#39;Solomon Islands&#39;, &#39;Somalia&#39;, &#39;South Africa&#39;,
&#39;South Korea&#39;, &#39;South Sudan&#39;, &#39;Spain&#39;, &#39;Sri Lanka&#39;, &#39;Sudan (the)&#39;,
&#39;Suriname&#39;, &#39;Sweden&#39;, &#39;Switzerland&#39;, &#39;Syrian Arab Republic (the)&#39;,
&#39;Taiwan&#39;, &#39;Tajikistan&#39;, &#39;Tanzania, the United Republic of&#39;,
&#39;Thailand&#39;, &#39;Timor-Leste&#39;, &#39;Togo&#39;, &#39;Tonga&#39;, &#39;Trinidad and Tobago&#39;,
&#39;Tunisia&#39;, &#39;Turkey&#39;, &#39;Turkmenistan&#39;,
&#39;Turks and Caicos Islands (the)&#39;, &#39;Uganda&#39;, &#39;Ukraine&#39;,
&#39;United Arab Emirates&#39;, &#39;United Kingdom&#39;,
&#39;United States of America&#39;, &#39;Uruguay&#39;, &#39;Uzbekistan&#39;, &#39;Vanuatu&#39;,
&#39;Venezuela (Bolivarian Republic of)&#39;, &#39;Viet Nam&#39;,
&#39;Virgin Islands (British)&#39;, &#39;Virgin Islands (U.S.)&#39;,
&#39;Western Sahara&#39;, &#39;World&#39;, &#39;Yemen&#39;, &#39;Zambia&#39;, &#39;Zimbabwe&#39;],
dtype=object)</pre>
</div>

</div>

</div>

</div>

</div><div class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs ">
<div class="jp-Cell-inputWrapper">
<div class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,13 +449,80 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 38,
"id": "eec1cbed-e7ed-4d73-8133-5194be8b36e2",
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/plain": [
"array(['Afghanistan', 'Africa', 'Albania', 'Algeria', 'American Samoa',\n",
" 'Angola', 'Antigua and Barbuda', 'Argentina', 'Armenia', 'Aruba',\n",
" 'ASEAN', 'Asia', 'Australia', 'Austria', 'Azerbaijan',\n",
" 'Bahamas (the)', 'Bahrain', 'Bangladesh', 'Barbados', 'Belarus',\n",
" 'Belgium', 'Belize', 'Benin', 'Bermuda', 'Bhutan', 'Bolivia',\n",
" 'Bosnia Herzegovina', 'Botswana', 'Brazil', 'Brunei Darussalam',\n",
" 'Bulgaria', 'Burkina Faso', 'Burundi', 'Cabo Verde', 'Cambodia',\n",
" 'Cameroon', 'Canada', 'Cayman Islands (the)',\n",
" 'Central African Republic (the)', 'Chad', 'Chile', 'China',\n",
" 'Colombia', 'Comoros (the)',\n",
" 'Congo (the Democratic Republic of the)', 'Congo (the)',\n",
" 'Cook Islands (the)', 'Costa Rica', \"Cote d'Ivoire\", 'Croatia',\n",
" 'Cuba', 'Cyprus', 'Czechia', 'Denmark', 'Djibouti', 'Dominica',\n",
" 'Dominican Republic (the)', 'Ecuador', 'Egypt', 'El Salvador',\n",
" 'Equatorial Guinea', 'Eritrea', 'Estonia', 'Eswatini', 'Ethiopia',\n",
" 'EU', 'Europe', 'Falkland Islands (the) [Malvinas]',\n",
" 'Faroe Islands (the)', 'Fiji', 'Finland', 'France',\n",
" 'French Guiana', 'French Polynesia', 'G20', 'G7', 'Gabon',\n",
" 'Gambia (the)', 'Georgia', 'Germany', 'Ghana', 'Gibraltar',\n",
" 'Greece', 'Greenland', 'Grenada', 'Guadeloupe', 'Guam',\n",
" 'Guatemala', 'Guinea', 'Guinea-Bissau', 'Guyana', 'Haiti',\n",
" 'Honduras', 'Hong Kong', 'Hungary', 'Iceland', 'India',\n",
" 'Indonesia', 'Iran (Islamic Republic of)', 'Iraq', 'Ireland',\n",
" 'Israel', 'Italy', 'Jamaica', 'Japan', 'Jordan', 'Kazakhstan',\n",
" 'Kenya', 'Kiribati', \"Korea (the Democratic People's Republic of)\",\n",
" 'Kosovo', 'Kuwait', 'Kyrgyzstan',\n",
" \"Lao People's Democratic Republic (the)\",\n",
" 'Latin America and Caribbean', 'Latvia', 'Lebanon', 'Lesotho',\n",
" 'Liberia', 'Libya', 'Lithuania', 'Luxembourg', 'Macao',\n",
" 'Madagascar', 'Malawi', 'Malaysia', 'Maldives', 'Mali', 'Malta',\n",
" 'Martinique', 'Mauritania', 'Mauritius', 'Mexico', 'Middle East',\n",
" 'Moldova', 'Mongolia', 'Montenegro', 'Montserrat', 'Morocco',\n",
" 'Mozambique', 'Myanmar', 'Namibia', 'Nauru', 'Nepal',\n",
" 'Netherlands', 'New Caledonia', 'New Zealand', 'Nicaragua',\n",
" 'Niger (the)', 'Nigeria', 'Niue', 'North America',\n",
" 'North Macedonia', 'Norway', 'Oceania', 'OECD', 'Oman', 'Pakistan',\n",
" 'Palestine, State of', 'Panama', 'Papua New Guinea', 'Paraguay',\n",
" 'Peru', 'Philippines (the)', 'Poland', 'Portugal', 'Puerto Rico',\n",
" 'Qatar', 'Reunion', 'Romania', 'Russian Federation (the)',\n",
" 'Rwanda', 'Saint Helena, Ascension and Tristan da Cunha',\n",
" 'Saint Kitts and Nevis', 'Saint Lucia',\n",
" 'Saint Pierre and Miquelon', 'Saint Vincent and the Grenadines',\n",
" 'Samoa', 'Sao Tome and Principe', 'Saudi Arabia', 'Senegal',\n",
" 'Serbia', 'Seychelles', 'Sierra Leone', 'Singapore', 'Slovakia',\n",
" 'Slovenia', 'Solomon Islands', 'Somalia', 'South Africa',\n",
" 'South Korea', 'South Sudan', 'Spain', 'Sri Lanka', 'Sudan (the)',\n",
" 'Suriname', 'Sweden', 'Switzerland', 'Syrian Arab Republic (the)',\n",
" 'Taiwan', 'Tajikistan', 'Tanzania, the United Republic of',\n",
" 'Thailand', 'Timor-Leste', 'Togo', 'Tonga', 'Trinidad and Tobago',\n",
" 'Tunisia', 'Turkey', 'Turkmenistan',\n",
" 'Turks and Caicos Islands (the)', 'Uganda', 'Ukraine',\n",
" 'United Arab Emirates', 'United Kingdom',\n",
" 'United States of America', 'Uruguay', 'Uzbekistan', 'Vanuatu',\n",
" 'Venezuela (Bolivarian Republic of)', 'Viet Nam',\n",
" 'Virgin Islands (British)', 'Virgin Islands (U.S.)',\n",
" 'Western Sahara', 'World', 'Yemen', 'Zambia', 'Zimbabwe'],\n",
" dtype=object)"
]
},
"execution_count": 38,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#for unique values of area, do a pivot table with year on index, variable on column, and value in thingy\n",
"#emberdata_vars_perc['Area'].unique()"
"emberdata_vars_perc['Area'].unique()"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@
emberdata_vars_perc


# In[7]:
# In[38]:


#for unique values of area, do a pivot table with year on index, variable on column, and value in thingy
#emberdata_vars_perc['Area'].unique()
emberdata_vars_perc['Area'].unique()


# In[8]:
Expand Down
Loading

0 comments on commit 6dec6f5

Please sign in to comment.