Giter Site home page Giter Site logo

sf_food_trucks's Introduction

Food Trucks

Repo | Issues | Production

This application is built on the data from sfgov to provide information about San Francisco food trucks and food carts.

Software Versions

This project uses asdf to manage Elixir, Erlang, and Node.js versions. After installing it, use asdf install from the root of this project.

External Dependencies

Environmenet Variables

  • GOOGLE_API_KEY - a Google API key with access to "Maps JavaScript API" API

Setup

To start your Phoenix server:

  • Run mix setup to install and setup dependencies
  • Start Phoenix endpoint with mix phx.server or inside IEx with iex -S mix phx.server

Now you can visit localhost:4000 from your browser.

Learn more

sf_food_trucks's People

Contributors

dependabot[bot] avatar dfalling avatar

Watchers

 avatar  avatar

sf_food_trucks's Issues

Create schema for data

Call the schema Facility / facilities, and the context Food.

  • rename fields to snake case.
  • use naive date time for time fields
  • convert enum fields to EnumType
  • change schema to TypedEctoSchema
  • remove the CUD views / routes

Generator

mix phx.gen.live Food Facility facilities location_id:integer applicant:string facility_type:string cnn:integer location_description:string address:string blocklot:string block:string lot:string permit:string status:string food_items:text x:float y:float latitude:float longitude:float schedule:text days_hours:text noi_sent:naive_datetime approved:naive_datetime received:naive_datetime prior_permit:boolean expiration_date:naive_datetime

Add field :geometry manually to the migration and schema, as the generator won't know what to do with that.

Schema

https://data.sfgov.org/Economy-and-Community/Mobile-Food-Facility-Permit/rqzj-sfat

Original Name Description Type Notes
locationid Location id of facility Number  
Applicant Name of permit holder Plain Text  
FacilityType Type of facilty permitted: truck or push cart Plain Text Change to EnumType
cnn CNN of street segment or intersection location Number  
LocationDescription Description of street segment or intersection location Plain Text  
Address Address Plain Text  
blocklot Block lot (parcel) number Plain Text
block Block number Plain Text  
lot Lot number Plain Text  
permit Permit number Plain Text  
Status Status of permit: Approved or Requested Plain Text  Change to EnumType
FoodItems A description of food items sold Plain Text  
X CA State Plane III Number  
Y CA State Plane III Number  
Latitude WGS84 Number  Use to create geometry field
Longitude WGS84 Number Use to create geometry field
Schedule URL link to Schedule for facility Plain Text  
dayshours abbreviated text of schedule Plain Text  
NOISent Date notice of intent sent Date & Time  
Approved Date permit approved by DPW Date & Time  
Received Date permit application received from applicant Plain Text  
PriorPermit prior existing permit with SFFD Number  
ExpirationDate Date permit expires Date & Time  
Location Location formatted for mapping Location OMIT
Original Data

Column Name | Description | Type
locationid | Location id of facility | Number |  
Applicant | Name of permit holder | Plain Text |  
FacilityType | Type of facilty permitted: truck or push cart | Plain Text |  
cnn | CNN of street segment or intersection location | Number |  
LocationDescription | Description of street segment or intersection location | Plain Text |  
Address | Address | Plain Text |  
blocklot | Block lot (parcel) number | Plain Text |  
block | Block number | Plain Text |  
lot | Lot number | Plain Text |  
permit | Permit number | Plain Text |  
Status | Status of permit: Approved or Requested | Plain Text |  
FoodItems | A description of food items sold | Plain Text |  
X | CA State Plane III | Number |  
Y | CA State Plane III | Number |  
Latitude | WGS84 | Number |  
Longitude | WGS84 | Number |  
Schedule | URL link to Schedule for facility | Plain Text |  
dayshours | abbreviated text of schedule | Plain Text |  
NOISent | Date notice of intent sent | Date & Time |  
Approved | Date permit approved by DPW | Date & Time |  
Received | Date permit application received from applicant | Plain Text |  
PriorPermit | prior existing permit with SFFD | Number |  
ExpirationDate | Date permit expires | Date & Time |  
Location | Location formatted for mapping | Location

Make map use full view

Currently the map view is pinned to h-96. In order to make it fill the height, it needs parent views that also fill the available height.

Create importer for CSV data

  • add the CSV data to the repo
  • add csv mix package
  • create function to read the CSV from a path variable and return a list of Trucks
  • create seed function to run the importer against the CSV file
  • add seed function to mix Ecto setup task

Add CI linting

  • read versions from .tool-versions
  • credo strict
  • mix format
  • mix audit
  • mix hex.audit
  • require checks to pass for CI

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.