Skip to content

Latest commit

 

History

History
157 lines (104 loc) · 3.84 KB

README.md

File metadata and controls

157 lines (104 loc) · 3.84 KB

SDOH Place - Metadata Manager

This is the metadata manager for the SDOH & Place Project, a new map-based search platform for SDOH data discovery that will curate and integrate validated geospatial data relevant to public health at multiple scales.

Preliminary Metadata Creation

Schema

We are using the Aardvark schema from OpenGeoMetadata (OGM) Aardvark Schema, along with some extra fields specifically for our needs. These fields are:

Custom metadata schema for this project:

  • Spatial Resolution (=tract, zip code, county)
  • Spatial Resolution Note
  • Data Variables
  • Methods Variables

Initial Discovery Datasets:

  • County Health Rankings
    • 2021 county (MK - Needs Review)
  • City Health Dashboard
    • 2018 census tract (Augustyn will Review - Add Placenames to Spatial Coverage)
  • Neighborhood Health Atlas (ADI)
    • 2015 block group (Sarthak - Needs Review)
    • 2020 block group (Sarthak - Needs Review)
  • SDOH Indices
    • 2014 census tract
  • Opportunity Index
    • most recent; census tract
    • most recent; county
  • Social Vulnerability Index

Contributors

  • Marynia Kolak
  • Sarthak Joshi
  • Augustyn Crane
  • Adam Cox
  • Mandela Gadri

Metadata Markdown Files

If you are looking for the Metadata or DataDictionary folders, these are now located in

MetadataManager/manager/metadata/

MetadataManager Flask App

Management Commands

Use flask [command] [subcommand] --help to see the specific arguments for each command. A general summary of usage for each command follows below.

Registry

flask registry index

Index a specific record (provide the id), or all records, into Solr. Use --clean to remove all existing documents from the Solr core before indexing (for a full refresh).

flask registry resave-records

Loads all records and then runs "save_data()" on each one, triggers whatever data cleaning is applied to each field.

flask registry bulk-update

Provides the capability of updating all instances of a specific value in a field with a new value (use with caution!).

Users

flask user create

Create a new user with their name, email, and password.

flask user reset-password

Sets the specified user's password to a random 6 character string.

flask user change-password

Update a user's password to the provided string.

Configure

cp ./flask/.env.example ./flask/.env

Required .env content:

SOLR_HOST: full url to Solr endpoint

Install/Run locally

A dev deploy will serve the app on Flask's default port (5000).

Create Python virtual environment:

python3 -m venv env
source ./env/bin/activate

Clone and install package

git clone https://github.com/healthyregions/SDOHPlace-MetadataManager
cd SDOHPlace-MetadataManager
pip install -e .

Run in debug mode:

flask --app MetadataManager.manager.app run --debug

--debug will auto-reload the app whenever a file is changed (though it seems like changes to HTML or CSS files may require the app to be stopped and restarted...).

To run as a background process with gunicorn, first set scripts to be executable:

sudo chmod +x ./scripts/*.sh

Then use

./scripts/start.sh
./scripts/stop.sh
./scripts/restart.sh

to control the application. A log will be created in ./scripts/.log.

Install/Run with Docker

The Docker deploy will serve the app on port 8080 with nginx.

Start containers

docker-compose up -d --build

Stop containers

docker-compose down