Earthdata Search

A web application developed by NASA EOSDIS to enable data discovery, search, comparison, visualization, and access across EOSDIS' Earth Science data holdings.
https://github.com/nasa/earthdata-search

Category: Sustainable Development
Sub Category: Data Catalogs and Interfaces

Keywords

data-discovery earthdata-search eosdis hacktoberfest

Keywords from Contributors

earth-science gsfc common-metadata-repository echo-forms earth earth-data esdis timeline catalog hacktoberfest2022

Last synced: about 5 hours ago
JSON representation

Repository metadata

Earthdata Search is a web application developed by NASA EOSDIS to enable data discovery, search, comparison, visualization, and access across EOSDIS' Earth Science data holdings.

README.md

Earthdata Search

Build Status
codecov
Known Vulnerabilities

About

Earthdata Search is a web application developed by NASA EOSDIS to enable data discovery, search, comparison, visualization, and access across EOSDIS' Earth Science data holdings.
It builds upon several public-facing services provided by EOSDIS, including the Common Metadata Repository (CMR) for data discovery and access, EOSDIS Earthdata Login (EDL) authentication, the Global Imagery Browse Services (GIBS) for visualization, and a number of OPeNDAP services hosted by data providers.

License

Copyright © 2007-2024 United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Application Installation and Usage

The Earthdata Search application uses NodeJS and Vite to generate static assets. The serverless application utilizes the following AWS services (important to note if deploying to an AWS environment):

  • S3
    • We highly recommend using CloudFront in front of S3.
  • SQS
  • Step Functions
  • API Gateway
  • Lambda
  • Cloudwatch (Events)
  • Bedrock

Prerequisites

NodeJS

We recommend using Node Version Manager (NVM) to manage your NodeJS install. Use the shell integration to automatically switch Node versions.

NVM will automatically install the correct node version defined in .nvmrc

nvm use
PostgreSQL

Earthdata Search uses PostgreSQL in production on AWS RDS. If you don't already have it installed, download and install it to your development environment.

Recommended: Use Homebrew

brew install postgresql

Start the PostgreSQL server:

# If you have never used brew services before:
brew tap homebrew/services

# Start the server:
brew services start postgresql

If you decide to install via Homebrew you'll need to create the default user.

createuser -s postgres
Docker, Optional

Docker is used to simulate SQS locally using ElasticMQ.

Valkey, Optional

To use an image cache (for scaled images and NLP search) you need to have Valkey installed locally.

Recommended: Use Homebrew

brew install valkey
brew services start valkey

Migrating from Redis:
If you previously had Redis installed, you must stop and uninstall it, and ensure port 6379 is clear before starting Valkey.

brew services stop redis
brew uninstall redis

Optionally you can run Valkey in a Docker container with:

npm run start:cache

To stop the Docker container:

npm run stop:cache

Initial Setup

Package Installation

Once npm is installed locally, you need to download the dependencies by executing the command below in the project root directory:

npm install
Configuration
Secrets

For local development Earthdata Search uses a json configuration file to store secure files, an example is provided and should be copied and completed before attempting to go any further.

cp secret.config.json.example secret.config.json

In order to operate against a local database this file will need dbUsername and dbPassword values set (you may need to update dbHost, dbName or databasePort in static.config.json if you have custom configuration locally).

If you created the postgres user after a new PostgreSQL install as described above, both dbUsername and dbPassword will be the username you use to log into your computer.

Public (Non-Secure)

Non-secure values are stored in static.config.json. In order to prevent conflicts amongst developers you copy the static config into overrideStatic.config.json and change the config values there. Do not commit changes to static.config.json.

cp static.config.json overrideStatic.config.json

We can configure some of the layouts for the EDSC presentation by updating the defaultPortal value in overrideStatic.config.json. For development purposes we should set this to edsc.

.env File

The .env file is used to set environment variables for local development. An example is provided and should be copied and completed before attempting to go any further.

cp .env.example .env

If you are going to connect to AWS Bedrock change the values set to 'CHANGE-ME' to the appropriate values.

Database Migration

Ensure that you have a database created:

createdb edsc_dev

To run the migrations locally:

npm run invoke-local migrateDatabase
Creating a new database migration

To create a new database migration use this command to ensure the migration follow the same timestamp name scheme.

npm run migrate create name-of-migration

Run the Application Locally

