{"id":37667650,"url":"https://github.com/albertov5/tec-data-06-apis","last_synced_at":"2026-01-16T12:00:31.675Z","repository":{"id":50732037,"uuid":"519977100","full_name":"AlbertoV5/tec-data-06-apis","owner":"AlbertoV5","description":"Data Analytics Bootcamp","archived":false,"fork":false,"pushed_at":"2022-08-12T03:12:22.000Z","size":3131,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-03-04T18:11:46.124Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlbertoV5.png","metadata":{"files":{"readme":"readme.html","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-01T05:36:24.000Z","updated_at":"2022-08-01T06:17:47.000Z","dependencies_parsed_at":"2022-09-10T17:52:11.233Z","dependency_job_id":null,"html_url":"https://github.com/AlbertoV5/tec-data-06-apis","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/AlbertoV5/tec-data-06-apis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlbertoV5%2Ftec-data-06-apis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlbertoV5%2Ftec-data-06-apis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlbertoV5%2Ftec-data-06-apis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlbertoV5%2Ftec-data-06-apis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlbertoV5","download_url":"https://codeload.github.com/AlbertoV5/tec-data-06-apis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlbertoV5%2Ftec-data-06-apis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478397,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-16T12:00:21.823Z","updated_at":"2026-01-16T12:00:31.502Z","avatar_url":"https://github.com/AlbertoV5.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003c!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"\u003e\n\u003chtml xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\" xml:lang=\"en\"\u003e\n\u003chead\u003e\n\u003c!-- 2022-08-11 Thu 22:10 --\u003e\n\u003cmeta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" /\u003e\n\u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\" /\u003e\n\u003ctitle\u003eChallenge\u003c/title\u003e\n\u003cmeta name=\"author\" content=\"Alberto Valdez\" /\u003e\n\u003cmeta name=\"generator\" content=\"Org Mode\" /\u003e\n\u003clink rel=\"stylesheet\" type=\"text/css\" href=\"https://albertov5.github.io/org-html-themes/src/readtheorg_theme/css/htmlize.css\"/\u003e\n\u003clink rel=\"stylesheet\" type=\"text/css\" href=\"https://albertov5.github.io/org-html-themes/src/readtheorg_theme/css/readtheorg.css\"/\u003e\n\u003cscript src=\"https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"https://albertov5.github.io/org-html-themes/src/lib/js/jquery.stickytableheaders.min.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"https://albertov5.github.io/org-html-themes/src/readtheorg_theme/js/readtheorg.js\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\u003cdiv id=\"content\" class=\"content\"\u003e\n\u003ch1 class=\"title\"\u003eChallenge\u003c/h1\u003e\n\u003cdiv id=\"table-of-contents\" role=\"doc-toc\"\u003e\n\u003ch2\u003eTable of Contents\u003c/h2\u003e\n\u003cdiv id=\"text-table-of-contents\" role=\"doc-toc\"\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"#orgf275f33\"\u003eTraveling the World with APIs\u003c/a\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"#org4d47082\"\u003eObjective\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#org4801fcf\"\u003eResults\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#org2e0bd4c\"\u003eSummary\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#org127a22d\"\u003eConclusion\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\n\n\u003cdiv id=\"outline-container-orgf275f33\" class=\"outline-2\"\u003e\n\u003ch2 id=\"orgf275f33\"\u003eTraveling the World with APIs\u003c/h2\u003e\n\u003cdiv class=\"outline-text-2\" id=\"text-orgf275f33\"\u003e\n\u003c/div\u003e\n\u003cdiv id=\"outline-container-org4d47082\" class=\"outline-3\"\u003e\n\u003ch3 id=\"org4d47082\"\u003eObjective\u003c/h3\u003e\n\u003cdiv class=\"outline-text-3\" id=\"text-org4d47082\"\u003e\n\u003cp\u003e\nIn this project we had the task to find a good vacation itinerary without any idea or preferences for destinations. It was a sort of \u0026ldquo;spin the globe and we go where it stops\u0026rdquo;, except that we had the power of Python and APIs on our side.\n\u003c/p\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\n\n\u003cdiv id=\"outline-container-org4801fcf\" class=\"outline-3\"\u003e\n\u003ch3 id=\"org4801fcf\"\u003eResults\u003c/h3\u003e\n\u003cdiv class=\"outline-text-3\" id=\"text-org4801fcf\"\u003e\n\u003cp\u003e\nOur final result is an itinerary around Portugal with all the Weather and coordinates data.\n\u003c/p\u003e\n\n\n\u003cdiv id=\"org8527138\" class=\"figure\"\u003e\n\u003cp\u003e\u003cimg src=\"./Vacation_Itinerary/WheaterPy_travel_map.png\" alt=\"WheaterPy_travel_map.png\" width=\"600px\" /\u003e\n\u003c/p\u003e\n\u003c/div\u003e\n\n\u003cp\u003e\nWe manually chose out locations once we were able to have a better view of the whole map and the Hotels available.\n\u003c/p\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\n\u003cdiv id=\"outline-container-org2e0bd4c\" class=\"outline-3\"\u003e\n\u003ch3 id=\"org2e0bd4c\"\u003eSummary\u003c/h3\u003e\n\u003cdiv class=\"outline-text-3\" id=\"text-org2e0bd4c\"\u003e\n\u003cp\u003e\nThe steps were the following:\n\u003c/p\u003e\n\n\u003col class=\"org-ol\"\u003e\n\u003cli\u003eSpin the globe, so to speak, and generate 2000 random locations using longitude and latitude.\u003c/li\u003e\n\u003cli\u003eLocalize the closest city to each of those coordinates and ask OpenWeather at \u003ca href=\"https://openweathermap.org/api\"\u003ehttps://openweathermap.org/api\u003c/a\u003e for the current weather and overall description, then filter results to fit our desired temperature ranges.\u003c/li\u003e\n\u003cli\u003eUse the Google API to find the nearest hotel to each city\u0026rsquo;s coordinates according to our requirements, then visualize the possible locations in a map.\u003c/li\u003e\n\u003cli\u003eFinally map out an itinerary and a route by finding four cities that are close to each other.\u003c/li\u003e\n\u003c/ol\u003e\n\n\u003cp\u003e\nThis is an example of chosing the cities manually.\n\u003c/p\u003e\n\n\u003cdiv class=\"org-src-container\"\u003e\n\u003cpre class=\"src src-python\"\u003e\u003cspan style=\"color: #339CDB;\"\u003eimport\u003c/span\u003e pandas \u003cspan style=\"color: #339CDB;\"\u003eas\u003c/span\u003e pd\n\n\u003cspan style=\"color: #d4d4d4;\"\u003evacation_df\u003c/span\u003e = pd.read_csv(\u003cspan style=\"color: #c5937c;\"\u003e\"Vacation_Search/WeatherPy_vacation.csv\"\u003c/span\u003e)\n\n\u003cspan style=\"color: #d4d4d4;\"\u003evacation_start\u003c/span\u003e = vacation_df.loc[vacation_df[\u003cspan style=\"color: #c5937c;\"\u003e\"City\"\u003c/span\u003e] == \u003cspan style=\"color: #c5937c;\"\u003e\"Santo Tirso\"\u003c/span\u003e]\nvacation_end = vacation_df.loc[vacation_df[\u003cspan style=\"color: #c5937c;\"\u003e\"City\"\u003c/span\u003e] == \u003cspan style=\"color: #c5937c;\"\u003e\"Santo Tirso\"\u003c/span\u003e]\nvacation_stop1 = vacation_df.loc[vacation_df[\u003cspan style=\"color: #c5937c;\"\u003e\"City\"\u003c/span\u003e] == \u003cspan style=\"color: #c5937c;\"\u003e\"Villaviciosa\"\u003c/span\u003e]\nvacation_stop2 = vacation_df.loc[vacation_df[\u003cspan style=\"color: #c5937c;\"\u003e\"City\"\u003c/span\u003e] == \u003cspan style=\"color: #c5937c;\"\u003e\"Muros\"\u003c/span\u003e]\nvacation_stop3 = vacation_df.loc[vacation_df[\u003cspan style=\"color: #c5937c;\"\u003e\"City\"\u003c/span\u003e] == \u003cspan style=\"color: #c5937c;\"\u003e\"Carballo\"\u003c/span\u003e]\nstart = vacation_start.to_numpy()[\u003cspan style=\"color: #B5CEA8; font-weight: bold;\"\u003e0\u003c/span\u003e][\u003cspan style=\"color: #B5CEA8; font-weight: bold;\"\u003e5\u003c/span\u003e:\u003cspan style=\"color: #B5CEA8; font-weight: bold;\"\u003e7\u003c/span\u003e]\nend = vacation_end.to_numpy()[\u003cspan style=\"color: #B5CEA8; font-weight: bold;\"\u003e0\u003c/span\u003e][\u003cspan style=\"color: #B5CEA8; font-weight: bold;\"\u003e5\u003c/span\u003e:\u003cspan style=\"color: #B5CEA8; font-weight: bold;\"\u003e7\u003c/span\u003e]\nstop1 = vacation_stop1.to_numpy()[\u003cspan style=\"color: #B5CEA8; font-weight: bold;\"\u003e0\u003c/span\u003e][\u003cspan style=\"color: #B5CEA8; font-weight: bold;\"\u003e5\u003c/span\u003e:\u003cspan style=\"color: #B5CEA8; font-weight: bold;\"\u003e7\u003c/span\u003e]\nstop2 = vacation_stop2.to_numpy()[\u003cspan style=\"color: #B5CEA8; font-weight: bold;\"\u003e0\u003c/span\u003e][\u003cspan style=\"color: #B5CEA8; font-weight: bold;\"\u003e5\u003c/span\u003e:\u003cspan style=\"color: #B5CEA8; font-weight: bold;\"\u003e7\u003c/span\u003e]\nstop3 = vacation_stop3.to_numpy()[\u003cspan style=\"color: #B5CEA8; font-weight: bold;\"\u003e0\u003c/span\u003e][\u003cspan style=\"color: #B5CEA8; font-weight: bold;\"\u003e5\u003c/span\u003e:\u003cspan style=\"color: #B5CEA8; font-weight: bold;\"\u003e7\u003c/span\u003e]\n\u003cspan style=\"color: #C586C0;\"\u003eprint\u003c/span\u003e(vacation_start[\u003cspan style=\"color: #c5937c;\"\u003e\"Hotel Name\"\u003c/span\u003e].\u003cspan style=\"color: #C586C0;\"\u003estr\u003c/span\u003e.replace(\u003cspan style=\"color: #c5937c;\"\u003e\"Santo Tirso\"\u003c/span\u003e, \u003cspan style=\"color: #c5937c;\"\u003e\"\"\u003c/span\u003e))\n\n\u003c/pre\u003e\n\u003c/div\u003e\n\n\u003cdiv class=\"org-src-container\"\u003e\n\u003cpre class=\"src src-org\"\u003e9    Cidnay  - Charming Hotel \u0026amp; Executive Center\nName: Hotel Name, dtype: object\n\u003c/pre\u003e\n\u003c/div\u003e\n\n\u003cp\u003e\nOur vacation starts and ends in \u003ccode\u003eSanto Tirso\u003c/code\u003e at the \u003ccode\u003eCidnay Hotal \u0026amp; Executive Center\u003c/code\u003e. And we have a few stops in between.\n\u003c/p\u003e\n\n\u003cp\u003e\nThere were other options we were interested in but we ended up chosing Portugal as it had many cities that matched our requirements.\n\u003c/p\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\n\n\u003cdiv id=\"outline-container-org127a22d\" class=\"outline-3\"\u003e\n\u003ch3 id=\"org127a22d\"\u003eConclusion\u003c/h3\u003e\n\u003cdiv class=\"outline-text-3\" id=\"text-org127a22d\"\u003e\n\u003cp\u003e\nIt is really easy to request data from companies that provide an API for it, specially using Python libraries. Making thousands of requests takes a while so we must be careful in creating good and performant code so that all possible bottlenecks happen in the connection to the server and not in our program.\n\u003c/p\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv id=\"postamble\" class=\"status\"\u003e\n\u003cp class=\"author\"\u003eAuthor: Alberto Valdez\u003c/p\u003e\n\u003cp class=\"date\"\u003eCreated: 2022-08-11 Thu 22:10\u003c/p\u003e\n\u003c/div\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbertov5%2Ftec-data-06-apis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falbertov5%2Ftec-data-06-apis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbertov5%2Ftec-data-06-apis/lists"}