Skip to main content

Download wildfire hotspots detected by NASA satellites and the Fire Information for Resource Management System (FIRMS)

Project description

Download wildfire hotspots detected by NASA satellites and the Fire Information for Resource Management System (FIRMS)

Hourly scrapes powered by a GitHub Action are stored in the data directory.

Installation

pipenv install nasa-wildfires

Command-line usage

Usage: nasawildfires [OPTIONS] COMMAND [ARGS]...

  A command-line interface for downloading wildfire data from NASA
  satellites.

  Returns world GeoJSON in a recent 24-hour period. For available regions and time ranges, see options.

Options:
  --help  Show this message and exit.

Commands:
  modis  Hotspots detected by the MODIS satellitel
  viirs_suomi  Hotspots detected by the VIRRS S-NPP satellite.
  viirs_noaa  Hotspots detected by the VIRRS NOAA-20 satellite.

Download a GeoJSON of hotspots detected by the MODIS satellite in a recent 24-hour period.

nasawildfires modis

Download a GeoJSON of hotspots detected by the MODIS satellite for USA and Hawaii in a recent 48-hour period.

nasawildfires modis -r usa-hawaii -t 48h

Download a GeoJSON of hotspots detected by the VIIRS S-NPP satellite in a recent 24-hour period.

nasawildfires viirs-suomi

Download a GeoJSON of hotspots detected by the VIIRS NOAA-20 satellite in a recent 24-hour period.

nasawildfires viirs-noaa

Python usage

Import the library.

>>> import nasa_wildfires

View list of available regions

>>> nasa_wildfires.REGION_LIST
['global', 'canada', 'alaska', 'usa-hawaii', 'central-america', 'south-america', 'europe', 'north-central-africa', 'southern-africa', 'russia-asia', 'south-asia', 'southeast-asia', 'australia-newzealand']

View list of availabe time ranges

>>> nasa_wildfires.TIME_RANGE_LIST
['24h', '48h', '7d']

Download a GeoJSON of hotspots detected by the MODIS satellite in a recent 24-hour period. Returns GeoJSON.

>>> data = nasa_wildfires.get_modis()

Download a regional GeoJSON of hotspots detected by the MODIS satellite in a recent 24-hour period.

>>> data = nasa_wildfires.get_modis(region='usa-hawaii')

Download a regional GeoJSON of hotspots detected by the MODIS satellite in a recent 7-day period.

>>> data = nasa_wildfires.get_modis(region='usa-hawaii', time_range='7d')

Download a GeoJSON of hotspots detected by the VIIRS S-NPP satellite in a recent 24-hour period. Returns GeoJSON.

>>> data = nasa_wildfires.get_viirs_suomi()

Download a GeoJSON of hotspots detected by the VIIRS NOAA-20 satellite in a recent 24-hour period. Returns GeoJSON.

>>> data = nasa_wildfires.get_viirs_noaa()

Contributing

Install dependencies for development.

pipenv install --dev

Run tests.

make test

Shipping new version to PyPI.

make ship

Developing the CLI

The command-line interface is implemented using Click and setuptools. To install it locally for development inside your virtual environment, run the following installation command, as prescribed by the Click documentation.

pip install --editable .

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nasa-wildfires-1.0.5.tar.gz (6.7 kB view hashes)

Uploaded source

Built Distribution

nasa_wildfires-1.0.5-py2.py3-none-any.whl (5.5 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page