<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SpatialKey blog &#187; San Francisco</title>
	<atom:link href="http://blog.spatialkey.com/category/san-francisco/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.spatialkey.com</link>
	<description>Geotemporal visualization: theory + solutions</description>
	<lastBuildDate>Wed, 30 Jun 2010 12:58:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Building Permit Data from DataSF</title>
		<link>http://blog.spatialkey.com/2009/11/building-permit-data-from-datasf/</link>
		<comments>http://blog.spatialkey.com/2009/11/building-permit-data-from-datasf/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 19:45:47 +0000</pubDate>
		<dc:creator>Doug McCune</dc:creator>
				<category><![CDATA[DataSF]]></category>
		<category><![CDATA[San Francisco]]></category>
		<category><![CDATA[examples]]></category>

		<guid isPermaLink="false">http://blog.spatialkey.com/?p=583</guid>
		<description><![CDATA[Another dataset that the city of San Francisco makes publicly available is the Department of Building Inspection&#8217;s monthly permit report. This report contains all the building permit activity within the city, from permits to add new condos to inspections of sprinkler systems. We took one full year of data, from September 2008 to August 2009, [...]]]></description>
			<content:encoded><![CDATA[<p>A<img class="size-full wp-image-607 alignright" style="border: 0pt none; margin-left: 5px; margin-right: 5px;" title="sf_permits_count" src="http://blog.spatialkey.com/wp-content/uploads/2009/11/sf_permits_count.jpg" alt="sf_permits_count" width="257" height="352" />nother dataset that the city of San Francisco makes publicly available is the Department of Building Inspection&#8217;s monthly permit report. This report contains all the building permit activity within the city, from permits to add new condos to inspections of sprinkler systems. We took one full year of data, from September 2008 to August 2009, and brought it into SpatialKey. During the selected year-long time period there were over 25,000 permits issued. We can see the breakdown by the type of building on the right. Residential housing takes the top three spots (divided into Apartments, and one and two family homes).</p>
<p>We mapped the concentration of where these permits were issued. The different types of buildings, such as apartments versus office buildings, have very different distributions throughout the city. Some of these distributions are expected, such as the high concentration of permits for offices in the downtown area of San Francsico. But some of the distributions are more interesting and tell a story about the urban makeup of the city. Notice that apartments are much more concentrated closer to downtown in neighborhoods like the Tenderloin, Nob Hill, and Hayes Valley, most heavily around the eastern and northern areas surrounding the financial district. Two-family homes (ie duplexes) have a different concentration that includes neighborhoods like Cow Hollow and the Mission. And one-family homes are in neighborhoods like Pacific Heights, Noe Valley, and Twin Peaks.<br style="clear:both;" /><br />
The maps here show the number of building permits by the type of building.</p>
<p><img class="alignnone size-full wp-image-592" title="sf_building_permist_offices_small" src="http://blog.spatialkey.com/wp-content/uploads/2009/11/sf_building_permist_offices_small.jpg" alt="sf_building_permist_offices_small" width="300" height="253" /><img class="alignnone size-full wp-image-591" style="margin-left: 5px; margin-right: 5px;" title="sf_building_permist_apartments_small" src="http://blog.spatialkey.com/wp-content/uploads/2009/11/sf_building_permist_apartments_small.jpg" alt="sf_building_permist_apartments_small" width="300" height="253" /><br />
<img class="alignnone size-full wp-image-590" title="sf_building_permits_2familyhomes_small" src="http://blog.spatialkey.com/wp-content/uploads/2009/11/sf_building_permits_2familyhomes_small.jpg" alt="sf_building_permits_2familyhomes_small" width="300" height="251" /><img class="alignnone size-full wp-image-589" style="margin-left: 5px; margin-right: 5px;" title="sf_building_permits_1familyhomes_small" src="http://blog.spatialkey.com/wp-content/uploads/2009/11/sf_building_permits_1familyhomes_small.jpg" alt="sf_building_permits_1familyhomes_small" width="300" height="252" /></p>
<p>Here are some alternate screenshots that are at a more granular resolution, so you can see a bit more detail on the different areas of the city. Click each thumbnail for a much larger version:</p>
<p><a href="http://blog.spatialkey.com/wp-content/uploads/2009/11/sf_permits_offices_largerainbow.jpg"><img class="alignnone size-full wp-image-584" title="sf_permits_offices_smallrainbow" src="http://blog.spatialkey.com/wp-content/uploads/2009/11/sf_permits_offices_smallrainbow.jpg" alt="sf_permits_offices_smallrainbow" width="150" height="124" /></a><a href="http://blog.spatialkey.com/wp-content/uploads/2009/11/sf_permits_apartments_largerainbow.jpg"><img class="alignnone size-full wp-image-585" title="sf_permits_apartments_smallrainbow" src="http://blog.spatialkey.com/wp-content/uploads/2009/11/sf_permits_apartments_smallrainbow.jpg" alt="sf_permits_apartments_smallrainbow" width="150" height="124" /></a><a href="http://blog.spatialkey.com/wp-content/uploads/2009/11/sf_permits_twofamily_largerainbow.jpg"><img class="alignnone size-full wp-image-586" title="sf_permits_twofamily_smallrainbow" src="http://blog.spatialkey.com/wp-content/uploads/2009/11/sf_permits_twofamily_smallrainbow.jpg" alt="sf_permits_twofamily_smallrainbow" width="150" height="124" /></a><a href="http://blog.spatialkey.com/wp-content/uploads/2009/11/sf_permits_onefamily_largerainbow.jpg"><img class="alignnone size-full wp-image-587" title="sf_permits_onefamily_smallrainbow" src="http://blog.spatialkey.com/wp-content/uploads/2009/11/sf_permits_onefamily_smallrainbow.jpg" alt="sf_permits_onefamily_smallrainbow" width="150" height="124" /></a></p>
<h3 style="text-align: left;">Try it for yourself</h3>
<p>You can open up the sample report that we created to visualize these building permits.  The report will load with two layers: the building permits and the neighborhood boundaries of San Francisco. You can change which types of building permits are shown by selecting items in the &#8220;Proposed Use&#8221; filter pod that is open in the report.</p>
<ul>
<li><a href="http://tinyurl.com/yfez54b" class="try-btn" onclick="pageTracker._trackPageview('/outgoing/tinyurl.com/yfez54b?referer=');">Try Sample Report</a></li>
</ul>
<p>Looking for easy-to-use location intelligence from your own data?  <a href="http://spatialkey.com/signup/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/spatialkey.com/signup/?referer=');">Get started with our free trial</a>, and start visualizing your data in minutes without installing any software.</p>
<h3>Notes on the data</h3>
<p>It&#8217;s always important to remember what data we&#8217;re looking at. This is the number of building permits issued between September 2008 and August 2009. A single building might have multiple permits issued, which could be everything from renovations or re-roofing to a change from residential to commercial, etc.</p>
<p>This is the third part of an ongoing exploration of publicly accessible San Francisco data from <a onclick="pageTracker._trackPageview('/outgoing/datasf.org/?referer=');pageTracker._trackPageview('/outgoing/datasf.org?referer=http://blog.spatialkey.com/');" href="http://datasf.org/">DataSF.org</a>. Please see the <a href="../category/datasf/">other posts in the series</a>.</p>
<p>The images and reports in this post were created with publicly accessible data. We have no association with the city of San Francisco (but we’d love to, so <a onclick="pageTracker._trackPageview('/outgoing/spatialkey.com/contactcf/general.cfm?type=sales&amp;referer=');pageTracker._trackPageview('/outgoing/spatialkey.com/contactcf/general.cfm?type=sales&amp;referer=http://blog.spatialkey.com/');" href="http://spatialkey.com/contactcf/general.cfm?type=sales">contact us</a> if you’re from the San Francisco government and want to use SpatialKey).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.spatialkey.com/2009/11/building-permit-data-from-datasf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crime in San Francisco&#8217;s Urban Renewal Area</title>
		<link>http://blog.spatialkey.com/2009/10/crime-in-san-franciscos-urban-renewal-area/</link>
		<comments>http://blog.spatialkey.com/2009/10/crime-in-san-franciscos-urban-renewal-area/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 16:17:03 +0000</pubDate>
		<dc:creator>Doug McCune</dc:creator>
				<category><![CDATA[DataSF]]></category>
		<category><![CDATA[Law Enforcement]]></category>
		<category><![CDATA[San Francisco]]></category>
		<category><![CDATA[examples]]></category>
		<category><![CDATA[mapping]]></category>
		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://blog.spatialkey.com/?p=345</guid>
		<description><![CDATA[We&#8217;ve been using SpatialKey to look at San Francisco data downloaded from DataSF.org. There are mountains of interesting data available for San Francisco, but the crime data from the SFPD is one of the most interesting datasets. When you load in the crime data you instantly see some powerful images, which show the intense concentration [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve been using <a href="http://spatialkey.com" onclick="pageTracker._trackPageview('/outgoing/spatialkey.com?referer=');">SpatialKey</a> to look at San Francisco data downloaded from <a href="http://datasf.org" onclick="pageTracker._trackPageview('/outgoing/datasf.org?referer=');">DataSF.org</a>. There are mountains of interesting data available for San Francisco, but the crime data from the SFPD is one of the most interesting datasets. When you load in the crime data you instantly see some powerful images, which show the intense concentration of crime in certain areas of San Francisco.</p>
<p><a href="http://blog.spatialkey.com/wp-content/uploads/2009/09/spatialkey_sfpd_urban_renewal_1_large.jpg"><img class="alignnone size-full wp-image-361" title="spatialkey_sfpd_urban_renewal_1" src="http://blog.spatialkey.com/wp-content/uploads/2009/09/spatialkey_sfpd_urban_renewal_1.jpg" alt="spatialkey_sfpd_urban_renewal_1" width="600" height="399" /></a></p>
<p>It&#8217;s amazing to see how concentrated this data is around the Tenderloin and a few other areas (along Mission St near 16th also has a high concentration). Take a moment and look at the image above (click to get a larger view). If you were to draw a line around the worst parts of San Francisco what would that shape look like? Maybe something like this?</p>
<p><a href="http://blog.spatialkey.com/wp-content/uploads/2009/09/spatialkey_sfpd_urban_renewal_2_large.jpg"><img class="alignnone size-full wp-image-360" title="spatialkey_sfpd_urban_renewal_2" src="http://blog.spatialkey.com/wp-content/uploads/2009/09/spatialkey_sfpd_urban_renewal_2.jpg" alt="spatialkey_sfpd_urban_renewal_2" width="600" height="419" /></a></p>
<p>What&#8217;s amazing is that this shape was drawn by the city when they defined an &#8220;Urban Renewal Area.&#8221; The shape is available to download from the <a href="http://gispub02.sfgov.org/website/sfshare/index2.asp" onclick="pageTracker._trackPageview('/outgoing/gispub02.sfgov.org/website/sfshare/index2.asp?referer=');">city&#8217;s GIS catalog</a>. That <a href="http://www.hud.gov/offices/cpd/economicdevelopment/programs/rc/tour/ca/sanfrancisco/" onclick="pageTracker._trackPageview('/outgoing/www.hud.gov/offices/cpd/economicdevelopment/programs/rc/tour/ca/sanfrancisco/?referer=');">shape was defined in 2002</a> as part of a federal <a href="http://www.hud.gov/offices/cpd/economicdevelopment/programs/rc/" onclick="pageTracker._trackPageview('/outgoing/www.hud.gov/offices/cpd/economicdevelopment/programs/rc/?referer=');">Housing and Urban Development (HUD) program</a>. One of the key goals in targeting that areas was to reduce crime. The following paragraph defines one of the <a href="http://www.hud.gov/offices/cpd/economicdevelopment/programs/rc/tour/ca/sanfrancisco/appsummary.pdf" onclick="pageTracker._trackPageview('/outgoing/www.hud.gov/offices/cpd/economicdevelopment/programs/rc/tour/ca/sanfrancisco/appsummary.pdf?referer=');">five stated goals</a> when the area was defined:</p>
<blockquote><p><span style="text-decoration: underline;">Reducing Crime </span><br />
The City of San Francisco has a crime reduction strategy that is a multi-layered approach addressing: general crime prevention education; programs targeting at-risk youth (prevention); diversion programs; programs targeting incarcerated individuals to reduce recidivism; and post-incarceration programs to reduce recidivism.</p></blockquote>
<p>That was almost 8 years ago, but the crime data in the image above is as recent as last week. There are of course many ways to interpret this data. It could indicate that the city is not making much progress reducing drug crimes within the Urban Renewal Area. Or it could mean that the city is actively targeting the area (which will lead to higher arrests) and that the indication of higher concentrations in the Urban Development Area is a good thing.</p>
<h3>Comparing the Urban Renewal Area to the rest of SF</h3>
<p>To put things in perspective we can compare the crime within the Urban Renewal Area with all the crime outside of the area. The image below shows the map filtered to include only crimes within the Urban Renewal Area. The report includes the total count of crimes within that area, as well as the total count of crimes in the city as a whole (including the area).</p>
<p><a href="http://blog.spatialkey.com/wp-content/uploads/2009/09/spatialkey_sfpd_urban_renewal_3_large.jpg"><img class="alignnone size-full wp-image-359" title="spatialkey_sfpd_urban_renewal_3" src="http://blog.spatialkey.com/wp-content/uploads/2009/09/spatialkey_sfpd_urban_renewal_3.jpg" alt="spatialkey_sfpd_urban_renewal_3" width="600" height="420" /></a></p>
<p>We can see that in the entire city there were 14,653 crimes. Out of those crimes, 4,291 occurred in the Urban Renewal Area.</p>
<h3 style="text-align: center;"><strong>29% of all crime in SF occurs in the Urban Renewal Area</strong></h3>
<p>The above statistic is for all types of crime (of which theft is the most common in the city overall). We can see by the distribution by crime type that there&#8217;s a difference in the ranking between the city as a whole and the Urban Renewal Area. Inside the Urban Renewal Area, narcotics crimes are the number one crime type (versus theft in SF as a whole). The report is even more interesting when we filter to only look at drug crimes:</p>
<p><a href="http://blog.spatialkey.com/wp-content/uploads/2009/09/spatialkey_sfpd_urban_renewal_4_large.jpg"><img class="alignnone size-full wp-image-358" title="spatialkey_sfpd_urban_renewal_4" src="http://blog.spatialkey.com/wp-content/uploads/2009/09/spatialkey_sfpd_urban_renewal_4.jpg" alt="spatialkey_sfpd_urban_renewal_4" width="600" height="420" /></a></p>
<p>Out of 2,673 total drug crimes, 1,875 occur in the Urban Renewal Area.</p>
<h3 style="text-align: center;"><strong>70% of all narcotics crimes occur in the Urban Renewal Area</strong></h3>
<p>Again, please keep in mind that the data only shows where the police are arresting people (see notes section below). And this is only one slice of time, from July 25 to September 20, so we don&#8217;t have the previous historical data to see any kinds of long term historical trends.</p>
<h3>Try it for yourself</h3>
<p>You can open up the sample report that we created to visualize these crimes. The report loads with the crime data on the map filtered to only include drug crimes within the Urban Renewal Area. It also includes another instance of the same crime dataset loaded in (but not shown on the map). That second dataset is used to show the total count of all crimes in San Francisco as well as the distribution by type of crime for the entire dataset.</p>
<ul>
<li><a class="try-btn" href="http://tinyurl.com/ydums2x" onclick="pageTracker._trackPageview('/outgoing/tinyurl.com/ydums2x?referer=');">Try Sample Report</a></li>
</ul>
<h3>Notes on the data</h3>
<p>The police department provides a feed of the <a href="http://apps.sfgov.org/datafiles/index.php?dir=Police" onclick="pageTracker._trackPageview('/outgoing/apps.sfgov.org/datafiles/index.php?dir=Police&amp;referer=');">last 90 days of crime incidents as a shapefile</a>. The dataset used in the article was downloaded on September 21, 2009 and includes crime records from June 25, 2009 to September 20, 2009. Additionally, the <a href="http://gispub02.sfgov.org/website/sfshare/index2.asp" onclick="pageTracker._trackPageview('/outgoing/gispub02.sfgov.org/website/sfshare/index2.asp?referer=');">city&#8217;s GIS department</a> provides the shapefile for the Urban Renewal Area.</p>
<p>It is important to note that this is data of active police activity (ie arrests, citations). This means it is not a comprehensive dataset of where crime occurs. This is data about where the SFPD is arresting people. This is an important distinction to keep in mind. An increase in the number of arrests in a certain area may very well be a very good thing indicating that the police are focusing on certain problematic areas, not necessarily that actual crime in those areas is on the rise.</p>
<p>This is the second part of an ongoing exploration of publicly accessible San Francisco data from <a href="http://datasf.org" onclick="pageTracker._trackPageview('/outgoing/datasf.org?referer=');">DataSF.org</a>. Please see the <a href="http://blog.spatialkey.com/category/datasf/">other posts in the series</a>.</p>
<p>The images and reports in this post were created with publicly accessible data. We have no association with the San Francisco police department (but we&#8217;d love to, so <a href="http://spatialkey.com/contactcf/general.cfm?type=sales" onclick="pageTracker._trackPageview('/outgoing/spatialkey.com/contactcf/general.cfm?type=sales&amp;referer=');">contact us</a> if you&#8217;re from the SFPD and want to use SpatialKey).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.spatialkey.com/2009/10/crime-in-san-franciscos-urban-renewal-area/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Visualizing SFPD&#8217;s &#8220;Operation Safe Schools&#8221;</title>
		<link>http://blog.spatialkey.com/2009/09/visualizing-sfpds-operation-safe-schools/</link>
		<comments>http://blog.spatialkey.com/2009/09/visualizing-sfpds-operation-safe-schools/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 15:35:33 +0000</pubDate>
		<dc:creator>Doug McCune</dc:creator>
				<category><![CDATA[DataSF]]></category>
		<category><![CDATA[Law Enforcement]]></category>
		<category><![CDATA[San Francisco]]></category>
		<category><![CDATA[examples]]></category>
		<category><![CDATA[mapping]]></category>
		<category><![CDATA[solutions]]></category>
		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://blog.spatialkey.com/?p=294</guid>
		<description><![CDATA[The San Francisco Police Department has recently launched a new initiative to fight drug dealing near schools. As outlined in this article in the San Francisco Chronicle last Thursday, the police department is targeting drug dealers within 1,000 feet of San Francisco schools who are dealing heroin, crack, or methamphetamine during school hours. These particular [...]]]></description>
			<content:encoded><![CDATA[<p>The San Francisco Police Department has recently launched a new initiative to fight drug dealing near schools. As outlined in <a href="http://www.sfgate.com/cgi-bin/article.cgi?f=/c/a/2009/09/24/MNCI19PAOK.DTL" onclick="pageTracker._trackPageview('/outgoing/www.sfgate.com/cgi-bin/article.cgi?f=/c/a/2009/09/24/MNCI19PAOK.DTL&amp;referer=');">this article in the San Francisco Chronicle</a> last Thursday, the police department is targeting drug dealers within 1,000 feet of San Francisco schools who are dealing heroin, crack, or methamphetamine during school hours. These particular drug offenses violate the &#8220;<a href="http://www.leginfo.ca.gov/cgi-bin/displaycode?section=hsc&amp;group=11001-12000&amp;file=11350-11356.5" onclick="pageTracker._trackPageview('/outgoing/www.leginfo.ca.gov/cgi-bin/displaycode?section=hsc_amp_group=11001-12000_amp_file=11350-11356.5&amp;referer=');">Juvenile Drug Trafficking and Schoolyard Act of 1988</a>&#8221; and can add two to three years to the offender&#8217;s prison sentence.</p>
<p>The following video walks through how quickly we were able to use <a title="SpatialKey" href="http://spatialkey.com" onclick="pageTracker._trackPageview('/outgoing/spatialkey.com?referer=');">SpatialKey</a> to filter down over 14,000 crime records from the past 90 days to isolate these exact drug crimes. By the end of this short 5-minute video we produce a list of the schools that have these particular narcotics incidents near them. This is an example of using the powerful proximity filtering in SpatialKey to filter one dataset by buffering around another, as well as filtering by type of crime, day of week, and hour of day.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/_WKaoH7EluM&amp;hl=en&amp;fs=1&amp;rel=0&#038;amp" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="385" src="http://www.youtube.com/v/_WKaoH7EluM&amp;hl=en&amp;fs=1&amp;rel=0&#038;amp" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<h3>Data sources</h3>
<p>Both the crime data and the school locations were downloaded from San Francisco&#8217;s new data warehousing website: <a href="http://datasf.org" onclick="pageTracker._trackPageview('/outgoing/datasf.org?referer=');">datasf.org</a>. The police department provides a feed of the <a href="http://apps.sfgov.org/datafiles/index.php?dir=Police" onclick="pageTracker._trackPageview('/outgoing/apps.sfgov.org/datafiles/index.php?dir=Police&amp;referer=');">last 90 days of crime incidents as a shapefile</a>. The dataset used in the video was downloaded on September 21, 2009 and includes crime records from June 25, 2009 to September 20, 2009. Additionally, the <a href="http://gispub02.sfgov.org/website/sfshare/index2.asp" onclick="pageTracker._trackPageview('/outgoing/gispub02.sfgov.org/website/sfshare/index2.asp?referer=');">city&#8217;s GIS department</a> provides the files for the locations of all the private and public schools in San Francisco (both as shapes and as points).</p>
<h3>How we did it: step-by-step</h3>
<p>I&#8217;ll walk through a visual explanation of how we filtered down the 14,653 crimes. These steps are the ones you see performed in the video. You can click each screenshot thumbnail on the right to view the full screenshot.</p>
<h4>Step 1: Load in the crime data</h4>
<p><a href="http://blog.spatialkey.com/wp-content/uploads/2009/09/spatialkey_sfpd_crime_1.jpg"><img class="alignright size-full wp-image-316" style="margin-left:5px;" title="spatialkey_sfpd_crime_thumb1" src="http://blog.spatialkey.com/wp-content/uploads/2009/09/spatialkey_sfpd_crime_thumb1.jpg" alt="spatialkey_sfpd_crime_thumb1" width="250" height="185" /></a>We imported the shapefile that we downloaded from the SFPD&#8217;s website into SpatialKey and opened a new full-screen map template. This initial map shows all 14,653 incidents. The heatmap shows the distribution of crimes in the city. It is very clear that the most crime activity occurs downtown.<br />
<br style="clear:both" /></p>
<h4>Step 2: Buffer around the schools</h4>
<p><a href="http://blog.spatialkey.com/wp-content/uploads/2009/09/spatialkey_sfpd_crime_4.jpg"><img class="alignright size-full wp-image-315" style="margin-left:5px;" title="spatialkey_sfpd_crime_thumb3" src="http://blog.spatialkey.com/wp-content/uploads/2009/09/spatialkey_sfpd_crime_thumb3.jpg" alt="spatialkey_sfpd_crime_thumb3" width="250" height="185" /></a>We then brought in our second dataset, which was the shapes of all the public and private schools in San Francisco. We used the Proximity Filter capabilities of SpatialKey to create a 1,000 foot buffer around each school and only include the crimes within that buffer. You can see the filter in action and how it removed all the crimes that are not near schools. This filtered out approximately 6,000 crimes and brought our total count down to 8,417.<br />
<br style="clear:both" /></p>
<h4>Step 3: Only show drug crimes</h4>
<p><a href="http://blog.spatialkey.com/wp-content/uploads/2009/09/spatialkey_sfpd_crime_6.jpg"><img class="alignright size-full wp-image-314" style="margin-left:5px;" title="spatialkey_sfpd_crime_thumb4" src="http://blog.spatialkey.com/wp-content/uploads/2009/09/spatialkey_sfpd_crime_thumb4.jpg" alt="spatialkey_sfpd_crime_thumb4" width="250" height="185" /></a>Since we were only interested in narcotics crimes, we opened up a pod to show the type of crime (this was a field called &#8220;Category&#8221; in the data provided by the SFPD). We filtered out all crimes except &#8220;Drug/Narcotics,&#8221; which left only 1,849 crimes.<br />
<br style="clear:both" /></p>
<h4>Step 4: Filter by day of week and hour of day</h4>
<p><a href="http://blog.spatialkey.com/wp-content/uploads/2009/09/spatialkey_sfpd_crime_7.jpg"><img class="alignright size-full wp-image-312" style="margin-left:5px;" title="spatialkey_sfpd_crime_thumb5" src="http://blog.spatialkey.com/wp-content/uploads/2009/09/spatialkey_sfpd_crime_thumb5.jpg" alt="spatialkey_sfpd_crime_thumb5" width="250" height="185" /></a>Then we filtered by Day of Week to only include crimes occurring Monday through Friday. We also opened up a histogram showing the distribution by hour of day and we selected a range from 7 am to 4 pm. This is an approximation of school hours. Obviously all schools will have slightly different exact hours of operation.<br />
<br style="clear:both" /></p>
<h4>Step 5: Only show heroin/crack/meth</h4>
<p><a href="http://blog.spatialkey.com/wp-content/uploads/2009/09/spatialkey_sfpd_crime_8.jpg"><img class="alignright size-full wp-image-311" style="margin-left:5px;" title="spatialkey_sfpd_crime_thumb6" src="http://blog.spatialkey.com/wp-content/uploads/2009/09/spatialkey_sfpd_crime_thumb6.jpg" alt="spatialkey_sfpd_crime_thumb6" width="250" height="185" /></a>The Juvenile Drug Trafficking and Schoolyard Act is specifically for certain types of drug crimes, so we needed to filter out the other drug crimes that we weren&#8217;t interested in. Luckily, the SFPD provides a field in the dataset called &#8220;Description&#8221; that provides more granular detail about the type of crime, including what type of drug was involved. We filtered out any crimes that did not include the sale of heroin, crack cocaine, and methamphetamine. This brought our total dataset down to 166 crimes.</p>
<p>So in literally under 4 minutes we were able to go from over 14,000 crimes to a very targeted list of 166 and from 243 schools down to a list of 21 that we would want to act on.</p>
<h3>Try it for yourself</h3>
<p>You can open up the sample report that we created to visualize these crimes. We saved the report with all the filters in place (buffered around schools, during school hours, only certain drug crimes). You can modify these filters if you want to see how the filtering in SpatialKey works. The report is fully interactive, so you can really explore the crime activity in San Francisco.</p>
<ul>
<li><a class="try-btn" href="http://tinyurl.com/yeun6e8" onclick="pageTracker._trackPageview('/outgoing/tinyurl.com/yeun6e8?referer=');">Try Sample Report</a></li>
</ul>
<h3>Notes</h3>
<p>This data included crimes during the summer when it is likely that most schools are not in session. The purpose of this example is not to find the exact crimes that occurred during the actual school hours, but instead to find the geographic locations where crimes tend to occur during school hours. The areas we highlighted tend to have drug crimes occur at the right time of day, so we are extrapolating that during the school year this trend would continue.</p>
<p>It is also important to note that this is data of active police activity (ie arrests, citations). This means it is not a comprehensive dataset of where crime occurs. This is data about where the SFPD is arresting people. This is an important distinction to keep in mind. An increase in the number of arrests in a certain area may very well be a very good thing indicating that the police are focusing on certain problematic areas, not necessarily that actual crime in those areas is on the rise.</p>
<p>The video, images, and reports in this post were created with publicly accessible data. We have no association with the San Francisco police department (but we&#8217;d love to, so <a href="http://spatialkey.com/contactcf/general.cfm?type=sales" onclick="pageTracker._trackPageview('/outgoing/spatialkey.com/contactcf/general.cfm?type=sales&amp;referer=');">contact us</a> if you&#8217;re from the SFPD and want to use SpatialKey).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.spatialkey.com/2009/09/visualizing-sfpds-operation-safe-schools/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