The local development environment for the static assets can be started by executing the command below in the project root directory:

npm start

This will start everything you need to run Earthdata Search locally.

  • React application: http://localhost:8080
  • Mock API Gateway: http://localhost:3001
  • Watch for code changes to the serverless directory
  • ElasticMQ container for SQS Queues.
  • Mock SQS service to trigger lambdas on SQS messages.

Optional Services

By default we don't run all services locally. In order to run the application with those services you need to include the follow environment variables when you start the application.

  • USE_CACHE: This will use a local Valkey instance to cache images from GIBS, as well as geocoder results.
  • SKIP_SQS: When set to true this will skip adding retrievals to SQS, so your retrievals will not be submitted without a manual lambdas invocation.
  • USE_NLP_SEARCH: When set to true this will call AWS Bedrock to parse your query on the landing page.
  • USE_GEOCODER: When set to true this will enable the geocoder lambda (running in Docker) to be called from the nlpSearch lambda to provide geocoding results.

You can set any of these environment variables to true to run the optional services locally. To run the full application with all optional services you can run the following command:

USE_CACHE=true SKIP_SQS=false USE_NLP_SEARCH=true USE_GEOCODER=true npm start

Or run

npm run start:optionals

Building the Application

The production build of the application will be output in the /static/dist/ directory:

npm run build

This production build can be run locally with any number of http-server solutions. A simple one is to use the http-server package

npx http-server static/dist

Invoking lambdas locally

To invoke lambdas locally we must create a stringified JSON file with the order information to the specific lambda we are trying to run the structure of the events will differ between the lambda. Typically this will include data from your local database instance which is used in the event information.

npm run invoke-local <name-of-lambda-function> ./path/to/event.json

Pulling down colormaps locally

Run the application with optionals on then use

npm run invoke-local generateColorMaps ./tmp/generate_colormaps.json

with a JSON object of

{
"projection":
}

Run the Automated Vitest tests

Once the project is built, you must ensure that the automated unit tests pass:

npm run test

To run in the vitest ui mode:

npm run test:ui

Test coverage will be updated in the coverage directory to see breakdown use

open coverage/lcov-report/index.html

Run the Automated Playwright tests

To run Playwright tests, you must first install Playwright:

npx playwright install

To run Playwright in ui mode:

npm run playwright:ui

To run Playwright tests in headless mode:

npm run playwright

Deployment

When the time comes to deploy the application, first ensure that you have the required ENV vars set:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • STAGE_NAME

This application runs in a VPC for NASA security purposes, therefore the following values are expected when a deployment occurs:

  • VPC_ID
  • SUBNET_ID_A
  • SUBNET_ID_B
  • INTERNET_SERVICE_EAST_VPC

For production use, this application uses Scatter Swap to obfuscate some IDs -- the library does not require a value be provided but if you'd like to control it you can set the following ENV vars:

  • OBFUSCATION_SPIN
  • OBFUSCATION_SPIN_SHAPEFILES

To deploy the full application use the following:

bin/deploy_bamboo.sh

Note: In that script all the env variables are prefixed with bamboo_ to match our deployments.


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 6 days ago

Total Commits: 7,775
Total Committers: 67
Avg Commits per committer: 116.045
Development Distribution Score (DDS): 0.757

Commits in past year: 122
Committers in past year: 13
Avg Commits per committer in past year: 9.385
Development Distribution Score (DDS) in past year: 0.459

Name Email Commits
Matthew Crouch m****w@e****m 1893
Bo Sun b****n@n****v 1652
Patrick Quinn p****k@e****m 1475
Ryan Abbott r****n@e****m 841
Trevor Lang t****g@y****m 581
John Boukes j****s@r****m 436
Jeff Siarto j****o@g****m 300
Ed Olivares 3****6 88
mreese m****e@e****m 83
Jenny Wagner j****g@g****m 36
Drew Pesall p****w@g****m 35
John Boukes j****s@g****m 32
daniel-zamora d****a@n****v 30
Benjamin Poreh b****6@c****u 27
Charles Huang c****g@n****v 24
Macy Huang m****0@g****m 16
Mandy Parson 1****n 16
Johnathan Rush 1****o 14
Daniel J. Dufour d****r@g****m 14
Michael Morahan m****n@n****v 14
Marcus Berger m****r@g****m 12
Benjamin Poreh b****h@j****v 9
Mohd Fayaq m****q@g****m 9
John Cromartie j****n@e****m 8
eniad e****l@g****m 8
Brandon Corbett B****b 7
william-valencia 5****a 6
Marc Huffnagle m****c@e****m 6
Larry Gilliam l****m@n****v 6
Saurabh Daware s****9@g****m 6
and 37 more...

