- Create a GitHub account on github.com.
- Download either [GitHub for Mac][1] or [GitHub for Windows][2], depending on your operating system. Open the app and log in using the account you just created.
- (On Mac): After you login, click advanced and make sure that your name and email are correct. Then, click "Install Command Line Tools", just in case you want to start using the command line later in life.
- Create a new repository in your GitHub application. Name it your-username.github.io. The name is very important. Note the folder that GitHub is saving the repository to. Make sure the "Push to GitHub?" box is checked.
- Move your website's files into the folder that GitHub just created when you made the repository. IMPORTANT: Your homepage HTML file must be called "index.html", and it must exist in the top-level directory.
- Back in the GitHub application, you should see your files in the left column. Make sure they are all checked. If so, enter a mess
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
# fixed version of http://altons.github.io/python/2012/12/01/converting-northing-and-easting-to-latitude-and-longitude/ | |
# - filenames | |
# - data type (pyproj transform doesn't like pandas series) | |
import os | |
import pandas as pd | |
import pyproj | |
import re | |
listfiles = os.listdir("codepo/Data/CSV") | |
pieces = [] |
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
"Station" IN ('Kings Cross St. Pancras', 'Victoria','Waterloo' , 'Marylebone' , 'Paddington' , 'Euston' , 'Liverpool Street', 'London Bridge') |
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
USE AT OWN RISK I'VE COMPILED THIS BASED ON THE FOLLOWING; | |
========== | |
Nationwide house price regions | |
============= | |
EAST ANGLIA | |
EAST MIDS | |
LONDON | |
NORTH ** asumed as ONS north east , tested personal loan northeast postcode in nationwide mortgage look up; what regoin query? and returned as N.E | |
NORTH WEST |
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
--Apply in the 'Label with' part of the properties | |
if( $area > 1600, "field_name_for_the_label" , None) | |
if( $area > 80000, regexp_replace( "name",'[(](.*)?[)]','' ) , None) | |
-- which means if the calculated area (project settings) is over then use the "name" column to label if not then no label, | |
--also strips anything within a bracket from the label | |
--Apply in the label size field from the expressions button |
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
--for taking query views into main analysis table | |
update analysis_by_postcode_sector | |
set scat18_1sqm_sector = voarecord1_analysis_bysector_scat_18_all.voa_list_sector, | |
scat18_all_sum = voarecord1_analysis_bysector_scat_18_all.sum, | |
scat18_all_avg = voarecord1_analysis_bysector_scat_18_all.avg, | |
scat18_all_max = voarecord1_analysis_bysector_scat_18_all.max | |
from voarecord1_analysis_bysector_scat_18_all | |
where analysis_by_postcode_sector.voa_record1_sector_name_check::text = voarecord1_analysis_bysector_scat_18_all.voa_list_sector::text; |
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
--for taking query views into main analysis table | |
update analysis_by_postcode_sector | |
set scat18_1sqm_sector = voarecord1_analysis_bysector_scat_18_all.voa_list_sector, | |
scat18_all_sum = voarecord1_analysis_bysector_scat_18_all.sum, | |
scat18_all_avg = voarecord1_analysis_bysector_scat_18_all.avg, | |
scat18_all_max = voarecord1_analysis_bysector_scat_18_all.max | |
from voarecord1_analysis_bysector_scat_18_all | |
where analysis_by_postcode_sector.voa_record1_sector_name_check::text = voarecord1_analysis_bysector_scat_18_all.voa_list_sector::text; |
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
--adds serial to table so you can bring to QGIS | |
ALTER TABLE aa_intersects2 ADD COLUMN id SERIAL PRIMARY KEY; | |
--adds spatial index to table to speed up queries | |
CREATE INDEX gidx_osba_bldgs_geom ON d_os_vectormap_bldgs USING GIST (geom); | |
ST_DumpRings | |
—-Returns a set of geometry_dump rows, representing the exterior and interior rings of a polygon. | |
--get table data,to make select statements faster to write |
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
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
var FORMAT_ONELINE = 'One-line'; | |
var FORMAT_MULTILINE = 'Multi-line'; | |
var FORMAT_PRETTY = 'Pretty'; | |
var LANGUAGE_JS = 'JavaScript'; | |
var LANGUAGE_PYTHON = 'Python'; |
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
Procedure PrefixClasses; | |
{ Add "OS-" to the front of classes that begin with "G80". } | |
CONST | |
Prefix = 'G80'; | |
VAR | |
ClassName, NewName :STRING; | |
i :INTEGER; | |
BEGIN | |
i := 1; |
OlderNewer