|
137 | 137 | " # construct full file path\n", |
138 | 138 | " old_name = os.path.join(data_folder, air_data)\n", |
139 | 139 | "\n", |
140 | | - " # Changing the extension from dat to csv\n", |
| 140 | + " # Changing the extension from .dat to .csv\n", |
141 | 141 | " new_name = old_name.replace('.dat', '.csv')\n", |
142 | 142 | " os.rename(old_name, new_name)\n", |
143 | 143 | "\n", |
|
169 | 169 | "airport_list = pd.read_csv('data/airports.csv',\n", |
170 | 170 | "delimiter=',',names=['airport_id', 'airport_name', 'city', 'country',\n", |
171 | 171 | "'iata_c', 'icao_c','lat', 'long', 'altitude', 'time_z', 'dst', 'tz_data', 'air_type', 'source'])\n", |
172 | | - "# Headers are not included in the CSV, so they are instead based on those in the\n", |
173 | | - "# dictionary here:\n", |
174 | | - "# https://www.partow.net/miscellaneous/airportdatabase/index.html )\n", |
| 172 | + "# Headers are based on openflights.org data headers.\n", |
| 173 | + "# https://openflights.org/data\n", |
175 | 174 | "airport_list" |
176 | 175 | ], |
177 | 176 | "metadata": { |
|
741 | 740 | "route = pd.read_csv('data/routes.csv',\n", |
742 | 741 | "delimiter=',',names=['airline', 'airline_id', 's_airport', 's_airport_id',\n", |
743 | 742 | "'d_airport', 'd_airport_id','code_s', 'flight_stops', 'equip'])\n", |
744 | | - "# Headers are not included in the CSV, so they are instead based on those in the\n", |
745 | | - "# dictionary here:\n", |
746 | | - "# https://www.partow.net/miscellaneous/airportdatabase/index.html )\n", |
| 743 | + "# Headers are based on openflights.org data headers.\n", |
| 744 | + "# https://openflights.org/data\n", |
747 | 745 | "route" |
748 | 746 | ], |
749 | 747 | "metadata": { |
|
1239 | 1237 | "source": [ |
1240 | 1238 | "country = pd.read_csv('data/countries.csv',\n", |
1241 | 1239 | "delimiter=',',names=['c_name', 'iso_c', 'dafif_c'])\n", |
1242 | | - "# Headers are not included in the CSV, so they are instead based on those in the\n", |
1243 | | - "# dictionary here:\n", |
1244 | | - "# https://www.partow.net/miscellaneous/airportdatabase/index.html )\n", |
| 1240 | + "# Headers are based on openflights.org data headers.\n", |
| 1241 | + "# https://openflights.org/data\n", |
1245 | 1242 | "country" |
1246 | 1243 | ], |
1247 | 1244 | "metadata": { |
|
1653 | 1650 | "airline = pd.read_csv('data/airlines.csv',\n", |
1654 | 1651 | "delimiter=',',names=['airline_id', 'airline', 'alias', 'iata_c',\n", |
1655 | 1652 | "'icao_c', 'callsign','c_name', 'active'])\n", |
1656 | | - "# Headers are not included in the CSV, so they are instead based on those in the\n", |
1657 | | - "# dictionary here:\n", |
1658 | | - "# https://www.partow.net/miscellaneous/airportdatabase/index.html )\n", |
| 1653 | + "# Headers are based on openflights.org data headers.\n", |
| 1654 | + "# https://openflights.org/data\n", |
1659 | 1655 | "airline" |
1660 | 1656 | ], |
1661 | 1657 | "metadata": { |
|
2139 | 2135 | "source": [ |
2140 | 2136 | "plane = pd.read_csv('data/planes.csv',\n", |
2141 | 2137 | "delimiter=',',names=['p_name', 'iata_c', 'icao_c'])\n", |
2142 | | - "# Headers are not included in the CSV, so they are instead based on those in the\n", |
2143 | | - "# dictionary here:\n", |
2144 | | - "# https://www.partow.net/miscellaneous/airportdatabase/index.html )\n", |
| 2138 | + "# Headers are based on openflights.org data headers.\n", |
| 2139 | + "# https://openflights.org/data\n", |
2145 | 2140 | "plane" |
2146 | 2141 | ], |
2147 | 2142 | "metadata": { |
|
0 commit comments