Committer domains:


Issue and Pull Request metadata

Last synced: 1 day ago

Total issues: 49
Total pull requests: 2,141
Average time to close issues: 7 months
Average time to close pull requests: 5 days
Total issue authors: 15
Total pull request authors: 83
Average comments per issue: 2.67
Average comments per pull request: 0.97
Merged pull request: 1,846
Bot issues: 0
Bot pull requests: 43

Past year issues: 2
Past year pull requests: 69
Past year average time to close issues: 1 day
Past year average time to close pull requests: 6 days
Past year issue authors: 2
Past year pull request authors: 11
Past year average comments per issue: 1.5
Past year average comments per pull request: 1.96
Past year merged pull request: 48
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/nasa/earthdata-search

Top Issue Authors

  • mreese84 (24)
  • lewismc (6)
  • macrouch (5)
  • eudoroolivares2016 (3)
  • Brantron (1)
  • rwxdash (1)
  • jbyrne6 (1)
  • dmistry1 (1)
  • sliu008 (1)
  • evenstensberg (1)
  • ajtritt (1)
  • bnp26 (1)
  • asjohnston-asf (1)
  • khubaibalam2000 (1)
  • mikeroyal (1)

Top Pull Request Authors

  • macrouch (583)
  • mightynimble (301)
  • abbottry (300)
  • trevorlang (184)
  • eudoroolivares2016 (134)
  • ghost (85)
  • bilts (72)
  • dpesall (67)
  • daniel-zamora (48)
  • bnp26 (48)
  • dependabot[bot] (43)
  • mreese84 (32)
  • rushgeo (22)
  • jennywagg (19)
  • jsiarto (19)

Top Issue Labels

  • Hacktoberfest (18)
  • Good First Issue (10)
  • 508 (10)
  • performance (2)
  • bug (2)
  • Leaflet (1)
  • React (1)
  • design (1)

Top Pull Request Labels

  • dependencies (43)
  • javascript (42)
  • Hacktoberfest (12)
  • on hold (4)
  • hacktoberfest-accepted (2)
  • invalid (1)
  • help wanted (1)
  • wontfix (1)

Package metadata

proxy.golang.org: github.com/nasa/earthdata-search


Dependencies

package-lock.json npm
  • 2538 dependencies
