Project

orb_def

0.0
No release in over 3 years
Low commit activity in last 3 years
Fetches and persists Nasa FIRMS (Fires) and Open Weather API data by geolocation
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 2.3, >= 2.3.1
~> 3.7, >= 3.7.5
>= 6.0.3
 Project Readme

CircleCI

Orbital Defence Engine

Making NASA FIRMS data queryable by geo-location and augmenting it with Open Weather API data

Orbital Defence Demo

Getting Started

Grab a OpenWeatherMap API key here
Grab a Nasa EarthData Api Key here
The Engine has a dependancy on pagy for pagination and geokit-rails for geo based queries. The initializer files will be created during installation only if they do not exist.

Installation

Add this line to your application's Gemfile:

gem 'orb_def'

And then execute:

bundle

Generate the installation files: This will create the orb_def, pagy and geokit initializers, install migrations and mount the app to '/'

rails generate orb_def:install

Run migrations:

rails db:migrate

Populate the DB with required seed information:

rails orb_def:seed_db

Import all fires with their weather readings in a rails console:

OrbDef::Nasa::FirmsImport.all

You can then hit the api/v1/search endpoint:

http://localhost:3000/api/v1/fires/search?sw_bound_point=22,22&ne_bound_point=22.325,23.345345&page=1

or you can call the fire model directly:

OrbDef::Fire.in_last_24_hours.in_bounds([sw_bound_point, ne_bound_point])
OrbDef::Fire.in_last_24_hours.within(10, origin: [latitude, longitude])
OrbDef::Fire.within(10, origin: [latitude, longitude])

Contributing

Fell free to contribute by forking the repo and opening a PR.

License

The gem is available as open source under the terms of the MIT License.