Skip to content

Commit

Permalink
Merge pull request #61 from NASA-IMPACT/develop
Browse files Browse the repository at this point in the history
Production deploy
  • Loading branch information
hanbyul-here authored Jun 23, 2022
2 parents 11b5943 + b91f2ab commit 8f65ed2
Show file tree
Hide file tree
Showing 46 changed files with 11,898 additions and 140 deletions.
28 changes: 27 additions & 1 deletion .delta/delta
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
#!/usr/bin/env node
require('dotenv').config();
const dotenv = require('dotenv');

const NODE_ENV = process.env.NODE_ENV;

const dotenvFiles = [
'.env',
// Don't include `.env.local` for `test` environment
// since normally you expect tests to produce the same
// results for everyone
NODE_ENV === 'test' ? null : '.env.local',
`.env.${NODE_ENV}`,
`.env.${NODE_ENV}.local`
].filter(Boolean);

const env = {};

for (let dotenvFile of dotenvFiles) {
const config = dotenv.config({ path: dotenvFile });
if (config.parsed) {
Object.assign(env, config.parsed);
}
}

for (let key in env) {
process.env[key] = env[key];
}

const { execSync } = require('child_process');
const path = require('path');

Expand Down
2 changes: 1 addition & 1 deletion .delta/ui
Submodule ui updated from 03d7b0 to 45d25d
3 changes: 0 additions & 3 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ API_RASTER_ENDPOINT='https://staging-raster.delta-backend.com'
# Endpoint for the STAC server. No trailing slash.
API_STAC_ENDPOINT='https://staging-stac.delta-backend.com'

# The mapbox public token obtained from your account
MAPBOX_TOKEN='pk.eyJ1IjoiY292aWQtbmFzYSIsImEiOiJja2F6eHBobTUwMzVzMzFueGJuczF6ZzdhIn0.8va1fkyaWgM57_gZ2rBMMg'

MAPBOX_STYLE_URL='mapbox://styles/covid-nasa/ckb01h6f10bn81iqg98ne0i2y'

# If the app is being served in from a subfolder, the domain url must be set.
Expand Down
3 changes: 3 additions & 0 deletions .env.local-sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Get your public token from Mapbox dashboard
# Then copy this file, name it as .env.local
MAPBOX_TOKEN='YOUR_MAPBOX_TOKEN'
2 changes: 2 additions & 0 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ jobs:
run: ./.delta/setup

- name: Build production
env:
MAPBOX_TOKEN: ${{secrets.MAPBOX_TOKEN}}
run: PUBLIC_URL="${{ env.DOMAIN_PROD }}" yarn build

deploy:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ jobs:
run: ./.delta/setup

- name: Build Staging
env:
MAPBOX_TOKEN: ${{secrets.MAPBOX_TOKEN}}
run: PUBLIC_URL="${{ env.DOMAIN_STAGING }}" yarn stage

deploy:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/deploy-surge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,11 @@ jobs:
run: ./.delta/setup

- name: Build staging
env:
MAPBOX_TOKEN: ${{secrets.MAPBOX_TOKEN}}
run: yarn stage


deploy:
runs-on: ubuntu-latest
needs: build
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ node_modules
bower_components
.sass-cache
test/bower_components
.env.local


################################################
Expand Down
Binary file added datasets/fb-population--dataset-cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
85 changes: 85 additions & 0 deletions datasets/fb_population.ej.data.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
id: facebook_population_density
name: 'Facebook Population Density'
description: 'Facebook high-resolution population density with a 30m resolution'
media:
src: ::file ./fb-population--dataset-cover.png
alt: 2015 high resolution population density for Paris.
author:
name: NASA
url:
thematics:
- environmental-justice
layers:
- id: facebook_population_density
name: 'Facebook Population Density'
type: raster
description: 'Facebook high-resolution population density with a 30m² resolution'
zoomExtent:
- 0
- 20
sourceParams:
resampling_method: bilinear
bidx: 1
colormap_name: ylorrd
rescale:
- 0
- 69
legend:
type: gradient
min: "0"
max: "69"
stops:
- "#ffffcc"
- "#fee187"
- "#feab49"
- "#fc5b2e"
- "#d41020"
- "#800026"
---

