|
187 | 187 | ], |
188 | 188 | "source": [ |
189 | 189 | "# Load dataset for inbound UN arrivals arrivals tourist in the world\n", |
190 | | - "df = pd.read_excel (\"UN_Tourism_inbound_arrivals_10_2025.xlsx\")\n", |
| 190 | + "df = pd.read_excel(\"UN_Tourism_inbound_arrivals_10_2025.xlsx\")\n", |
191 | 191 | "df.head()\n", |
192 | 192 | "# Load dataset for inbound UN arrivals arrivals tourist by purpose in the world\n", |
193 | 193 | "df_purpose = pd.read_excel(\"UN_Tourism_inbound_arrivals_by_purpose_10_2025.xlsx\")\n", |
194 | 194 | "df_purpose.head()\n", |
195 | 195 | "# Load dataset for inbound UN arrivals arrivals tourist by transport in the world\n", |
196 | | - "df_transport = pd.read_excel (\"UN_Tourism_inbound_arrivals_by_transport_10_2025.xlsx\")\n", |
| 196 | + "df_transport = pd.read_excel(\"UN_Tourism_inbound_arrivals_by_transport_10_2025.xlsx\")\n", |
197 | 197 | "df_transport.head()\n", |
198 | 198 | "# Load dataset for inbound expenditure by tourists in the world\n", |
199 | 199 | "df_expenditure = pd.read_excel(\"UN_Tourism_inbound_expenditure_10_2025.xlsx\")\n", |
|
386 | 386 | "df_haiti_by_transport = df_transport[(df_transport[\"reporter_area_label\"] == \"Haiti\")]\n", |
387 | 387 | "df_haiti_by_transport.head()\n", |
388 | 388 | "# Load the inbound expenditure by tourists in the world dataset to extract data only for Haiti\n", |
389 | | - "df_haiti_by_expenditure = df_expenditure[(df_expenditure[\"reporter_area_label\"] == \"Haiti\")]\n", |
| 389 | + "df_haiti_by_expenditure = df_expenditure[\n", |
| 390 | + " (df_expenditure[\"reporter_area_label\"] == \"Haiti\")\n", |
| 391 | + "]\n", |
390 | 392 | "df_haiti_by_expenditure.head()" |
391 | 393 | ] |
392 | 394 | }, |
|
398 | 400 | "outputs": [], |
399 | 401 | "source": [ |
400 | 402 | "# save the df_haiti in a csv file\n", |
401 | | - "df_haiti.to_csv (\"UN_tourism_inbound_Arrivals_haiti.csv\",index = False)\n", |
| 403 | + "df_haiti.to_csv(\"UN_tourism_inbound_Arrivals_haiti.csv\", index=False)\n", |
402 | 404 | "# save the df_haiti_by_purpose in a csv file\n", |
403 | | - "df_haiti_by_purpose.to_csv(\"UN_tourism_inbound_Arrivals_haiti_by_purpose.csv\", index= False)\n", |
| 405 | + "df_haiti_by_purpose.to_csv(\n", |
| 406 | + " \"UN_tourism_inbound_Arrivals_haiti_by_purpose.csv\", index=False\n", |
| 407 | + ")\n", |
404 | 408 | "# save the df_haiti_by_transport in a csv file\n", |
405 | | - "df_haiti_by_transport.to_csv(\"UN_tourism_inbound_Arrivals_haiti_by_transport.csv\", index= False)\n", |
| 409 | + "df_haiti_by_transport.to_csv(\n", |
| 410 | + " \"UN_tourism_inbound_Arrivals_haiti_by_transport.csv\", index=False\n", |
| 411 | + ")\n", |
406 | 412 | "# save the df_haiti_by_expenditure in a csv file\n", |
407 | | - "df_haiti_by_expenditure.to_csv(\"UN_tourism_inbound_Arrivals_haiti_by_expenditure.csv\", index= False)" |
| 413 | + "df_haiti_by_expenditure.to_csv(\n", |
| 414 | + " \"UN_tourism_inbound_Arrivals_haiti_by_expenditure.csv\", index=False\n", |
| 415 | + ")" |
408 | 416 | ] |
409 | 417 | }, |
410 | 418 | { |
|
612 | 620 | ], |
613 | 621 | "source": [ |
614 | 622 | "# df[\"reporter_area_label\"].unique()\n", |
615 | | - "#df_haiti_by_purpose[\"year\"].unique()\n", |
616 | | - "#df_haiti_by_purpose.isnull().sum()\n", |
617 | | - "#df_haiti_by_transport.isnull().sum()\n", |
618 | | - "#df_haiti_by_expenditure.isnull().sum()\n", |
| 623 | + "# df_haiti_by_purpose[\"year\"].unique()\n", |
| 624 | + "# df_haiti_by_purpose.isnull().sum()\n", |
| 625 | + "# df_haiti_by_transport.isnull().sum()\n", |
| 626 | + "# df_haiti_by_expenditure.isnull().sum()\n", |
619 | 627 | "df_haiti_by_expenditure[\"year\"].unique()" |
620 | 628 | ] |
621 | 629 | }, |
|
628 | 636 | "source": [ |
629 | 637 | "# create a array with the names the caribbean country to extract data for the caribbean region\n", |
630 | 638 | "caribbean_countries = [\n", |
631 | | - " \"Antigua and Barbuda\", \"Bahamas\", \"Barbados\", \"Belize\",\n", |
632 | | - " \"Cuba\", \"Dominica\", \"Dominican Republic\", \"Grenada\",\n", |
633 | | - " \"Jamaica\", \"Saint Kitts and Nevis\",\"Saint Lucia\",\"Haiti\",\n", |
634 | | - " \"Saint Vincent and the Grenadines\", \"Trinidad and Tobago\",\n", |
635 | | - " \"Anguilla\", \"Bermuda\", \"British Virgin Islands\", \"Cayman Islands\",\n", |
636 | | - " \"Montserrat\", \"Turks and Caicos Islands\", \"Guadeloupe\", \"Martinique\",\n", |
637 | | - " \"Aruba\", \"Curaçao\", \"Sint Maarten (Dutch part)\", \"Bonaire\",\n", |
638 | | - " \"Saba\", \"St. Eustatius\", \"Puerto Rico\", \"United States Virgin Islands\"\n", |
639 | | - "]\n" |
| 639 | + " \"Antigua and Barbuda\",\n", |
| 640 | + " \"Bahamas\",\n", |
| 641 | + " \"Barbados\",\n", |
| 642 | + " \"Belize\",\n", |
| 643 | + " \"Cuba\",\n", |
| 644 | + " \"Dominica\",\n", |
| 645 | + " \"Dominican Republic\",\n", |
| 646 | + " \"Grenada\",\n", |
| 647 | + " \"Jamaica\",\n", |
| 648 | + " \"Saint Kitts and Nevis\",\n", |
| 649 | + " \"Saint Lucia\",\n", |
| 650 | + " \"Haiti\",\n", |
| 651 | + " \"Saint Vincent and the Grenadines\",\n", |
| 652 | + " \"Trinidad and Tobago\",\n", |
| 653 | + " \"Anguilla\",\n", |
| 654 | + " \"Bermuda\",\n", |
| 655 | + " \"British Virgin Islands\",\n", |
| 656 | + " \"Cayman Islands\",\n", |
| 657 | + " \"Montserrat\",\n", |
| 658 | + " \"Turks and Caicos Islands\",\n", |
| 659 | + " \"Guadeloupe\",\n", |
| 660 | + " \"Martinique\",\n", |
| 661 | + " \"Aruba\",\n", |
| 662 | + " \"Curaçao\",\n", |
| 663 | + " \"Sint Maarten (Dutch part)\",\n", |
| 664 | + " \"Bonaire\",\n", |
| 665 | + " \"Saba\",\n", |
| 666 | + " \"St. Eustatius\",\n", |
| 667 | + " \"Puerto Rico\",\n", |
| 668 | + " \"United States Virgin Islands\",\n", |
| 669 | + "]" |
640 | 670 | ] |
641 | 671 | }, |
642 | 672 | { |
|
646 | 676 | "metadata": {}, |
647 | 677 | "outputs": [], |
648 | 678 | "source": [ |
649 | | - "# filter the dataset to keep data only for the caribbean region \n", |
| 679 | + "# filter the dataset to keep data only for the caribbean region\n", |
650 | 680 | "df_caribbean = df[df[\"reporter_area_label\"].isin(caribbean_countries)]" |
651 | 681 | ] |
652 | 682 | }, |
|
0 commit comments