meteofrance-api 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: a96c9b4dbcb764e45dc7fce12a2f489fe6b4dacf5330b9b99f8591f4b22f6d69
4
+ data.tar.gz: f93e722e8d8ae1b254b7d5efc810c13750b0a28f24e8687048e4a7b663c33d54
5
+ SHA512:
6
+ metadata.gz: '08f85b1b61e3621db2eb3291d87b20db96f83952a64785b449244565e132ddab79d2a8807e291f6e0bc554dcf1d6dbf5122aae6a8a34153a08ee347de96a498b'
7
+ data.tar.gz: 34a511d89e9876b9f95c315043b5e3070df516004bac4f420f0aff7341eccaab914176df2b9a5b424e4f3f5db4068259f4b1c3e08f4042c1ca95520563b6e36d
data/.gitignore ADDED
@@ -0,0 +1,56 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /spec/examples.txt
9
+ /test/tmp/
10
+ /test/version_tmp/
11
+ /tmp/
12
+
13
+ # Used by dotenv library to load environment variables.
14
+ # .env
15
+
16
+ # Ignore Byebug command history file.
17
+ .byebug_history
18
+
19
+ ## Specific to RubyMotion:
20
+ .dat*
21
+ .repl_history
22
+ build/
23
+ *.bridgesupport
24
+ build-iPhoneOS/
25
+ build-iPhoneSimulator/
26
+
27
+ ## Specific to RubyMotion (use of CocoaPods):
28
+ #
29
+ # We recommend against adding the Pods directory to your .gitignore. However
30
+ # you should judge for yourself, the pros and cons are mentioned at:
31
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
32
+ #
33
+ # vendor/Pods/
34
+
35
+ ## Documentation cache and generated files:
36
+ /.yardoc/
37
+ /_yardoc/
38
+ /doc/
39
+ /rdoc/
40
+
41
+ ## Environment normalization:
42
+ /.bundle/
43
+ /vendor/bundle
44
+ /lib/bundler/man/
45
+
46
+ # for a library or gem, you might want to ignore these files since the code is
47
+ # intended to run in multiple environments; otherwise, check them in:
48
+ # Gemfile.lock
49
+ # .ruby-version
50
+ # .ruby-gemset
51
+
52
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
53
+ .rvmrc
54
+
55
+ # Used by RuboCop. Remote config files pulled in from inherit_from directive.
56
+ # .rubocop-https?--*
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ cache: bundler
5
+ rvm:
6
+ - 2.6.6
7
+ before_install: gem install bundler -v 1.17.2
data/CHANGELOG.md ADDED
File without changes
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at thomaskuntz67@gmail.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in meteofrance-api.gemspec
6
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,28 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ meteofrance-api (0.1.0)
5
+ faraday (~> 2.3.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ faraday (2.3.0)
11
+ faraday-net_http (~> 2.0)
12
+ ruby2_keywords (>= 0.0.4)
13
+ faraday-net_http (2.0.3)
14
+ minitest (5.15.0)
15
+ rake (10.5.0)
16
+ ruby2_keywords (0.0.5)
17
+
18
+ PLATFORMS
19
+ ruby
20
+
21
+ DEPENDENCIES
22
+ bundler (~> 1.17)
23
+ meteofrance-api!
24
+ minitest (~> 5.0)
25
+ rake (~> 10.0)
26
+
27
+ BUNDLED WITH
28
+ 1.17.2
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 Thomas Kuntz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # Meteofrance::Api
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/meteofrance_api`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'meteofrance-api'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install meteofrance-api
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/meteofrance-api. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
+
37
+ ## License
38
+
39
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
40
+
41
+ ## Code of Conduct
42
+
43
+ Everyone interacting in the Meteofrance::Api project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/meteofrance-api/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
+
4
+ Rake::TestTask.new(:test) do |t|
5
+ t.libs << "test"
6
+ t.libs << "lib"
7
+ t.test_files = FileList["test/**/*_test.rb"]
8
+ end
9
+
10
+ task :default => :test
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "meteofrance/api"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,275 @@
1
+ require "faraday"
2
+
3
+ require "meteofrance_api/constants.rb"
4
+ require "meteofrance_api/models"
5
+
6
+ class MeteofranceApi::Client
7
+ def initialize(token = MeteofranceApi::Constants::API_TOKENS.first)
8
+ @token = token
9
+ end
10
+
11
+ def connection
12
+ @conn ||= Faraday.new(
13
+ url: MeteofranceApi::Constants::API_URL,
14
+ params: {token: @token },
15
+ )
16
+ end
17
+
18
+
19
+ # Search the places (cities) linked to a query by name.
20
+
21
+ # You can add GPS coordinates in parameter to search places arround a given
22
+ # location.
23
+
24
+ # Args:
25
+ # search_query: A complete name, only a part of a name or a postal code (for
26
+ # France only) corresponding to a city in the world.
27
+ # latitude: Optional; Latitude in degree of a reference point to order
28
+ # results. The nearest places first.
29
+ # longitude: Optional; Longitude in degree of a reference point to order
30
+ # results. The nearest places first.
31
+
32
+ # Returns:
33
+ # A list of places (Place instance) corresponding to the query.
34
+ def search_places(
35
+ search_query,
36
+ latitude: nil,
37
+ longitude: nil
38
+ )
39
+ # Construct the list of the GET parameters
40
+ params = {"q": search_query}
41
+ if !!latitude
42
+ params["lat"] = latitude
43
+ end
44
+ if !!longitude
45
+ params["lon"] = longitude
46
+ end
47
+
48
+ # Send the API resuest
49
+ resp = connection.get("/v2/places", params)
50
+ data = JSON.parse(resp.body)
51
+
52
+ places = data.map {|datum| MeteofranceApi::Place.new(datum)}
53
+
54
+ places
55
+ end
56
+
57
+ # Retrieve the weather forecast for a given GPS location.
58
+ #
59
+ # Results can be fetched in french or english according to the language parameter.
60
+ #
61
+ # Args:
62
+ # latitude: Latitude in degree of the GPS point corresponding to the weather
63
+ # forecast.
64
+ # longitude: Longitude in degree of the GPS point corresponding to the weather
65
+ # forecast.
66
+ # language: Optional; If language is equal "fr" (default value) results will
67
+ # be in French. All other value will give results in English.
68
+ #
69
+ # Returns:
70
+ # A Forecast intance representing the hourly and daily weather forecast.
71
+ #
72
+ def get_forecast(
73
+ latitude,
74
+ longitude,
75
+ language = nil
76
+ )
77
+ language ||= "fr"
78
+
79
+ # Send the API request
80
+ resp = connection.get("/v2/forecast", {
81
+ lat: latitude,
82
+ lon: longitude,
83
+ lang: language
84
+ })
85
+
86
+
87
+ return MeteofranceApi::Forecast.new(JSON.parse(resp.body))
88
+ end
89
+
90
+ # Retrieve the weather forecast for a given Place instance.
91
+ #
92
+ # Results can be fetched in french or english according to the language parameter.
93
+
94
+ # Args:
95
+ # place: Place class instance corresponding to a location.
96
+ # language: Optional; If language is equal "fr" (default value) results will
97
+ # be in French. All other value will give results in English.
98
+ #
99
+ # Returns:
100
+ # A Forecast intance representing the hourly and daily weather forecast.
101
+ #
102
+ def get_forecast_for_place(
103
+ place,
104
+ language = nil
105
+ )
106
+ language ||= "fr"
107
+
108
+ return get_forecast(place.latitude, place.longitude, language)
109
+ end
110
+
111
+ # Retrieve the next 1 hour rain forecast for a given GPS the location.
112
+ #
113
+ # Results can be fetched in french or english according to the language parameter.
114
+ #
115
+ # Args:
116
+ # latitude: Latitude in degree of the GPS point corresponding to the rain
117
+ # forecast.
118
+ # longitude: Longitude in degree of the GPS point corresponding to the rain
119
+ # forecast.
120
+ # language: Optional; If language is equal "fr" (default value) results will
121
+ # be in French. All other value will give results in English.
122
+ #
123
+ # Returns:
124
+ # A Rain instance representing the next hour rain forecast.
125
+ #
126
+ def get_rain(latitude, longitude, language = nil)
127
+ # TODO: add protection if no rain forecast for this position
128
+
129
+ language ||= "fr"
130
+
131
+ # Send the API request
132
+ resp = connection.get("/v2/rain", {
133
+ lat: latitude,
134
+ lon: longitude,
135
+ lang: language
136
+ })
137
+
138
+ return MeteofranceApi::Rain.new(JSON.parse(resp.body))
139
+ end
140
+
141
+ # Return the current weather phenomenons (or alerts) for a given domain.
142
+ #
143
+ # Args:
144
+ # domain: could be `france` or any metropolitan France department numbers on
145
+ # two digits. For some departments you can access an additional bulletin
146
+ # for coastal phenomenons. To access it add `10` after the domain id
147
+ # (example: `1310`).
148
+ # depth: Optional; To be used with domain = 'france'. With depth = 0 the
149
+ # results will show only natinal sum up of the weather alerts. If
150
+ # depth = 1, you will have in addition, the bulletin for all metropolitan
151
+ # France department and Andorre
152
+ # with_costal_bulletin: Optional; If set to True (default is False), you can
153
+ # get the basic bulletin and coastal bulletin merged.
154
+ #
155
+ # Returns:
156
+ # A warning.CurrentPhenomenons instance representing the weather alert
157
+ # bulletin.
158
+ #
159
+ def get_warning_current_phenomenons(domain, depth = 0, with_costal_bulletin = false)
160
+ # Send the API request
161
+ resp = connection.get("/v2/warning/currentphenomenons", {
162
+ domain: domain,
163
+ depth: depth
164
+ })
165
+
166
+ # Create object with API response
167
+ phenomenons = MeteofranceApi::Warning::Current.new(JSON.parse(resp.body))
168
+
169
+
170
+ # if user ask to have the coastal bulletin merged
171
+ if with_costal_bulletin
172
+ if MeteofranceApi::Constants::COASTAL_DEPARTMENTS.include?(domain)
173
+ resp = connection.get("/v2/warning/currentphenomenons", {
174
+ domain: domain + "10",
175
+ })
176
+ coastal_phenomenons = MeteofranceApi::Warning::Current.new(JSON.parse(resp.body))
177
+
178
+ phenomenons.merge_with_coastal_phenomenons!(coastal_phenomenons)
179
+ end
180
+ end
181
+
182
+ return phenomenons
183
+ end
184
+
185
+ # Retrieve a complete bulletin of the weather phenomenons for a given domain.
186
+ #
187
+ # For a given domain we can access the maximum alert, a timelaps of the alert
188
+ # evolution for the next 24 hours, a list of alerts and other metadatas.
189
+ #
190
+ # Args:
191
+ # domain: could be `france` or any metropolitan France department numbers on
192
+ # two digits. For some departments you can access an additional bulletin
193
+ # for coastal phenomenons. To access it add `10` after the domain id
194
+ # (example: `1310`).
195
+ # with_costal_bulletin: Optional; If set to True (default is False), you can
196
+ # get the basic bulletin and coastal bulletin merged.
197
+ #
198
+ # Returns:
199
+ # A warning.Full instance representing the complete weather alert bulletin.
200
+ #
201
+ def get_warning_full(domain, with_costal_bulletin = false)
202
+ # TODO: add formatDate parameter
203
+
204
+ # Send the API request
205
+ resp = connection.get("/v2/warning/full", {
206
+ domain: domain,
207
+ })
208
+
209
+ # Create object with API response
210
+ full_phenomenons = MeteofranceApi::Warning::Full.new(JSON.parse(resp.body))
211
+
212
+ # if user ask to have the coastal bulletin merged
213
+ if with_costal_bulletin
214
+ if MeteofranceApi::Constants::COASTAL_DEPARTMENTS.include?(domain)
215
+ resp = connection.get("/v2/warning/full", {
216
+ domain: domain + 10,
217
+ })
218
+ coastal_full_phenomenons = MeteofranceApi::Warning::Full.new(JSON.parse(resp.body))
219
+
220
+ full_phenomenons.merge_with_coastal_phenomenons!(coastal_full_phenomenons)
221
+ end
222
+ end
223
+
224
+ return full_phenomenons
225
+ end
226
+
227
+ # Retrieve the thumbnail URL of the weather phenomenons or alerts map.
228
+ #
229
+ # Args:
230
+ # domain: could be `france` or any metropolitan France department numbers on
231
+ # two digits.
232
+ #
233
+ # Returns:
234
+ # The URL of the thumbnail representing the weather alert status.
235
+ #
236
+ def get_warning_thumbnail(domain = "france")
237
+ # Return directly the URL of the gif image
238
+ [
239
+ "#{MeteofranceApi::Constants::API_URL}/warning/thumbnail",
240
+ "?",
241
+ URI.encode_www_form({ domain: domain, token: @token }),
242
+ ].join
243
+ end
244
+
245
+ #
246
+ # Retrieve the picture of the day image URL & description.
247
+ #
248
+ # Args:
249
+ # domain: could be `france`
250
+ #
251
+ # Returns:
252
+ # An array of 2 objects: the image url, and the description
253
+ #
254
+ def get_picture_of_the_day(domain = "france")
255
+ params = {
256
+ domain: domain,
257
+ report_type: "observation",
258
+ report_subtype: "image du jour",
259
+ }
260
+
261
+ resp = connection.get(
262
+ "/v2/report",
263
+ params.merge(format: "txt")
264
+ )
265
+ image_description = resp.body
266
+
267
+ image_url = [
268
+ "#{MeteofranceApi::Constants::API_URL}/v2/report",
269
+ "?",
270
+ URI.encode_www_form(params.merge(format: "jpg", token: @token))
271
+ ].join
272
+
273
+ return [image_url, image_description]
274
+ end
275
+ end
@@ -0,0 +1,86 @@
1
+ # Constants for Météo-France weather forecast python API.
2
+ module MeteofranceApi::Constants
3
+ API_URL = "https://webservice.meteofrance.com"
4
+ API_TOKENS = [
5
+ # noqa: S105
6
+ "__Wj7dVSTjV9YGu1guveLyDq0g7S7TfTjaHBTPTpO0kj8__",
7
+ # noqa: B951
8
+ "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIzRjdFOTVGOS04QjIxLTQwMDctOTFCQi0wQ0M3QjlBNTQxQzQiLCJjbGFzcyI6Im1vYmlsZSIsImlhdCI6MTYzNDg0NjM1Mi40NzU0MTE5fQ.F02c4y95-HqMsMbQeJ5Cx-qQ4LDJgaYwl47YsNvJM0E",
9
+ ]
10
+
11
+ # enums used in all Warning classes. First indice is 0
12
+ # Weather alert criticity
13
+ ALERT_COLORS_FR = [nil, "Vert", "Jaune", "Orange", "Rouge"]
14
+ ALERT_COLORS_EN = [nil, "Green", "Yellow", "Orange", "Red"]
15
+ ALERT_COLORS = {
16
+ fr: ALERT_COLORS_FR,
17
+ en: ALERT_COLORS_EN,
18
+ }
19
+
20
+ # Weather alert type
21
+ ALERT_TYPES_FR = [
22
+ nil,
23
+ "Vent violent",
24
+ "Pluie-inondation",
25
+ "Orages",
26
+ "Inondation",
27
+ "Neige-verglas",
28
+ "Canicule",
29
+ "Grand-froid",
30
+ "Avalanches",
31
+ "Vagues-submersion",
32
+ ]
33
+ ALERT_TYPES_EN = [
34
+ nil,
35
+ "Wind",
36
+ "Rain-Flood",
37
+ "Thunderstorms",
38
+ "Flood",
39
+ "Snow/Ice",
40
+ "Extreme high temperature",
41
+ "Extreme low temperature",
42
+ "Avalanches",
43
+ "Coastal Event",
44
+ ]
45
+ ALERT_TYPES = {
46
+ fr: ALERT_TYPES_FR,
47
+ en: ALERT_TYPES_EN,
48
+ }
49
+
50
+
51
+ # Valide departments list for weather alert bulletin
52
+ VALID_DEPARTMENTS = (1..95).to_a + [
53
+ "2A",
54
+ "2B",
55
+ "99",
56
+ ].map {|v| v.to_s.rjust(2, "0")}.sort
57
+
58
+ # Area code list for Coastal Departments
59
+ COASTAL_DEPARTMENTS = [
60
+ "06",
61
+ "11",
62
+ "13",
63
+ "14",
64
+ "17",
65
+ "22",
66
+ "29",
67
+ "2A",
68
+ "2B",
69
+ "30",
70
+ "33",
71
+ "34",
72
+ "35",
73
+ "40",
74
+ "44",
75
+ "50",
76
+ "56",
77
+ "59",
78
+ "62",
79
+ "64",
80
+ "66",
81
+ "76",
82
+ "80",
83
+ "83",
84
+ "85",
85
+ ]
86
+ end