<Block>
<Prose>
In partnership with the Center for International Earth Science Information Network (CIESIN) at Columbia University, Meta [formerly known as Facebook] used census data and computer vision techniques (Convolutional Neural Networks) to identify buildings from publicly accessible mapping services to create population density datasets. These high-resolution maps estimate the number of individuals living within 30-meter grid tiles on a global scale. The population estimates are based on data from the Gridded Population of the World (GPWv4) data collection.
</Prose>
</Block>

<Block>
<Prose>
## Scientific research
The 30-meter resolution population density dataset uses machine learning techniques to produce global population maps using building footprints and census population data from CIESIN. The high resolution population data can be used to support the applications community when assessing the impacts of natural disasters or assessing risk at near global coverage.
</Prose>
</Block>

<Block type='full'>
<Figure>
<Map
datasetId='facebook_population_density'
layerId='facebook_population_density'
zoom={11}
dateTime='2015-01-01'
center={[-73.983,40.761]}
/>
<Caption
attrAuthor='NASA'
attrUrl='https://nasa.gov/'
>
Population density in units of people per square meter for New York, NY, USA for 2015
</Caption>
</Figure>
<Prose>
## Interpreting the data
Population density is provided in units of people per square meter, at the near global scale and is available for the year 2015. The data is gridded at 30m resolution and is only available in locations where buildings are present (i.e. there will be no data over large parks or industrial areas). Higher population density regions (shaded in red) typically correspond to urban centers and lower population (in yellow) to rural and suburban locations.
</Prose>
</Block>

<Block>
<Prose>
## Credits
1. https://dataforgood.facebook.com/dfg/docs/methodology-high-resolution-population-density-maps

2. https://dataforgood.facebook.com/dfg/tools/high-resolution-population-density-maps

3. T. G. Tiecke et al., ‘Mapping the world population one building at a time’, CoRR, https://arxiv.org/abs/1712.05839, 2017.
</Prose>
</Block>
Binary file added datasets/hls-events-ej--dataset-cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
107 changes: 107 additions & 0 deletions datasets/hls-events.ej.data.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
---
id: hls_events
name: 'Harmonized Landsat Sentinel-2 (Selected Events)'
description: '30-meter resolution harmonized Landsat 8/9 and Sentinel-2A/B data products'
media:
src: ::file ./hls-events-ej--dataset-cover.png
alt: 2017 harmonized Landsat 8 shortwave infrared (SWIR) false color composite image that provides enhanced contrast to detect flood extent.
author:
name: NASA
url: https://nasa.gov/
thematics:
- environmental-justice
layers:
- id: hls-l30-002-ej
name: HLS Landsat SWIR
type: raster
description: 'Harmonized Landsat SWIR: small subset near Puerto Rico'
zoomExtent:
- 4
- 20
sourceParams:
post_process: swir
assets:
- B07
- B05
- B04
compare:
datasetId: hls_events
layerId: hls-l30-002-ej
mapLabel: |
::js ({ dateFns, datetime, compareDatetime }) => {
return `${dateFns.format(datetime, 'LLL yyyy')} VS ${dateFns.format(compareDatetime, 'LLL yyyy')}`;
}
- id: hls-s30-002-ej
name: HLS Sentinel-2 SWIR
type: raster
description: 'Harmonized Sentinel-2 SWIR: small subset near Puerto Rico'
zoomExtent:
- 4
- 20
sourceParams:
post_process: swir
assets:
- B12
- B8A
- B04
---

<Block>
<Prose>
Input data from Landsat 8/9 and Sentinel-2A/B is reprojected and Sentinel-2 data adjusted so that the output data products, HLSL30 (Landsat-derived) and HLSS30 (Sentinel-2-derived) can be used interchangeably. The harmonization of the Optical Land Imager (OLI) on Landsat 8/9 and Multispectral Imager (MSI) on Sentinel-2A/B increases the time series density of plot-scale observations such that data is available every 2-4 days over a given location.

The data currently in this dashboard represents a subset of the available data. Data will continue to be added to this dashboard over time.
</Prose>
</Block>

