Photo by Michael Held on Unsplash
This project shows how to build a basic data access application that continuously runs in the background, processing VIIRS (I-Band 375 m) data from NASA by dowloading CSV files from the site, transforming each record into GeoJSON, and loading that into a Cloudant database.
From NASA FIRMS:
The Visible Infrared Imaging Radiometer Suite (VIIRS) 375 m (VNP14IMGTDL_NRT) active fire product is the latest product to be added to FIRMS. It provides data from the VIIRS sensor aboard the joint NASA/NOAA Suomi National Polar-orbiting Partnership (Suomi-NPP) satellite. The 375 m data complements Moderate Resolution Imaging Spectroradiometer (MODIS) fire detection; they both show good agreement in hotspot detection but the improved spatial resolution of the 375 m data provides a greater response over fires of relatively small areas and provides improved mapping of large fire perimeters. The 375 m data also has improved nighttime performance. Consequently, these data are well suited for use in support of fire management (e.g., near real-time alert systems), as well as other science applications requiring improved fire mapping fidelity. Recommended reading: VIIRS 375 m Active Fire Algorithm User Guide (updated July 2018).
If you haven't yet done it, # for IBM Cloud here.
Deploy this application to the IBM Cloud in one simple step.
Click this button to deploy the NodeJS app and instantiate a Cloudant database service at the same time. You'll have a fire app that harvests data and persists it to a Cloudant database, where you can easily write queries to access the data.
To run this application on your local machine, first install Node.js.
-
Install and configure the IBM Cloud Developer Tools
-
Clone this repository
$ git clone git@github.com:rajrsingh/fires-api-nodejs.git $ cd fires-api-nodejs
-
Install the dependencies
$ npm install
-
Create a
vcap-local.json
file with your IBM Cloud app's VCAP environment variables- When running this app locally you can get your Cloudant credentials from IBM Cloud (VCAP_SERVICES in
cf env
output or the Environment Variables section for an app in the IBM Cloud console dashboard). Feel free to copy all the environment variables -- not just the Cloudant ones. The app will still find the right ones. - Once you have the credentials, paste them into a file called
vcap-local.json
. Alternately you could point to a local database here instead of a service on the IBM Cloud. - URL will be in this format: https://username:password@xxxxxxxxx-bluemix.cloudant.com
- When running this app locally you can get your Cloudant credentials from IBM Cloud (VCAP_SERVICES in
-
Make edits
-
One thing you will want to do when testing is to have the NASA data harvesting run immediately instead of on a timer. To do this, uncomment the last line of the file so that it reads like this:
callActiveFireData()
- Deploy the application with your code
$ ibmcloud cf push
This code is licensed under Apache 2.0. Full license text is available in LICENSE.