This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# We'll replace commas with dashes so we don't screw up the CSV. You can change the dash to whatever character you want | |
date3 = date2.replace(",", " -") | |
link3 = link2.replace(",", " -") | |
headline3 = headline2.replace(",", " -") | |
description3 = description2.replace(",", " -") | |
image3 = image2.replace(",", " -") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Extract that information in strings | |
date2 = str(date) | |
link2 = str(link) | |
headline2 = str(headline) | |
image2 = str(image) | |
# These are pulled from outside the loop | |
description2 = str(description) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Write the information to the file. The HTML code is based on coding recognized by TimelineSetter | |
f.write(date8 + "," + description7 + "," + link3 + "," + '<h2 class="timeline-img-hed">' + headline3 + '</h2>' + image5 + "\n") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#You're done! Close file. | |
f.close() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# We will be using the Python library Beautiful Soup | |
# To scrape the information | |
import urllib2 | |
from bs4 import BeautifulSoup | |
import re | |
# Note: This arrest log is available at: | |
# http://chrisessig.com/arrestlog.PDF | |
# It was taken from the Waterloo Police Department's website: | |
# http://www.waterloopolice.com/images/arrestlog.PDF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var geojson = L.geoJson(data, { | |
// style for all vector layers (color, opacity, etc.) (optional) | |
getStyle: function (feature) { | |
return feature.properties && feature.properties.style; | |
}, | |
// function for creating layers for GeoJSON point features (optional) | |
pointToLayer: function (feature, latlng) { | |
return L.marker(latlng, { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<param name='movie' value='" + u + "'/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<param name='movie' value='http://cdn-akm.vmixcore.com/player/2.0/player.swf?player_id=48df95747124fbbad1aea98cee6e46e4'/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<OBJECT id='V0CuCNmu2y-DUmYkbBQt2AckDDshqeGrQd' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='350' height='260'> | |
<param name='FlashVars' value='debug=&services_url=http://cdn-akm.vmixcore.com/core-flash/UnifiedVideoPlayer/services.xml&token=V0CuCNmu2y-DUmYkbBQt2AckDDshqeGrQd&player_id=48df95747124fbbad1aea98cee6e46e4&ref=location.href'/> | |
<param name='movie' value='http://cdn-akm.vmixcore.com/player/2.0/player.swf?player_id=48df95747124fbbad1aea98cee6e46e4'/> | |
<param name='wmode' value='opaque'/> | |
<param name='allowFullScreen' value='true'/> | |
<param name='AllowScriptAccess' value='always'/> | |
<embed src='http://cdn-akm.vmixcore.com/player/2.0/player.swf?player_id=48df95747124fbbad1aea98cee6e46e4' wmode='opaque' allowFullScreen='true' AllowScriptAccess='always' width='350' height='260' FlashVars='debug=&services_url=http://cdn-akm.vmixcore.com/core-flash/UnifiedVideoPlayer/services.xml&token=V0CuCNmu2y-DUmY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var u = "http://cdn-akm.vmixcore.com/player/2.0/player.swf?player_id=48df95747124fbbad1aea98cee6e46e4"; |