* Minor documentation updates, plus calenvironscreen S3 URL fix * Update score comparison docs and code * Add steps for running the comparison tool * Update HUD recap ETL to ensure GEOID is imported as a string (if it is imported as an interger by default it will strip the beginning "0" from many IDs) * Add note about execution time * Move step from paragraph to list * Update output dir in README for comp tool Co-authored-by: Shelby Switzer <shelby.switzer@cms.hhs.gov>
4.8 KiB
Installing the Justice40 Tool
Required Software
You'll need the following set up in your environment before continuing to run the Justice40 Tool code.
- git, node, and an IDE
Install Git
MacOS
- Open the terminal and type
git
and hit RETURN. - If dev tools are not installed a window will prompt you to install dev tools.
- Open the terminal and type
git --version
and hit RETURN. - Validate that a version number is returned. If so, git is properly installed.
Win10
Download from website
Install Homebrew (MacOS only)
Homebrew is an easy way to manage software downloads on MacOS. You don't have to use it, but we recommend it.
- First, open your terminal and run
brew -v
to determine whether you have Homebrew installed. If you get a resopnse that looks something likeHomebrew 3.1.9
, you've already got it! If you get nothing back, or an error, continue. - Open the terminal and copy / paste this command and hit RETURN. Go through the prompts (you will need to grant
sudo
access).
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
- Validate installation by typing
brew -v
in the terminal and ensure a version number is shown.
Install Node using NVM
This will work for both MacOS and Win10. Follow instructions on this link. Be sure to read through the whole doc to find the sections within each step relevant to you (e.g. if you're using Homebrew, when you get to Step 2 look for the section, "Install NVM with Homebrew").
If you install NVM using Homebrew, make sure to read the output in terminal after you run brew install nvm
. You will need to add a few lines to your ~/.bash_profile and perhaps complete a couple other tasks.
Once you install NVM, don't forget to install Node! This is included in the linked tutorial above.
IDE set up
While any IDE can be used, we're outlining how to set up VS Code
- Open the terminal and type
brew install --cask visual-studio-code
and hit RETURN.- If this doesn't work or for Win10, you can download VS Code from the website.
- After forking this repo, you can clone your forked repo into VS Code
- VS Code with prompt you to "clone a repo"
- Open the terminal and navigate to
client
directory - Type
npm install
to load dependencies - Type
gatsby develop
to spin up the app - Navigate to
localhost:8000
to view the app
Recommended VS Code Extensions
Running the code
Once you have the required software installed and ready on your computer, you're ready to begin installing and running the Justice40 Tool code.
- Fork this repository and create a clone locally. In your terminal/CLI, in the directory you wish to put this project, run
git clone
plus the URL of your fork. - If you're using a Mac and Homebrew, go ahead and run
brew update
andbrew doctor
. It's always good to run these regularly to make sure your packages are up to date and in good condition.
Now, check out the next section on the organization of this repository to determine where to go next.
Repo organization
Our repo is organized into multiple directories (folders) to make it easier to work on and run different parts of the system independently.
The top level of the repo contains these directories, as well as project-wide documentation such as this INSTALLATION file, the README, LICENSE, CODE OF CONDUCT, etc.
There is also a docker-compose file that will eventually include everything you need to run every part of the application in one docker command; however, at the moment, this file only spins up the score creation part of our data pipeline.
Running the client
If you wish to check out our client-side code (i.e. the GatsbyJS statically generated website with the map), check out the client
directory and its README.
Running the backend
If you want to run the data pipeline with ETL and score generation, check out the data/data-pipeline
directory and its README.
Deployment
For core team contributors working on deployment, check out the infrastructure
directory and its README for information on deploying the backend to AWS.