tnederlof / weatherscout

A full-stack web application written in Elixir powered by the Phoenix framework to allow users to explore climate data across the United States.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The Weather Scout

Overview

Imagine you have a trip coming up. What gear should you prepare? How should you plan your itinerary? Trip planning largely depends on what the weather could bring. The Weather Scout allows for easy exploration of US historical weather data. Have fun exploring!

This repo contains the following components:

  • Frontend code - Phoenix html.eex files, tailwindcss styling, javascript based chart components and mapbox gl based map component.
  • Backend code - Elixir code using the Phoenix web framework
  • Database seeds - Example data seed files for development

See can see the code in action at: https://www.theweatherscout.com. To deploy this code some API Keys are required and a PostgreSQL databased must be configured and loaded with NOAA normals weather data.

Note: The data used in this site is based on historical weather data and is NOT a prediction of future weather patterns, please check a short-term forcast at weather.gov before heading out on a trip.

Background

Every ten years NOAA creates a climate dataset based on the past 30 years of historical data. Despite containing valuable information, the current access tools are challenging to use, which prevents easy exploration. This Elixir powered Phoenix based web application combines an interactive map with a powerful location search tool, the NOAA Climate Normals dataset and some prediction techniques to create a rich exploration of what temperatures might be at any location in the United States at different points throughout the year.

Configuration

Three API keys will need to be registered as described below:

You will need to create a releases.exs file with the following contents.

import Config

config :weather_scout,
  mapbox_api_key: "MAPBOXAPIKEYGOESHERE"

config :weather_scout, WeatherScout.Mailer,
  adapter: Swoosh.Adapters.Sendgrid,
  api_key: "SENDGRIDAPIKEYGOESHERE"

config :virtual_earth_elevation,
  api_key: "BINGMAPSAPIKEYGOESHERE"

You will need to set the Mapbox API Token in the frontend code here.

You will need to set your secret key base in the config.exs file.

You will need to set the following environment variables in the production environment.

  • DATABASE_URL
  • SECRET_KEY_BASE

There are many different ways to host a Phoenix application but my recommendation is to use Render.com.

There are seed data files to create a sample database included in this repo. The full NOAA climate normals dataset is quite large. You can access the data via their ftp site here.

About

A full-stack web application written in Elixir powered by the Phoenix framework to allow users to explore climate data across the United States.


Languages

Language:Elixir 56.7%Language:HTML 30.9%Language:JavaScript 11.6%Language:CSS 0.6%Language:Shell 0.1%Language:SCSS 0.1%