diff --git a/week13/inClass_week13.ipynb b/week13/inClass_week13.ipynb index 44e4897..9f4ef5a 100644 --- a/week13/inClass_week13.ipynb +++ b/week13/inClass_week13.ipynb @@ -265,7 +265,7 @@ { "cell_type": "code", "execution_count": 5, - "id": "79c98763", + "id": "72bf03e7", "metadata": {}, "outputs": [ { @@ -358,7 +358,7 @@ { "cell_type": "code", "execution_count": 6, - "id": "b8e397fc", + "id": "a1dd0e15", "metadata": {}, "outputs": [ { @@ -390,7 +390,7 @@ { "cell_type": "code", "execution_count": 7, - "id": "f55e1d5f", + "id": "027bff29", "metadata": {}, "outputs": [], "source": [ @@ -400,7 +400,7 @@ { "cell_type": "code", "execution_count": 8, - "id": "9718c9a2", + "id": "1c925fa3", "metadata": {}, "outputs": [ { @@ -610,7 +610,7 @@ { "cell_type": "code", "execution_count": 9, - "id": "ece95375", + "id": "ef3177cd", "metadata": {}, "outputs": [ { @@ -703,7 +703,7 @@ { "cell_type": "code", "execution_count": 10, - "id": "470bd37d", + "id": "1d79f69f", "metadata": {}, "outputs": [], "source": [ @@ -713,7 +713,7 @@ { "cell_type": "code", "execution_count": 11, - "id": "b4da08b5", + "id": "883b1c90", "metadata": {}, "outputs": [ { @@ -958,7 +958,7 @@ { "cell_type": "code", "execution_count": 12, - "id": "81f0acbc", + "id": "00218b71", "metadata": {}, "outputs": [], "source": [ @@ -970,7 +970,7 @@ { "cell_type": "code", "execution_count": 17, - "id": "37507751", + "id": "08c8a2b3", "metadata": {}, "outputs": [ { @@ -1055,7 +1055,7 @@ { "cell_type": "code", "execution_count": 18, - "id": "6fbb8fcf", + "id": "13e1ee2a", "metadata": {}, "outputs": [ { @@ -1149,7 +1149,7 @@ { "cell_type": "code", "execution_count": 19, - "id": "a05e335c", + "id": "2346e0c7", "metadata": {}, "outputs": [], "source": [ @@ -1159,7 +1159,7 @@ { "cell_type": "code", "execution_count": 21, - "id": "ff56bcd9", + "id": "03ebb3b0", "metadata": {}, "outputs": [ { @@ -1180,7 +1180,7 @@ { "cell_type": "code", "execution_count": 28, - "id": "ba93279f", + "id": "8b1c14e8", "metadata": {}, "outputs": [ { @@ -1280,7 +1280,7 @@ { "cell_type": "code", "execution_count": 29, - "id": "7d532aec", + "id": "95e014b7", "metadata": {}, "outputs": [ { @@ -1525,7 +1525,7 @@ { "cell_type": "code", "execution_count": 31, - "id": "1b39ff1f", + "id": "3a8b52dd", "metadata": {}, "outputs": [], "source": [ @@ -1567,7 +1567,7 @@ { "cell_type": "code", "execution_count": 33, - "id": "643e22b3", + "id": "7854e23c", "metadata": {}, "outputs": [ { @@ -1589,7 +1589,7 @@ { "cell_type": "code", "execution_count": 34, - "id": "82fcc929", + "id": "bf746f98", "metadata": {}, "outputs": [ { @@ -1611,7 +1611,7 @@ { "cell_type": "code", "execution_count": 35, - "id": "dad41ac4", + "id": "cdca7d37", "metadata": {}, "outputs": [ { @@ -1633,7 +1633,7 @@ { "cell_type": "code", "execution_count": 36, - "id": "74129831", + "id": "093547d3", "metadata": {}, "outputs": [ { @@ -1661,7 +1661,7 @@ { "cell_type": "code", "execution_count": 37, - "id": "ed2dd95f", + "id": "d785cf58", "metadata": {}, "outputs": [ { @@ -1732,7 +1732,7 @@ { "cell_type": "code", "execution_count": 38, - "id": "ca5ff505", + "id": "8e50da92", "metadata": {}, "outputs": [ { @@ -1753,7 +1753,7 @@ { "cell_type": "code", "execution_count": 39, - "id": "29d272f5", + "id": "327be9a9", "metadata": {}, "outputs": [ { @@ -1998,10 +1998,719 @@ "corg_clean.head()" ] }, + { + "cell_type": "code", + "execution_count": 40, + "id": "51215bed", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "United States 39.7837304 -100.445882\n", + "Brazil -10.3333333 -53.2\n", + "Russia 64.6863136 97.7453061\n", + "Japan 36.5748441 139.2394179\n", + "Vietnam 15.9266657 107.9650855\n", + "Germany 51.1638175 10.4478313\n", + "France 46.603354 1.8883335\n", + "United Kingdom 54.7023545 -3.2765753\n", + "Italy 42.6384261 12.674297\n", + "South Africa -28.8166236 24.991639\n", + "Ukraine 49.4871968 31.2718321\n", + "Spain 39.3260685 -4.8379791\n", + "Poland 52.215933 19.134422\n", + "Canada 61.0666922 -107.991707\n", + "Korea, North 40.3736611 127.0870417\n", + "Romania 45.9852129 24.6859225\n", + "Australia -24.7761086 134.755\n", + "Portugal 39.6621648 -8.1353519\n", + "Belgium 50.6402809 4.6667145\n", + "Czech Republic 49.7439047 15.3381061\n", + "Hungary 47.1817585 19.5060937\n", + "Belarus 53.4250605 27.6971358\n", + "Sweden 59.6749712 14.5208584\n", + "Austria 47.59397 14.12456\n", + "Switzerland 46.7985624 8.2319736\n", + "Israel 31.39480005 34.63358319049945\n", + "Serbia 44.1534121 20.55144\n", + "Denmark 55.670249 10.3333283\n", + "Finland 63.2467777 25.9209164\n", + "Norway 61.1529386 8.7876653\n", + "Croatia 45.3658443 15.6575209\n", + "New Zealand -41.5000831 172.8344077\n", + "Ireland 52.865196 -7.9794599\n", + "Lithuania 55.3500003 23.7499997\n", + "Uruguay -32.8755548 -56.0201525\n", + "Latvia 56.8406494 24.7537645\n", + "Slovenia 46.1199444 14.8153333\n", + "Estonia 58.7523778 25.3319078\n", + "Netherlands 52.24764975 5.541246849406163\n", + "Kosovo 42.5869578 20.9021231\n" + ] + } + ], + "source": [ + "lat, long = [], []\n", + "for c in corg_clean.columns:\n", + " la,lo = get_boundingbox_country(c)\n", + " print(c,la,lo)\n", + " lat.append(la); long.append(lo)" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "id": "e7e12845", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + " | United States | \n", + "Brazil | \n", + "Russia | \n", + "Japan | \n", + "Vietnam | \n", + "Germany | \n", + "France | \n", + "United Kingdom | \n", + "Italy | \n", + "South Africa | \n", + "... | \n", + "Croatia | \n", + "New Zealand | \n", + "Ireland | \n", + "Lithuania | \n", + "Uruguay | \n", + "Latvia | \n", + "Slovenia | \n", + "Estonia | \n", + "Netherlands | \n", + "Kosovo | \n", + "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Years | \n", + "\n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " |
1917-01-01 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "1 | \n", + "0 | \n", + "0 | \n", + "... | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "
1918-01-01 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "... | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "
1919-01-01 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "... | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "1 | \n", + "
1920-01-01 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "... | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "
1921-01-01 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "... | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "
... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "
2016-01-01 | \n", + "229 | \n", + "0 | \n", + "217 | \n", + "2 | \n", + "0 | \n", + "54 | \n", + "55 | \n", + "28 | \n", + "2 | \n", + "0 | \n", + "... | \n", + "8 | \n", + "3 | \n", + "0 | \n", + "9 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "27 | \n", + "17 | \n", + "72 | \n", + "
2017-01-01 | \n", + "213 | \n", + "0 | \n", + "260 | \n", + "2 | \n", + "1 | \n", + "28 | \n", + "60 | \n", + "10 | \n", + "4 | \n", + "0 | \n", + "... | \n", + "4 | \n", + "3 | \n", + "0 | \n", + "0 | \n", + "2 | \n", + "0 | \n", + "0 | \n", + "8 | \n", + "25 | \n", + "101 | \n", + "
2018-01-01 | \n", + "198 | \n", + "0 | \n", + "329 | \n", + "0 | \n", + "3 | \n", + "42 | \n", + "25 | \n", + "5 | \n", + "2 | \n", + "0 | \n", + "... | \n", + "6 | \n", + "3 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "16 | \n", + "12 | \n", + "56 | \n", + "
2019-01-01 | \n", + "118 | \n", + "0 | \n", + "189 | \n", + "0 | \n", + "0 | \n", + "30 | \n", + "62 | \n", + "1 | \n", + "2 | \n", + "0 | \n", + "... | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "16 | \n", + "12 | \n", + "51 | \n", + "
2020-01-01 | \n", + "2 | \n", + "0 | \n", + "16 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "... | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "17 | \n", + "
104 rows × 40 columns
\n", + "Years | \n", + "1917-01-01 | \n", + "1918-01-01 | \n", + "1919-01-01 | \n", + "1920-01-01 | \n", + "1921-01-01 | \n", + "1922-01-01 | \n", + "1923-01-01 | \n", + "1924-01-01 | \n", + "1925-01-01 | \n", + "1926-01-01 | \n", + "... | \n", + "2011-01-01 | \n", + "2012-01-01 | \n", + "2013-01-01 | \n", + "2014-01-01 | \n", + "2015-01-01 | \n", + "2016-01-01 | \n", + "2017-01-01 | \n", + "2018-01-01 | \n", + "2019-01-01 | \n", + "2020-01-01 | \n", + "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
United States | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "... | \n", + "408 | \n", + "431 | \n", + "376 | \n", + "280 | \n", + "301 | \n", + "229 | \n", + "213 | \n", + "198 | \n", + "118 | \n", + "2 | \n", + "
Brazil | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "... | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "
Russia | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "... | \n", + "89 | \n", + "82 | \n", + "115 | \n", + "127 | \n", + "237 | \n", + "217 | \n", + "260 | \n", + "329 | \n", + "189 | \n", + "16 | \n", + "
Japan | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "... | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "2 | \n", + "2 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "
Vietnam | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "... | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "1 | \n", + "3 | \n", + "0 | \n", + "0 | \n", + "
5 rows × 104 columns
\n", + "