<Block>
<Prose>
## Scientific research
The production of atmospherically corrected HLS products is a collaborative effort between NASA, the U.S. Geological Survey (USGS), and the European Space Agency (ESA). Bandpass adjustments applied to Sentinel-2 data spectral bands match surface reflectance values in corresponding spectral bands in Landsat 8 and 9. This adjustment allows for 30m observation of the land surface every 2-4 days. HLSL30 and HLSS30 products are typically used for land use land cover applications including land use change, land use classification, fire monitoring, agricultural monitoring, and flooding, among others.
</Prose>
</Block>

<Block type='full'>
<Figure>
<Map
datasetId='hls_events'
layerId='hls-l30-002-ej'
dateTime='2017-08-25'
zoom={11}
center={[-65.97,18.41]}
compareDateTime='2017-09-26'
/>
<Caption
attrAuthor='NASA'
attrUrl='https://nasa.gov/'
>
Harmonized Landsat 8 SWIR image provides enhanced contrast to detect flood extent in Puerto Rico before and after Hurricane Maria in 2017.
</Caption>
</Figure>
<Prose>
## Interpreting the data
HLS imagery in support of Environmental Justice shows the impact of flooding for Hurricanes Maria and Ida that made landfall in Puerto Rico (2017) and New Orleans, LA (2021) respectively. The imagery displayed is a shortwave infrared (SWIR) false color composite that provides enhanced contrast to detect flood extent. In SWIR false color composite imagery, water is identified by dark blue colors, vegetation is bright green, clouds are white, and ice is blue.
</Prose>
</Block>

<Block>
<Prose>
## Credits
1. Citation for HLS data set: Claverie, M., Ju, J., Masek, J. G., Dungan, J. L., Vermote, E. F., Roger, J.-C., Skakun, S. V., & Justice, C. (2018). The Harmonized Landsat and Sentinel-2 surface reflectance data set. Remote Sensing of Environment, 219, 145-161.

2. Masek, J., Ju, J., Roger, J., Skakun, S., Vermote, E., Claverie, M., Dungan, J., Yin, Z., Freitag, B., Justice, C. (2021). <i>HLS Sentinel-2 Multi-spectral Instrument Surface Reflectance Daily Global 30m v2.0</i> [Data set]. NASA EOSDIS Land Processes DAAC. Accessed 2022-06-16 from https://doi.org/10.5067/HLS/HLSS30.002

3. Masek, J., Ju, J., Roger, J., Skakun, S., Vermote, E., Claverie, M., Dungan, J., Yin, Z., Freitag, B., Justice, C. (2021). <i>HLS Operational Land Imager Surface Reflectance and TOA Brightness Daily Global 30m v2.0</i> [Data set]. NASA EOSDIS Land Processes DAAC. Accessed 2022-06-16 from https://doi.org/10.5067/HLS/HLSL30.002
</Prose>
</Block>

