Documentation ¶
Index ¶
Constants ¶
View Source
const ( ScraperName = "CALLS-FOR-SERVICE" CFS2011URL = "https://data.nola.gov/resource/28ec-c8d6.json" CFS2012URL = "https://data.nola.gov/resource/rv3g-ypg7.json" CFS2013URL = "https://data.nola.gov/resource/5fn8-vtui.json" CFS2014URL = "https://data.nola.gov/resource/jsyu-nz5r.json" CFS2015URL = "https://data.nola.gov/resource/w68y-xmk6.json" CFS2016URL = "https://data.nola.gov/resource/wgrp-d3ma.json" CFS2017URL = "https://data.nola.gov/resource/bqmt-f3jk.json" CFS2018URL = "https://data.nola.gov/resource/9san-ivhk.json" CFS2019URL = "https://data.nola.gov/resource/qf6q-pp4b.json" CFS2020URL = "https://data.nola.gov/resource/hp7u-i9hf.json" LimitPerPage = 1000 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CfsScraper ¶
type CfsScraper struct {
// contains filtered or unexported fields
}
func NewScraper ¶
func NewScraper() *CfsScraper
func (*CfsScraper) EnqueueJobs ¶
func (s *CfsScraper) EnqueueJobs() ([]infra.Job, error)
func (*CfsScraper) HandleResponse ¶
func (*CfsScraper) MakeRequest ¶
type JobMetadata ¶
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
func (*Repo) StoreCalls ¶
func (r *Repo) StoreCalls(calls []*ServiceCall) error
type ServiceCall ¶
type ServiceCall struct { NopdItem string `json:"nopd_item"` TypeText string `json:"typetext"` Priority string `json:"priority"` InitialType string `json:"initialtype"` InitialTypeText string `json:"initialtypetext"` InitialPriority string `json:"initialpriority"` MapX string `json:"mapx"` MapY string `json:"mapy"` TimeCreate ServiceTime `json:"timecreate"` TimeDispatch ServiceTime `json:"timedispatch"` TimeArrive ServiceTime `json:"timearrive"` TimeClosed ServiceTime `json:"timeclosed"` Disposition string `json:"disposition"` DispositionText string `json:"dispositiontext"` SelfInitiatedRaw string `json:"selfinitiated"` SelfInitiated bool Beat string `json:"beat"` BlockAddress string `json:"block_address"` Zip string `json:"zip"` PoliceDistrict string `json:"policedistrict"` LngLatPoint postgis.PointS Location struct { Latitude string `json:"latitude"` Longitude string `json:"longitude"` } `json:"location"` }
func (*ServiceCall) AfterParse ¶
func (c *ServiceCall) AfterParse()
type ServiceTime ¶
func (*ServiceTime) UnmarshalJSON ¶
func (m *ServiceTime) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.