Geocode Coop addresses to lat & long for map
This commit is contained in:
parent
8780eca301
commit
3c80693d67
2
Gemfile
2
Gemfile
@ -4,3 +4,5 @@ gem 'jekyll'
|
|||||||
|
|
||||||
# Fixes deprecation warning - see https://github.com/jekyll/jekyll-sass-converter/pull/75
|
# Fixes deprecation warning - see https://github.com/jekyll/jekyll-sass-converter/pull/75
|
||||||
gem 'jekyll-sass-converter', git: 'https://github.com/jekyll/jekyll-sass-converter.git', branch: 'sassc'
|
gem 'jekyll-sass-converter', git: 'https://github.com/jekyll/jekyll-sass-converter.git', branch: 'sassc'
|
||||||
|
|
||||||
|
gem 'geocoder'
|
||||||
|
@ -19,6 +19,7 @@ GEM
|
|||||||
eventmachine (1.2.7)
|
eventmachine (1.2.7)
|
||||||
ffi (1.9.25)
|
ffi (1.9.25)
|
||||||
forwardable-extended (2.6.0)
|
forwardable-extended (2.6.0)
|
||||||
|
geocoder (1.5.0)
|
||||||
http_parser.rb (0.6.0)
|
http_parser.rb (0.6.0)
|
||||||
i18n (0.9.5)
|
i18n (0.9.5)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
@ -62,6 +63,7 @@ PLATFORMS
|
|||||||
ruby
|
ruby
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
|
geocoder
|
||||||
jekyll
|
jekyll
|
||||||
jekyll-sass-converter!
|
jekyll-sass-converter!
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ website: http://alpha.coop/
|
|||||||
email: info@alpha.coop
|
email: info@alpha.coop
|
||||||
twitter: alpha.coop
|
twitter: alpha.coop
|
||||||
github: AlphaCo_op
|
github: AlphaCo_op
|
||||||
telephone: '+441912111938'
|
telephone: "+441912111938"
|
||||||
address: 6 Charlotte Square,Newcastle upon Tyne,United Kingdom,NE1 4XF
|
address: 6 Charlotte Square,Newcastle upon Tyne,United Kingdom,NE1 4XF
|
||||||
latitude: 54.97101
|
latitude: 54.97101
|
||||||
longitude: -1.61974
|
longitude: -1.61974
|
||||||
@ -43,4 +43,4 @@ We deliver on time and within budget.
|
|||||||
|
|
||||||
KNOWING
|
KNOWING
|
||||||
After 30 years, we know what we’re doing.
|
After 30 years, we know what we’re doing.
|
||||||
We help you engage with the people you need to reach.
|
We help you engage with the people you need to reach.
|
@ -25,4 +25,4 @@ technologies:
|
|||||||
|
|
||||||
Cetis is a cooperative Limited Liability Partnership and an independent Strategic IT consultancy, specialising in learning, education and training.
|
Cetis is a cooperative Limited Liability Partnership and an independent Strategic IT consultancy, specialising in learning, education and training.
|
||||||
|
|
||||||
We offer impartial strategic and technical advice and guidance in educational technology and process innovation, and we provide discovery services, technology solutions and training services. Our Partners and Associates are globally recognised as leading experts on educational technology innovation, interoperability and technology standards. Cetis LLP was established in 2015 by members of the Jisc Innovation Centres Cetis and OSS Watch. As the Centre for Educational Technology, Interoperability and Standards, Cetis has provided, for nearly two decades, impartial, strategic, technical and pedagogical advice on educational technology innovation, collaboration and standards to funding bodies, standards agencies, government, international organisations, institutions and commercial partners.
|
We offer impartial strategic and technical advice and guidance in educational technology and process innovation, and we provide discovery services, technology solutions and training services. Our Partners and Associates are globally recognised as leading experts on educational technology innovation, interoperability and technology standards. Cetis LLP was established in 2015 by members of the Jisc Innovation Centres Cetis and OSS Watch. As the Centre for Educational Technology, Interoperability and Standards, Cetis has provided, for nearly two decades, impartial, strategic, technical and pedagogical advice on educational technology innovation, collaboration and standards to funding bodies, standards agencies, government, international organisations, institutions and commercial partners.
|
@ -8,8 +8,8 @@ twitter:
|
|||||||
github:
|
github:
|
||||||
telephone: '07908 592 835'
|
telephone: '07908 592 835'
|
||||||
address: 44 Arkwright Road,London,NW3 6BH
|
address: 44 Arkwright Road,London,NW3 6BH
|
||||||
latitude:
|
latitude: 51.5509322
|
||||||
longitude:
|
longitude: -0.1833781
|
||||||
clients:
|
clients:
|
||||||
- labour-party
|
- labour-party
|
||||||
- nesta
|
- nesta
|
||||||
|
@ -8,8 +8,8 @@ twitter: dtc-innovation
|
|||||||
github:
|
github:
|
||||||
telephone: 447455921569
|
telephone: 447455921569
|
||||||
address: London,United Kingdom
|
address: London,United Kingdom
|
||||||
latitude:
|
latitude: 51.5073219
|
||||||
longitude:
|
longitude: -0.1276474
|
||||||
clients:
|
clients:
|
||||||
- bbc
|
- bbc
|
||||||
- data-gouv-fr
|
- data-gouv-fr
|
||||||
|
@ -8,8 +8,8 @@ twitter: index.html
|
|||||||
github:
|
github:
|
||||||
telephone: "+44 7793650013"
|
telephone: "+44 7793650013"
|
||||||
address: Virtual
|
address: Virtual
|
||||||
latitude:
|
latitude: -26.9041798
|
||||||
longitude:
|
longitude: -49.0924112
|
||||||
clients:
|
clients:
|
||||||
services:
|
services:
|
||||||
- branding-and-identity
|
- branding-and-identity
|
||||||
|
@ -8,8 +8,8 @@ twitter:
|
|||||||
github:
|
github:
|
||||||
telephone:
|
telephone:
|
||||||
address: London
|
address: London
|
||||||
latitude:
|
latitude: 51.5073219
|
||||||
longitude:
|
longitude: -0.1276474
|
||||||
clients:
|
clients:
|
||||||
- creating-freedom
|
- creating-freedom
|
||||||
- participatory-economics-uk
|
- participatory-economics-uk
|
||||||
|
@ -8,8 +8,8 @@ twitter:
|
|||||||
github:
|
github:
|
||||||
telephone: "+44 1484 846231"
|
telephone: "+44 1484 846231"
|
||||||
address: Huddersfield
|
address: Huddersfield
|
||||||
latitude:
|
latitude: 53.6466645
|
||||||
longitude:
|
longitude: -1.7822482
|
||||||
clients:
|
clients:
|
||||||
services:
|
services:
|
||||||
- business-analysis
|
- business-analysis
|
||||||
|
@ -80,4 +80,4 @@ We are a design co-operative specialising in creative print and web design for t
|
|||||||
|
|
||||||
Our services range from brand and identity development, campaign material, print publications and exhibitions to photography, illustration, web design and development, animation, interactive applications and games!
|
Our services range from brand and identity development, campaign material, print publications and exhibitions to photography, illustration, web design and development, animation, interactive applications and games!
|
||||||
|
|
||||||
Please see case studies for some **recent work**.
|
Please see case studies for some **recent work**.
|
@ -8,8 +8,8 @@ twitter: weareopen
|
|||||||
github: hello%40weareopen.html
|
github: hello%40weareopen.html
|
||||||
telephone: N/A
|
telephone: N/A
|
||||||
address: the Internet
|
address: the Internet
|
||||||
latitude:
|
latitude: 19.37218875
|
||||||
longitude:
|
longitude: -72.3346544510523
|
||||||
clients:
|
clients:
|
||||||
- creative-commons
|
- creative-commons
|
||||||
- london-clc
|
- london-clc
|
||||||
|
21
scripts/geocode_coop_addresses.rb
Normal file
21
scripts/geocode_coop_addresses.rb
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
require 'bundler/setup'
|
||||||
|
require 'yaml'
|
||||||
|
require 'geocoder'
|
||||||
|
|
||||||
|
Geocoder.configure(lookup: :nominatim)
|
||||||
|
|
||||||
|
root_path = Pathname.new(__dir__).join('..')
|
||||||
|
|
||||||
|
Dir[root_path.join('_coops/*.md')].each do |path|
|
||||||
|
content = File.read(path)
|
||||||
|
body = content.split("\n").reverse.take_while { |l| l != "---" }.reverse.join("\n")
|
||||||
|
metadata = YAML.safe_load(content)
|
||||||
|
|
||||||
|
address = metadata['address']
|
||||||
|
latitude, longitude = Geocoder.coordinates(address, params: { region: 'uk' })
|
||||||
|
metadata['latitude'] ||= latitude
|
||||||
|
metadata['longitude'] ||= longitude
|
||||||
|
|
||||||
|
frontmatter = YAML.dump(metadata)
|
||||||
|
File.write(path, frontmatter + "---" + "\n" + body)
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user