Vaccinate The States has shut down as of August 2, 2021. Learn more β
Vaccinate The States is the web frontend for displaying vaccination sites across the US. It is static pages served with Jekyll
with vanilla JS on top. It consists of three main pages index.html
, embed.html
, and about-us.html
. These pages are powered by their respective js files in /webpack/pages
. The site supports the following query parameters:
zip={code}
zip code to center the maplat={lat}&lng={lng}
latitude and longitude values to center the mapzoom={level}
zoom level to start the map atpfizer=1
to display locations that provide Pfizerjj=1
to display locations that provide J&Jmoderna=1
to display locations that provide Modernaunknown=1
to display locations with unknown vaccine type
- Install Homebrew if you don't already have it
brew install ruby-install chruby
- Source the
chruby.sh
andauto.sh
scripts from chruby in~/.zshrc
or~/.bashrc
.brew info chruby
for details. If chruby was installed user locally, that would like this:
source /usr/local/share/chruby/chruby.sh
source /usr/local/share/chruby/auto.sh
ruby-install ruby 2.7.2
- Install nvm if you don't already have it
nvm install 15.8.0
nvm use 15.8.0
script/server
- Download and run rubyinstaller-2.7.2-1-x64.exe
- Install nvm if you don't already have it
nvm install 15.8.0
nvm use 15.8.0
script\server.ps1
- jekyll is a Ruby-based static site generator. It is easy to pick up if you've worked in Ruby before.
- You'll see Liquid templating used a lot.
- Jeykll starts on localhost:4000 by default.
- You will need to restart the Jekyll process when the config file changes; that is the only time you need to restart it most of the time. (Other occasions include adding collections, etc, which you'll be doing extremely infrequently.)
The linter - Prettier - runs on every PR automatically. If you'd like to run it locally, run npm install
once to set up npm and then npm run lint:fix
to run the linter.
Data gets published to Mapbox via Vial
on a regular cadence during business hours. We then provide Mapbox a recipe that determines what data gets displayed on the
map in mts/recipe.json
. If we want to add more data to the map, we have to 1) update the mapbox export in VIAL to
provide that data, 2) update the recipe to display that data on vialLow
(zoomed out) or vialHigh
(zoomed in), and 3)
then publish the recipe via export MAPBOX_TOKEN="TOKEN_HERE" && script/publish_mts_recipe
. Once the recipe is published,
the map will be updated with the new properties on the next regular VIAL mapbox export.