Skip to content

Instantly share code, notes, and snippets.

@meshulam
Created June 28, 2017 01:18
Show Gist options
  • Save meshulam/43585c04d27789897610363af4ece5c2 to your computer and use it in GitHub Desktop.
Save meshulam/43585c04d27789897610363af4ece5c2 to your computer and use it in GitHub Desktop.
Example article for creating interactive location info UI
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>Chicago Justice Project - Data portal</title>
<link href="http://data.chicagojustice.org/site.css" rel="stylesheet" type="text/css" />
<link type="text/css" href="http://data.chicagojustice.org/css/custom-theme/jquery-ui-1.8.15.custom.css" rel="Stylesheet" />
<script type="text/javascript" src="http://data.chicagojustice.org/js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="http://data.chicagojustice.org/js/jquery-ui-1.8.15.custom.min.js"></script>
</head>
<body>
<div id="sidebar">
<p><b>Articles</b></p>
<ul>
<li><a href="/articles/">Articles</a></li>
</ul>
<p><b>Crime Reports</b></p>
<ul>
<li><a href="/crimereports/">Crime Reports</a></li>
</ul>
<p><b>Scraper Stats</b></p>
<ul>
<li><a href="/stats/totalCounts">Total Counts</a></li>
</ul>
<p><b>User</b></p>
<ul>
<li><a href="/user/logout/">Logout</a></li>
<li><a href="/user/manage/">Manage Users</a></li>
</ul>
</div>
<div id="content">
<h1>
Coding article: 35-year-old man charged with Lake View bank robbery
</h1>
<table class="crimeReportTable">
<tr>
<th class="crimeReportHead leftHead">Title</th>
<td class="crimeReportContent">35-year-old man charged with Lake View bank robbery</td>
</tr>
<tr>
<th class="crimeReportHead leftHead">Source</th>
<td class="crimeReportContent">Fox Chicago</td>
</tr>
<tr>
<th class="crimeReportHead leftHead">Coding</th>
<td class="crimeReportContent">
<form action="" method="post">
<input type='hidden' name='csrfmiddlewaretoken' value='D3X2QoSMmfWY4Nl5eFMfTmoN2pOKHfm3' />
<li><label for="id_relevant">Relevant:</label> <input checked="checked" id="id_relevant" name="relevant" type="checkbox" /></li>
<li><label for="id_categories_0">Categories:</label> <ul id="id_categories"><li>Crimes<ul id="id_categories_0"><li><label for="id_categories_0_0"><input id="id_categories_0_0" name="categories" type="checkbox" value="33" /> Arson (ARSN)</label></li>
<li><label for="id_categories_0_1"><input id="id_categories_0_1" name="categories" type="checkbox" value="34" /> Burlgary (BURG)</label></li>
<li><label for="id_categories_0_2"><input id="id_categories_0_2" name="categories" type="checkbox" value="9" /> Domestic Violence (DOMV)</label></li>
<li><label for="id_categories_0_3"><input checked="checked" id="id_categories_0_3" name="categories" type="checkbox" value="22" /> Drugs (DRUG)</label></li>
<li><label for="id_categories_0_4"><input id="id_categories_0_4" name="categories" type="checkbox" value="35" /> Driving Under the Influence (DUI)</label></li>
<li><label for="id_categories_0_5"><input id="id_categories_0_5" name="categories" type="checkbox" value="30" /> Environmental Crimes (ENVI)</label></li>
<li><label for="id_categories_0_6"><input id="id_categories_0_6" name="categories" type="checkbox" value="36" /> Fraud (FRUD)</label></li>
<li><label for="id_categories_0_7"><input id="id_categories_0_7" name="categories" type="checkbox" value="24" /> Gangs (GANG)</label></li>
<li><label for="id_categories_0_8"><input id="id_categories_0_8" name="categories" type="checkbox" value="14" /> GLBTQ (GLBTQ)</label></li>
<li><label for="id_categories_0_9"><input id="id_categories_0_9" name="categories" type="checkbox" value="13" /> Gun Violence (GUNV)</label></li>
<li><label for="id_categories_0_10"><input id="id_categories_0_10" name="categories" type="checkbox" value="26" /> Homicides (HOMI)</label></li>
<li><label for="id_categories_0_11"><input checked="checked" id="id_categories_0_11" name="categories" type="checkbox" value="37" /> Robbery (ROBB)</label></li>
<li><label for="id_categories_0_12"><input id="id_categories_0_12" name="categories" type="checkbox" value="10" /> Sexual Assault (SEXA)</label></li></ul></li>
<li>Justice Agencies / Agencies<ul id="id_categories_1"><li><label for="id_categories_1_0"><input id="id_categories_1_0" name="categories" type="checkbox" value="4" /> Cook County Circuit Court (CCCC)</label></li>
<li><label for="id_categories_1_1"><input id="id_categories_1_1" name="categories" type="checkbox" value="5" /> Cook County Jail (CCJ)</label></li>
<li><label for="id_categories_1_2"><input id="id_categories_1_2" name="categories" type="checkbox" value="6" /> Cook County Sheriff&#39;s Police (CCSP)</label></li>
<li><label for="id_categories_1_3"><input id="id_categories_1_3" name="categories" type="checkbox" value="39" /> Civilian Office for Police Accountability (COPA)</label></li>
<li><label for="id_categories_1_4"><input id="id_categories_1_4" name="categories" type="checkbox" value="28" /> Chicago Police Board (CPBD)</label></li>
<li><label for="id_categories_1_5"><input checked="checked" id="id_categories_1_5" name="categories" type="checkbox" value="2" /> Chicago Police Department (CPD)</label></li>
<li><label for="id_categories_1_6"><input id="id_categories_1_6" name="categories" type="checkbox" value="23" /> Chicago Public Schools (CPS)</label></li>
<li><label for="id_categories_1_7"><input id="id_categories_1_7" name="categories" type="checkbox" value="7" /> Cook County Public Defender&#39;s Office (CPUB)</label></li>
<li><label for="id_categories_1_8"><input id="id_categories_1_8" name="categories" type="checkbox" value="40" /> Deputy Inspector General for Police (DIGP)</label></li>
<li><label for="id_categories_1_9"><input id="id_categories_1_9" name="categories" type="checkbox" value="8" /> Illinois Department of Corrections (IDOC)</label></li>
<li><label for="id_categories_1_10"><input id="id_categories_1_10" name="categories" type="checkbox" value="32" /> Illinois State Court (ILSC)</label></li>
<li><label for="id_categories_1_11"><input id="id_categories_1_11" name="categories" type="checkbox" value="25" /> Illinois State Police (ILSP)</label></li>
<li><label for="id_categories_1_12"><input id="id_categories_1_12" name="categories" type="checkbox" value="27" /> Independent Police Review Authority (IPRA)</label></li>
<li><label for="id_categories_1_13"><input id="id_categories_1_13" name="categories" type="checkbox" value="1" /> Office of Emergency Management &amp; Communications (OEMC)</label></li>
<li><label for="id_categories_1_14"><input id="id_categories_1_14" name="categories" type="checkbox" value="3" /> Cook County State&#39;s Attorney&#39;s Office (SAO)</label></li></ul></li>
<li>Misc.<ul id="id_categories_2"><li><label for="id_categories_2_0"><input id="id_categories_2_0" name="categories" type="checkbox" value="21" /> Criminal Justice Policy (CPLY)</label></li>
<li><label for="id_categories_2_1"><input id="id_categories_2_1" name="categories" type="checkbox" value="29" /> Immigration (IMMG)</label></li>
<li><label for="id_categories_2_2"><input id="id_categories_2_2" name="categories" type="checkbox" value="15" /> Juvenile (JUVE)</label></li>
<li><label for="id_categories_2_3"><input id="id_categories_2_3" name="categories" type="checkbox" value="20" /> Parole (PARL)</label></li>
<li><label for="id_categories_2_4"><input id="id_categories_2_4" name="categories" type="checkbox" value="19" /> Probation (PROB)</label></li>
<li><label for="id_categories_2_5"><input id="id_categories_2_5" name="categories" type="checkbox" value="16" /> Re-Entry (REEN)</label></li>
<li><label for="id_categories_2_6"><input id="id_categories_2_6" name="categories" type="checkbox" value="31" /> Unspecified Crime (UNSPC)</label></li>
<li><label for="id_categories_2_7"><input id="id_categories_2_7" name="categories" type="checkbox" value="17" /> Violence (VIOL)</label></li></ul></li>
<li>Policing<ul id="id_categories_3"><li><label for="id_categories_3_0"><input id="id_categories_3_0" name="categories" type="checkbox" value="18" /> Beat Realignment / Police Resouce Allocation (BEAT)</label></li>
<li><label for="id_categories_3_1"><input id="id_categories_3_1" name="categories" type="checkbox" value="11" /> Police Brutality (POLB)</label></li>
<li><label for="id_categories_3_2"><input id="id_categories_3_2" name="categories" type="checkbox" value="12" /> Police Misconduct (POLM)</label></li>
<li><label for="id_categories_3_3"><input id="id_categories_3_3" name="categories" type="checkbox" value="38" /> Police Use of Taser (TASR)</label></li></ul></li></ul></li>
<input type="submit" value="Submit" />
</form>
</td>
</tr>
<tr>
<th class="crimeReportHead leftHead">Original Load Date</th>
<td class="crimeReportContent">May 1, 2017, 5:42 p.m.</td>
</tr>
</tr>
<th class="crimeReportHead leftHead">Last Updated</th>
<td class="crimeReportContent">May 1, 2017, 5:42 p.m.</td>
</tr>
</tr>
<th class="crimeReportHead leftHead">Original URL</th>
<td class="crimeReportContent"><a href="http://www.fox32chicago.com/news/crime/251973256-story">http://www.fox32chicago.com/news/crime/251973256-story</a></td>
</tr>
</tr>
<th class="crimeReportHead leftHead">Article Text</th>
<td class="crimeReportContent">
<div class="articleBody">
** CHICAGO (SUN TIMES MEDIA WIRE) ** \- A 35-year-old man was charged Thursday with robbing a Lake View bank branch on the North Side.
Michael Weimer was charged with the April 14 robbery of a TCF Bank branch
located within a Jewel-Osco store at 3531 N. Broadway, according to an FBI
complaint.
About 3:30 p.m, a robber walked up to a teller’s window with his his hood
covering his face and presented a note urging the teller to “say nothing” and
hand over money in large bills, the FBI said. He also directed the teller not to
include dye packs, which are used to foil bank robberies by remotely marking
stolen bills.
After receiving $3,260.06, the robber exited the branch, leaving behind the
demand note, at which point the teller told her manager that the branch had been
robbed and pointed out the culprit, the FBI said.
The manager followed the robber out of the Jewel-Osco store and watched him get
into an SUV taxi which drove north on Broadway, the FBI said. The manager wrote
down the license plate and reported it to Chicago Police, who tracked down the
taxi later that day.
The driver told police that he had picked up a white male on the east side of
Broadway Avenue at Cornelia Street, who was subsequently dropped off in the 3800
block of North Fremont Street, the FBI said.
On April 18, a woman who saw a news report about the bank robbery informed
police that she saw a man who fit the robber’s description walking northbound in
the 3900 block of Broadway Avenue, the FBI said.
Shortly after, Chicago Police tracked down Weimer at a BP gas station at 841
West Irving Park Rd., the FBI said. During an interview, Weimer told police he
had a hypodermic needle in his pocket. Following a search, he was also found
with multiple Xanax pills.
Weimer was taken into custody and charged with possession of a controlled
substance and possession of drug paraphernalia, the FBI said. During his arrest,
he told police that he was living at his girlfriend’s Lake View apartment.
Later that day, FBI agents interviewed Weimer’s girlfriend, who told them he had
showed up at her apartment building between 2 p.m. and 6 p.m. on April 14 and
threw an object at her window, the FBI said. Weimer then asked her to let him in
the back door, despite the fact he had a key for the front door. After entering
the apartment, Weimer removed a large amount of money from his pocket, including
several $100 and $20 bills.
After being shown a surveillance photo from the April 14 robbery, Weimer’s
girlfriend positively identified him as the robber, the FBI said
On April 19, the bank teller also positively identified Weimer from an array of
six photos, indicating she was 40 to 50 percent confident in her identification,
the FBI said.
The same robber is believed to be responsible for TCF branch robberies at 3:22
p.m. April 24 at 3570 N. Elston Ave. in Avondale, at 6:17 p.m. March 24 at 4355
N. Sheridan Rd. in Uptown and about noon March 30 at 2940 N. Ashland Ave. in
Lakeview.
</div>
</td>
</tr>
</table>
</div>
</body>
</html>
@meshulam
Copy link
Author

meshulam commented Jun 28, 2017

Example of location output - JSON-encoded array of location strings:

<input type="hidden" name="location_strings" value="[\"3531 N. Broadway\", \"3800
block of North Fremont Street\"]" />

Array of character indexes:

<input type="hidden" name="location_indexes" value="[[500,520], [1021,1096]]" />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment