INCIDENT_ID. Unique identifier of the General Offense (GO) police report which documents the reported crime.
FIRST_OCCURENCE_DATE. The first possible date/time when the crime could have occurred.
LAST_OCCURENCE_DATA. The last possible date/time when the crime could have occurred.
ReportDate. The date when the General Offense report was taken.
Address. The location of the reported crime.
DISTRICT_ID. The police district where the reported crime occurred.
PRECINCT_ID. The police precinct where the reported crime occurred.
OFFENSE_CODE. The Uniform Crime Reporting (UCR) code.
OFENSE_TYPE_ID. Textual description of the UCR code.
OFFENSE_CATEGORY_ID. Aggregate category used for grouping similar crimes.
MJ_RELATION_TYPE. The type of relation to marijuana the reported crime after review.
Industry-related crimes involve marijuana and licensed marijuana facilities. These reported crimes are committed against the licensed industry or by the industry itself.
Non-Industry crimes are crimes reported where marijuana is the primary target in the commission of these crime but the marijuana has no readily apparent tie to a licensed operation.
Download the file, save as an excel worksheet.
Just to make life a bit easier delete
INCEDENT_ID
GEO_X
GEO_Y
The IF statement
=if(logical condition, then clause, else clause)
evaluate the boolean condition
If the condition is true execute the then clause
If the condition is not true execute the else clause
The values we put in the clauses can be
Constants
Other expressions
A simple example
Let's name K1:K1372 "Neighborhood"
Make a new worksheet
Extract the unique values in neighborhood.
Count the number of times each neighborhood had a reported incident.
Find the integer average of incidents per neighborhood =round(average(:))
Name this cell NeighborAvg
Add a column to the new table that prints a "Yes" if the negihborhood has a lower than average number of reports.
If we want, we can put a blank in a clause.
Add another column that just prints a yes if the value is high
For the above average neighborhoods, compute the number of standard deviations above the average that neighborhood is.
Compute the standard deviation of the entire set.
Call that NeighborSTD
If the answer in column D is Yes, (b?-NeighborAvg)/NeighborSTD
We could even do a nested if.
Add another column called Class
if the it is above average, put above
If it is the average, put average
If it is below the average, put below.
You will have to if, one inside one clause of the other.