|
38 | 38 | "\n",
|
39 | 39 | "\n",
|
40 | 40 | "import warnings\n",
|
| 41 | + "\n", |
41 | 42 | "warnings.filterwarnings(\"ignore\")"
|
42 | 43 | ]
|
43 | 44 | },
|
|
109 | 110 | "raw_ia_license_data = pd.read_csv(dataset_paths[\"ia_license\"])\n",
|
110 | 111 | "raw_metmuseum_license_data = pd.read_csv(dataset_paths[\"metmuseum_license\"])\n",
|
111 | 112 | "raw_vimeo_license_data = pd.read_csv(dataset_paths[\"vimeo_license\"])\n",
|
112 |
| - "raw_wikicommons_license_data = pd.read_csv(dataset_paths[\"wikicommons_license\"], encoding=\"latin-1\")\n", |
| 113 | + "raw_wikicommons_license_data = pd.read_csv(\n", |
| 114 | + " dataset_paths[\"wikicommons_license\"], encoding=\"latin-1\"\n", |
| 115 | + ")\n", |
113 | 116 | "raw_wikipedia_license_data = pd.read_csv(dataset_paths[\"wikipedia_license\"])\n",
|
114 | 117 | "raw_youtube_time_data = pd.read_csv(dataset_paths[\"youtube_time\"])"
|
115 | 118 | ]
|
|
2923 | 2926 | "outputs": [],
|
2924 | 2927 | "source": [
|
2925 | 2928 | "rename_dict = {\n",
|
2926 |
| - " \"Bolivia\": \"Bolivia (Plurinational State of)\",\n", |
2927 |
| - " \"Cape Verde\": \"Cabo Verde\",\n", |
2928 |
| - " \"Congo the Democratic Republic of the\": \"Congo, Democratic Republic of the\",\n", |
2929 |
| - " \"Cote D'ivoire\": \"Côte d'Ivoire\",\n", |
2930 |
| - " \"Croatia (Hrvatska)\": \"Croatia\",\n", |
2931 |
| - " \"Czech Republic\": \"Czechia\",\n", |
2932 |
| - " \"East Timor\": \"Timor-Leste\",\n", |
2933 |
| - " \"Heard Island and Mcdonald Islands\": \"Heard Island and McDonald Islands\",\n", |
2934 |
| - " \"Holy See (Vatican City State)\": \"Holy See\",\n", |
2935 |
| - " \"Iran Islamic Republic of\": \"Iran (Islamic Republic of)\",\n", |
2936 |
| - " \"Korea Democratic People's Republic of\": \"Korea (Democratic People's Republic of)\",\n", |
2937 |
| - " \"Korea Republic of\": \"Korea, Republic of\",\n", |
2938 |
| - " \"Libyan Arab Jamahiriya\": \"Libya\",\n", |
2939 |
| - " \"Macedonia the Former Yugosalv Republic of\": \"North Macedonia\",\n", |
2940 |
| - " \"Micronesia Federated States of\": \"Micronesia (Federated States of)\",\n", |
2941 |
| - " \"Moldova Republic of\": \"Moldova, Republic of\",\n", |
2942 |
| - " \"Netherlands Antilles\": \"Netherlands\",\n", |
2943 |
| - " \"Palestinian Territory\": \"Palestine, State of\",\n", |
2944 |
| - " \"Reunion\": \"Réunion\",\n", |
2945 |
| - " \"Saint Helena\": \"Saint Helena, Ascension and Tristan da Cunha\",\n", |
2946 |
| - " \"Swaziland\": \"Eswatini\",\n", |
2947 |
| - " \"Taiwan Province of China\": \"Taiwan, Province of China\",\n", |
2948 |
| - " \"Tanzania United Republic of\": \"Tanzania, United Republic of\",\n", |
2949 |
| - " \"United Kingdom\": \"United Kingdom of Great Britain and Northern Ireland\",\n", |
2950 |
| - " \"United States\": \"United States of America\",\n", |
2951 |
| - " \"Venezuela\": \"Venezuela (Bolivarian Republic of)\",\n", |
2952 |
| - " \"Vietnam\": \"Viet Nam\",\n", |
2953 |
| - " \"Virgin Islands British\": \"Virgin Islands (British)\",\n", |
2954 |
| - " \"Virgin Islands U.S.\": \"Virgin Islands (U.S.)\",\n", |
2955 |
| - " }" |
| 2929 | + " \"Bolivia\": \"Bolivia (Plurinational State of)\",\n", |
| 2930 | + " \"Cape Verde\": \"Cabo Verde\",\n", |
| 2931 | + " \"Congo the Democratic Republic of the\": \"Congo, Democratic Republic of the\",\n", |
| 2932 | + " \"Cote D'ivoire\": \"Côte d'Ivoire\",\n", |
| 2933 | + " \"Croatia (Hrvatska)\": \"Croatia\",\n", |
| 2934 | + " \"Czech Republic\": \"Czechia\",\n", |
| 2935 | + " \"East Timor\": \"Timor-Leste\",\n", |
| 2936 | + " \"Heard Island and Mcdonald Islands\": \"Heard Island and McDonald Islands\",\n", |
| 2937 | + " \"Holy See (Vatican City State)\": \"Holy See\",\n", |
| 2938 | + " \"Iran Islamic Republic of\": \"Iran (Islamic Republic of)\",\n", |
| 2939 | + " \"Korea Democratic People's Republic of\": \"Korea (Democratic People's Republic of)\",\n", |
| 2940 | + " \"Korea Republic of\": \"Korea, Republic of\",\n", |
| 2941 | + " \"Libyan Arab Jamahiriya\": \"Libya\",\n", |
| 2942 | + " \"Macedonia the Former Yugosalv Republic of\": \"North Macedonia\",\n", |
| 2943 | + " \"Micronesia Federated States of\": \"Micronesia (Federated States of)\",\n", |
| 2944 | + " \"Moldova Republic of\": \"Moldova, Republic of\",\n", |
| 2945 | + " \"Netherlands Antilles\": \"Netherlands\",\n", |
| 2946 | + " \"Palestinian Territory\": \"Palestine, State of\",\n", |
| 2947 | + " \"Reunion\": \"Réunion\",\n", |
| 2948 | + " \"Saint Helena\": \"Saint Helena, Ascension and Tristan da Cunha\",\n", |
| 2949 | + " \"Swaziland\": \"Eswatini\",\n", |
| 2950 | + " \"Taiwan Province of China\": \"Taiwan, Province of China\",\n", |
| 2951 | + " \"Tanzania United Republic of\": \"Tanzania, United Republic of\",\n", |
| 2952 | + " \"United Kingdom\": \"United Kingdom of Great Britain and Northern Ireland\",\n", |
| 2953 | + " \"United States\": \"United States of America\",\n", |
| 2954 | + " \"Venezuela\": \"Venezuela (Bolivarian Republic of)\",\n", |
| 2955 | + " \"Vietnam\": \"Viet Nam\",\n", |
| 2956 | + " \"Virgin Islands British\": \"Virgin Islands (British)\",\n", |
| 2957 | + " \"Virgin Islands U.S.\": \"Virgin Islands (U.S.)\",\n", |
| 2958 | + "}" |
2956 | 2959 | ]
|
2957 | 2960 | },
|
2958 | 2961 | {
|
|
3091 | 3094 | "google_country_data = raw_google_country_data_transpose.copy()\n",
|
3092 | 3095 | "google_country_data.rename(index=rename_dict, inplace=True)\n",
|
3093 | 3096 | "\n",
|
3094 |
| - "country_codes_data.set_index('name', inplace=True)\n", |
3095 |
| - "google_country_data['iso_a3'] = google_country_data.index.map(country_codes_data['alpha-3'])\n", |
3096 |
| - "google_geo_data = google_country_data.dropna(subset=['iso_a3'])\n", |
| 3097 | + "country_codes_data.set_index(\"name\", inplace=True)\n", |
| 3098 | + "google_country_data[\"iso_a3\"] = google_country_data.index.map(\n", |
| 3099 | + " country_codes_data[\"alpha-3\"]\n", |
| 3100 | + ")\n", |
| 3101 | + "google_geo_data = google_country_data.dropna(subset=[\"iso_a3\"])\n", |
3097 | 3102 | "\n",
|
3098 | 3103 | "google_geo_data"
|
3099 | 3104 | ]
|
|
0 commit comments