Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Codes = aspect.Table("offense_codes", aspect.Column("id", aspect.String{PrimaryKey: true}), aspect.Column("code", aspect.Integer{}), aspect.Column("extension", aspect.Integer{}), aspect.Column("description", aspect.String{}), aspect.Column("category", aspect.String{}), aspect.Column("is_crime", aspect.Boolean{}), aspect.Column("is_traffic", aspect.Boolean{}), )
Functions ¶
func ParseCrimeCSV ¶
func ParseOffenseCodesCSV ¶
Types ¶
type Code ¶
type Code struct { ID string `json:"id"` Code int64 `json:"code"` Extension int64 `json:"extension"` Description string `json:"description"` Category string `json:"category"` IsCrime bool `json:"is_crime"` IsTraffic bool `json:"is_traffic"` }
func ConvertRawCode ¶
func ConvertRawCode(raw rawCode) (code Code)
func ConvertRawCodes ¶
func ConvertRawCodes(raws []rawCode) []Code
type CodesAPI ¶
type CodesAPI struct {
// contains filtered or unexported fields
}
func NewCodesAPI ¶
type Crime ¶
type Crime struct { IncidentID int64 `json:"incident_id"` OffenseID int64 `json:""` CodeID string `json:"code_id"` Code int64 `json:"code"` CodeExt int64 `json:"code_extension"` Type string `json:"type"` Category string `json:"category"` FirstOccurrence time.Time `json:"first_occurrence"` LastOccurrence *time.Time `json:"last_occurrence"` Reported time.Time `json:"reported"` Address string `json:"address"` Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` District int64 `json:"district"` Precinct int64 `json:"precinct"` Neighborhood string `json:"neighborhood"` }
func ConvertRawCrime ¶
func ConvertRawCrimes ¶
Click to show internal directories.
Click to hide internal directories.