This file contains 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
-- search twitter for any tweets mentioning #gis within 100 miles of Figueroa Mountain Brewery | |
#gis geocode:34.609423,-120.202115,100mi | |
-- happening within a mile of my UCSB office | |
geocode:34.42028,-119.85260,1mi |
This file contains 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
Step One - Starting with a single address field | |
Edit Column > Add Column by Fetching URLs | |
Nominatim has a limit of 1 geocode per second so make sure to set the throttle delay to greater than 1000 milliseconds | |
Fetch URL based on column (quotes needed): | |
"http://nominatim.openstreetmap.org/search?format=json&email=[YOUR_EMAIL_HERE].com&app=google-refine&q=' + escape(value, 'url')" | |
------------------------------------------------------------------------------------ | |
Step Two - Extract lat/lon from newly created JSON blobs |
This file contains 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
##Data Science Toolkit & OpenRefine Tutorial | |
1. Download, Setup, and start up [OpenRefine][OpenRefine] | |
2. Get some data. I recommend starting with a small dataset. I'll be using [this sample data][sampledata]. Extract the zip file. You now have 500.csv. | |
3. Load the data into OpenRefine by clicking 'Create Project' and then 'Choose Files', navigate to 500.csv. Then click 'Next', stay with the defaults and then 'Create Project'. | |
4. We'll first need to concatenate the address data down into a single field. Click the dropdown arrow at the top of the existing 'Address' field, then select 'Edit column' > 'Add column based on this column'. | |
* Enter a name for your new column. I'll go with 'AddressCombined' in the 'New column name' box |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
<?php | |
$dir_open = opendir('.'); | |
while(false !== ($filename = readdir($dir_open))){ | |
if($filename != "." && $filename != ".."){ | |
$link = "<a href='./$filename'> $filename </a><br />"; | |
echo $link; | |
} | |
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.subunit.SCT { fill: #ddc; } | |
.subunit.WLS { fill: #cdd; } | |
.subunit.NIR { fill: #cdc; } | |
.subunit.ENG { fill: #dcd; } | |
.subunit.IRL { display: none; } |
This file contains 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
data/* | |
*.zip | |
*.gzip | |
*.bu | |
*.paul | |
*.*~ |