airports 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 332ef524c4fb151babbb5320022c34a4071b0c1e
4
- data.tar.gz: 32b07c85f58729a7078aea634ae42ddcab86a565
3
+ metadata.gz: 38fb2f0178a12f7f82c84811cac9827259b3abd0
4
+ data.tar.gz: 3cadaeb072f83a7fb32a0d70a62e071827e0d863
5
5
  SHA512:
6
- metadata.gz: 4cf7aab3281b1cc33ae43241f484d000b280b598170f36cd0346fe3e2231d006cd902dbfe2cd2a3a9090e6c439deb84393db137ebe534cb395d9fa332f7cd6ad
7
- data.tar.gz: db4ba4a265f7ebd01c2d15208ed0394d86522fa051ab649a84391b542e98a2d03e00c0f3d56fa0b8eb6f62fd8353ef797ce27817611caf4c9f796d92129a9483
6
+ metadata.gz: abae6605950eddd407f51de0ca95f504051631c64d6593318e56f0a0f8ff2fefb4b7c07dbcc18948421fdb6e1be9ce4c5d847a70f4bac61232493e4a7d0667be
7
+ data.tar.gz: fbd0aaf593d5a6e32d1d8e3da779b5795e61136a3cea3b0a197c4c152710e8b8dad067a9a3b72c29097f994a30ac51f119fe7d02789c7f72beca27ed8dac1f95
data/airports.gemspec CHANGED
@@ -15,6 +15,19 @@ Gem::Specification.new do |spec|
15
15
  spec.license = "MIT"
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+
19
+ gem_dir = File.expand_path(File.dirname(__FILE__)) + "/"
20
+ `git submodule --quiet foreach pwd`.split($\).each do |submodule_path|
21
+ Dir.chdir(submodule_path) do
22
+ submodule_relative_path = submodule_path.sub gem_dir, ""
23
+ # issue git ls-files in submodule's directory and
24
+ # prepend the submodule path to create absolute file paths
25
+ `git ls-files`.split($\).each do |filename|
26
+ spec.files << "#{submodule_relative_path}/#{filename}"
27
+ end
28
+ end
29
+ end
30
+
18
31
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
32
  spec.require_paths = ["lib"]
20
33
 
data/data/README.md ADDED
@@ -0,0 +1,54 @@
1
+ # Airport codes
2
+
3
+ Airport codes and their corresponding data.
4
+
5
+ Transform the data provided by [OpenFlights](http://openflights.org/data.html) into a JSON format so that it can be looked up by IATA airport code.
6
+
7
+ ## Data Format
8
+
9
+ ### Original
10
+
11
+ Fileds in the order of appearance, in the original data source
12
+
13
+ * Airport ID Unique OpenFlights identifier for this airport.
14
+ * Name Name of airport. May or may not contain the City name.
15
+ * City Main city served by airport. May be spelled differently from Name.
16
+ * Country Country or territory where airport is located.
17
+ * IATA/FAA 3-letter FAA code, for airports located in Country "United States of America". 3-letter IATA code, for all other airports. Blank if not assigned.
18
+ * ICAO 4-letter ICAO code. Blank if not assigned.
19
+ * Latitude Decimal degrees, usually to six significant digits. Negative is South, positive is North.
20
+ * Longitude Decimal degrees, usually to six significant digits. Negative is West, positive is East.
21
+ * Altitude In feet.
22
+ * Timezone Hours offset from UTC. Fractional hours are expressed as decimals, eg. India is 5.5.
23
+ * DST Daylight savings time. One of E (Europe), A (US/Canada), S (South America), O (Australia), Z (New Zealand), N (None) or U (Unknown)
24
+
25
+ Sample entries from the database
26
+
27
+ 507,"Heathrow","London","United Kingdom","LHR","EGLL",51.4775,-0.461389,83,0,"E"
28
+ 26,"Kugaaruk","Pelly Bay","Canada","YBB","CYBB",68.534444,-89.808056,56,-6,"A"
29
+ 3127,"Pokhara","Pokhara","Nepal","PKR","VNPK",28.200881,83.982056,2712,5.75,"N"
30
+
31
+ ### Transformed
32
+
33
+ A JSON object with airport data represented as objects with IATA codes as the key. For example `"LHR": {"name": "Heathrow", "city": "London", ...}`
34
+
35
+ Sample entry
36
+
37
+ ```json
38
+ {
39
+ "altitude": "83",
40
+ "city": "London",
41
+ "country": "United Kingdom",
42
+ "dst": "E",
43
+ "iata": "LHR",
44
+ "icao": "EGLL",
45
+ "latitude": "51.4775",
46
+ "longitude": "-0.461389",
47
+ "name": "Heathrow",
48
+ "timezone": "0"
49
+ }
50
+ ```
51
+
52
+ # Credits
53
+
54
+ Big thanks to [OpenFlights](http://openflights.org) for collecting and making this data available. Check out their website for additional data about airlines, routes etc.