package.json npm
  • @cypress/code-coverage ^3.9.12 development
  • @cypress/webpack-preprocessor ^5.12.0 development
  • @welldone-software/why-did-you-render ^7.0.1 development
  • babel-jest ^28.1.0 development
  • babel-plugin-transform-runtime ^6.23.0 development
  • cookies ^0.7.3 development
  • cypress ^8.7.0 development
  • cypress-file-upload ^5.0.8 development
  • enzyme ^3.11.0 development
  • enzyme-adapter-react-16 ^1.15.6 development
  • istanbul-instrumenter-loader ^3.0.1 development
  • jest ^28.1.0 development
  • jest-environment-jsdom ^28.1.0 development
  • jest-react-hooks-shallow ^1.5.1 development
  • jsdom ^15.2.1 development
  • mock-knex ^0.4.10 development
  • mockdate ^2.0.5 development
  • nock ^12.0.3 development
  • nyc ^15.1.0 development
  • parse-multipart ^1.0.4 development
  • process ^0.11.10 development
  • redux-logger ^3.0.6 development
  • redux-mock-store ^1.5.4 development
  • snyk ^1.913.0 development
  • start-server-and-test ^1.14.0 development
  • three ^0.127.0 development
  • webpack-dev-server ^4.8.1 development
  • @babel/core ^7.17.9
  • @babel/eslint-parser ^7.17.0
  • @babel/plugin-proposal-class-properties ^7.16.7
  • @babel/plugin-proposal-object-rest-spread ^7.17.3
  • @babel/plugin-syntax-dynamic-import ^7.8.3
  • @babel/plugin-transform-runtime ^7.17.0
  • @babel/preset-env ^7.18.2
  • @babel/preset-react ^7.16.7
  • @babel/register ^7.17.7
  • @babel/runtime ^7.17.9
  • @edsc/echoforms ^1.1.13
  • @edsc/geo-utils ^1.0.3
  • @edsc/smart-handoffs ^1.0.3
  • @edsc/timeline ^1.1.5
  • @googlemaps/google-maps-services-js ^3.3.13
  • @redux-devtools/extension ^3.2.2
  • acorn ^8.7.1
  • ajv ^6.12.6
  • array-foreach-async ^1.0.1
  • array-to-sentence ^2.0.0
  • autoprefixer ^10.4.5
  • aws-sdk ^2.1122.0
  • axios ^0.21.4
  • axios-retry ^3.2.4
  • babel-loader ^8.2.5
  • babel-plugin-transform-class-properties ^6.24.1
  • bootstrap ^4.6.1
  • browser-detect ^0.2.28
  • camelcase-keys ^6.2.2
  • circular-dependency-plugin ^5.2.2
  • classnames ^2.3.1
  • clean-deep ^3.4.0
  • compression-webpack-plugin ^4.0.1
  • connected-react-router ^6.9.2
  • copy-webpack-plugin ^6.4.1
  • core-js ^3.22.2
  • crypto-browserify ^3.12.0
  • css-loader ^6.7.1
  • css-minimizer-webpack-plugin ^3.4.1
  • cssnano ^5.1.7
  • dropzone ^5.9.3
  • duplicate-package-checker-webpack-plugin ^3.0.0
  • eslint ^8.14.0
  • eslint-config-airbnb ^19.0.4
  • eslint-plugin-cypress ^2.12.1
  • eslint-plugin-import ^2.26.0
  • eslint-plugin-jsx-a11y ^6.5.1
  • eslint-plugin-react ^7.26.1
  • eslint-webpack-plugin ^3.1.1
  • events ^3.3.0
  • fast-xml-parser ^3.21.1
  • file-loader ^6.2.0
  • formdata-node ^2.5.0
  • formik ^2.2.9
  • geojson ^0.5.0
  • history ^4.10.1
  • html-webpack-partials-plugin ^0.8.0
  • html-webpack-plugin ^5.5.0
  • jquery ^3.6.0
  • jsonwebtoken ^8.5.1
  • knex ^0.95.15
  • leaflet ^1.7.1
  • leaflet-draw ^1.0.4
  • lodash ^4.17.21
  • lowercase-keys ^2.0.0
  • lrucache ^1.0.3
  • mini-css-extract-plugin ^1.6.2
  • moment ^2.29.3
  • node-forge ^1.3.1
  • node-pg-migrate ^6.2.1
  • node-pre-gyp ^0.12.0
  • node-sass ^7.0.1
  • number-abbreviate ^2.0.0
  • pg ^8.7.3
  • postcss ^8.4.12
  • postcss-cli ^9.1.0
  • postcss-import ^14.1.0
  • postcss-loader ^6.2.1
  • postcss-scss ^4.0.4
  • precss ^4.0.0
  • proj4 ^2.8.0
  • proj4leaflet ^1.0.2
  • prop-types ^15.8.1
  • qs ^6.10.3
  • rc-pagination ^1.21.1
  • react ^16.14.0
  • react-autosuggest ^9.4.3
  • react-bootstrap ^1.6.5
  • react-datetime ^2.16.3
  • react-dom ^16.14.0
  • react-helmet ^5.2.1
  • react-icons ^4.3.1
  • react-input-range ^1.3.0
  • react-jsonschema-form ^1.8.1
  • react-leaflet ^2.8.0
  • react-leaflet-control ^2.1.2
  • react-leaflet-draw git+https://git@github.com/macrouch/react-leaflet-draw.git#EDSC-2823
  • react-redux ^6.0.1
  • react-router ^5.3.1
  • react-router-bootstrap ^0.25.0
  • react-router-dom ^5.3.1
  • react-sanitized-html ^2.0.0
  • react-table ^7.7.0
  • react-table-sticky ^1.1.3
  • react-timeago ^4.4.0
  • react-toast-notifications ^2.5.1
  • react-transition-group ^4.4.2
  • react-virtualized-auto-sizer ^1.0.6
  • react-window ^1.8.7
  • react-window-infinite-loader ^1.0.7
  • recompose ^0.30.0
  • redux ^4.2.0
  • redux-thunk ^2.4.1
  • regenerator-runtime ^0.13.9
  • reselect ^4.1.5
  • resolve-url-loader ^5.0.0
  • sanitize-html ^2.7.0
  • sass-loader ^12.6.0
  • scatter-swap ^0.1.0
  • serverless ^3.19.0
  • serverless-finch ^4.0.0
  • serverless-offline ^8.8.0
  • serverless-plugin-log-subscription ^2.1.1
  • serverless-plugin-split-stacks ^1.11.3
  • serverless-step-functions ^3.7.0
  • serverless-webpack ^5.7.1
  • simple-oauth2 ^4.3.0
  • simplebar ^4.2.3
  • simplebar-react ^1.2.3
  • snakecase-keys ^2.1.0
  • stream-browserify ^3.0.0
  • style-loader ^2.0.0
  • style-resources-loader ^1.5.0
  • terser-webpack-plugin ^4.2.3
  • tiny-cookie ^2.3.2
  • url ^0.11.0
  • url-template ^2.0.8
  • uuid ^8.3.2
  • webpack ^5.72.0
  • webpack-bundle-analyzer ^4.5.0
  • webpack-cli ^4.9.2
  • webpack-merge ^5.8.0
  • webpack-node-externals ^3.0.0
  • webpackbar ^5.0.2
  • ws ^7.5.7
  • xmldom ^0.5.0
  • xpath 0.0.27
  • yup ^0.32.11