<Block>
<Prose>
## Additional Resources
1. [HLSL30 Dataset Landing Page](https://lpdaac.usgs.gov/products/hlsl30v002/)

2. [HLSS30 Dataset Landing Page](https://lpdaac.usgs.gov/products/hlss30v002/)

3. [HLS Webinar with LPDAAC](https://www.youtube.com/watch?v=N2S4KGNo_XY)
</Prose>
</Block>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
107 changes: 107 additions & 0 deletions datasets/nighttime-lights.ej.data.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
---
id: nighttime-lights-ej
name: 'Nighttime Lights supporting Environmental Justice'
description: 'High definition nighttime lights can be used to identify regions impacted by natural disaster and/or power outages to better inform disaster response efforts.'
media:
src: ::file ./nighttime-lights-ej--dataset-cover-neworleans.jpeg
alt: Nighttime lights for New Orleans, LA on August 31, 2021.
author:
name: NASA Earth Observatory
url: https://appliedsciences.nasa.gov/our-impact/news/satellite-observes-power-outages-new-orleans
thematics:
- environmental-justice
layers:
- id: nightlights-hd-1band
name: Nightlights EJ
type: raster
description: 'High definition nighttime lights can be used to identify regions impacted by natural disaster and/or power outages to better inform disaster response efforts.'
zoomExtent:
- 7
- 20
sourceParams:
bidx: 1
colormap_name: inferno
rescale:
- 0
- 255
compare:
datasetId: nighttime-lights-ej
layerId: nightlights-hd-1band
---

<Block>
<Prose>
Images of Earth at night give us an extraordinary view of human activity over time. The nighttime environment illuminates Earth features, including city infrastructure, lightning flashes, fishing boats navigating open water, gas flares, aurora, and natural hazards, such as lava flowing from an active volcano. Paired with the moonlight, researchers can also spot snow and ice, as well as other reflective surfaces that allow nighttime land and ocean analysis.

Researchers are using night light observations to support disaster response and recovery to identify regions most impacted by natural disasters or similar power outages.
</Prose>
</Block>

<Block type='full'>
<Prose>
## Scientific research
Nightlights data are collected by the [Visible Infrared Radiometer Suite (VIIRS) Day/Night Band (DNB)](https://ladsweb.modaps.eosdis.nasa.gov/missions-and-measurements/viirs/) on the Suomi-National Polar-Orbiting Partnership (Suomi-NPP) platform, a joint National Oceanic and Atmospheric Administration (NOAA) and NASA satellite. The images are produced by [NASA’s Black Marble](https://blackmarble.gsfc.nasa.gov/) products suite. All data are calibrated daily, corrected, and validated with ground measurements for science-ready analysis.

Black Marble HD downscales radiances from the 500-meter product to street level using optical imagery from Landsat 8, a NASA and U.S. Geological Survey (USGS) satellite, along with OpenStreetMap ancillary layers. This helps visualize impacted areas at the neighborhood scale to identify differences in recovery time across the regions.
</Prose>
<Figure>
<Map
datasetId='nighttime-lights-ej'
layerId='nightlights-hd-1band'
zoom={12}
center={[-90.11,29.97]}
dateTime='2021-08-09'
/>
<Caption
attrAuthor='NASA'
attrUrl='https://nasa.gov/'
>
Nighttime lights from the Black Marble HD product over New Orleans, LA on August 9, 2021.
</Caption>
</Figure>
</Block>

<Block type='full'>
<Figure>
<Map
datasetId='nighttime-lights-ej'
layerId='nightlights-hd-1band'
zoom={9}
center={[-66.45,18.22]}
dateTime='2017-07-21'
compareDateTime='2017-09-20'
/>
<Caption
attrAuthor='NASA'
attrUrl='https://nasa.gov/'
>
Comparison of nightlights data for Puerto Rico pre-landfall (17 July 2017) and post-landfall (20 September 2017) for Hurricane Maria.
</Caption>
</Figure>
<Prose>
## Interpreting the data
30-meter resolution Black Marble High Definition (HD) nighttime lights are visualized for New Orleans, LA and Puerto Rico to highlight the impacts and recovery from the landfalls of Hurricane Ida and Hurricane Maria respectively. For each natural disaster, there is a pre-, during-, and post-event image for baseline comparisons. Within the nightlights data layer, brighter areas indicate locations with higher light emissions. One limitation of nightlights data is the presence of cloud cover as clouds can reduce the surface brightness as observed by the satellite when conditions on the ground remain unchanged.
</Prose>
</Block>

<Block>
<Prose>
## Credits
1. Black Marble data courtesy of [Universities Space Research Association (USRA) Earth from Space Institute (EfSI)](https://www.usra.edu/efsi-our-mission) and NASA Goddard Space Flight Center’s [Terrestrial Information Systems Laboratory](https://science.gsfc.nasa.gov/earth/terrestrialinfo/) using VIIRS day-night band data from the Suomi National Polar-orbiting Partnership and Landsat-8 Operational Land Imager (OLI) data from the U.S. Geological Survey.
</Prose>
</Block>

<Block>
<Prose>
## Additional resources
### NASA Features

* [Night Lights Show Slow Recovery from Hurricane Maria](https://www.earthobservatory.nasa.gov/images/144371/night-lights-show-slow-recovery-from-maria)

* [Satellite Observes Power Outages in New Orleans](https://earthobservatory.nasa.gov/images/148777/satellite-observes-power-outages-in-new-orleans)

### Explore the Missions

* [NASA’s Black Marble](https://blackmarble.gsfc.nasa.gov/)
</Prose>
</Block>
Loading

0 comments on commit 8f65ed2

Please sign in to comment.