.github/workflows/ci.yml actions
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • actions/setup-node v3 composite
  • codecov/codecov-action v3 composite
  • shimataro/ssh-key-action v2 composite
.github/workflows/metrics.yml actions
  • EndBug/add-and-commit v10 composite
  • actions/cache v5 composite
  • actions/checkout v7 composite
  • actions/download-artifact v8 composite
  • actions/setup-node v6 composite
  • actions/upload-artifact v7 composite
cdk/earthdata-search-infrastructure/package-lock.json npm
  • 366 dependencies
.github/actions/npm-setup/action.yml actions
  • actions/cache v5 composite
  • actions/setup-node v6 composite
.github/workflows/compare-bundles.yml actions
  • actions/cache v5 composite
  • actions/checkout v7 composite
  • actions/download-artifact v8 composite
  • actions/setup-node v6 composite
  • actions/upload-artifact v7 composite
  • peter-evans/create-or-update-comment v5 composite
  • peter-evans/find-comment v4 composite
cdk/earthdata-search/package.json npm
  • @types/jest ^29.5.14 development
  • @types/node 22.7.9 development
  • aws-cdk ^2.1129.0 development
  • esbuild ^0.24.2 development
  • jest ^29.7.0 development
  • ts-jest ^29.2.5 development
  • ts-node ^10.9.2 development
  • typescript ~5.6.3 development
  • @edsc/cdk-utils ^0.3.2
  • aws-cdk-lib ^2.260.0
  • constructs ^10.0.0
cdk/earthdata-search-static/package-lock.json npm
  • 366 dependencies
cdk/earthdata-search-static/package.json npm
  • @types/jest ^29.5.14 development
  • @types/node 22.7.9 development
  • aws-cdk ^2.1129.0 development
  • jest ^29.7.0 development
  • ts-jest ^29.2.5 development
  • ts-node ^10.9.2 development
  • typescript ~5.6.3 development
  • @edsc/cdk-utils ^0.3.2
  • aws-cdk-lib ^2.260.0
  • constructs ^10.0.0
serverless/src/geocoder/requirements.txt pypi
  • boto3 ==1.43.17
  • e84-geoai-common ==0.0.7
  • natural-language-geocoding ==0.1.3
docker-compose.yml docker
  • valkey/valkey latest
cdk/earthdata-search/package-lock.json npm
  • 434 dependencies
cdk/earthdata-search-infrastructure/package.json npm
  • @types/jest ^29.5.14 development
  • @types/node 22.7.9 development
  • aws-cdk ^2.1129.0 development
  • jest ^29.7.0 development
  • ts-jest ^29.2.5 development
  • ts-node ^10.9.2 development
  • typescript ~5.6.3 development
  • @edsc/cdk-utils ^0.3.2
  • aws-cdk-lib ^2.260.0
  • constructs ^10.0.0

Score: -Infinity