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
{ | |
"E06000028": "E06000058", | |
"E06000029": "E06000058", | |
"E07000048": "E06000058", | |
"E07000049": "E06000059", | |
"E07000050": "E06000059", | |
"E07000051": "E06000059", | |
"E07000052": "E06000059", | |
"E07000053": "E06000059", | |
"E07000190": "E07000246", |
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
import argparse | |
import csv | |
def faststream(fp, blocksize=65536, line_delimiter='*@@*', field_delimiter='@**@'): | |
"""Read a BCP file and yield the rows | |
fp is a file pointer to a BCP file opened in 'r' mode. | |
It is assumed the file is opened with the correct encoding, so that· | |
fp.read() gives strings. A trailing newline may need to be added after this· |
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
-- required fields from 360Giving standard | |
-- http://standard.threesixtygiving.org/en/latest/reference/#grants-sheet | |
with g as (select * from view_latest_grant) | |
select g.data->>'id' as "id", | |
g.data->>'title' as "title", | |
g.data->>'description' as "description", | |
g.data->>'currency' as "currency", | |
(g.data->>'amountAwarded')::float as "amountAwarded", | |
to_date(g.data->>'awardDate', 'YYYY-MM-DD') as "awardDate", |
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
# takes a pandas series | |
def normalize_string(s): | |
s = s.astype(str) | |
s = s.str.lower() | |
# replace apostrophes | |
def replace_apos(match): | |
return match.group(0).replace("'", "") | |
s = s.str.replace(r'\'s\b', replace_apos) | |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
We can't make this file beautiful and searchable because it's too large.
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
EmployerName,Address,CompanyNumber,SicCodes,DiffMeanHourlyPercent,DiffMedianHourlyPercent,DiffMeanBonusPercent,DiffMedianBonusPercent,MaleBonusPercent,FemaleBonusPercent,MaleLowerQuartile,FemaleLowerQuartile,MaleLowerMiddleQuartile,FemaleLowerMiddleQuartile,MaleUpperMiddleQuartile,FemaleUpperMiddleQuartile,MaleTopQuartile,FemaleTopQuartile,CompanyLinkToGPGInfo,ResponsiblePerson,EmployerSize,CurrentName,CharityNumber,CharityIncome,OrgType,OrgSubType,PaidMore,FemaleWorkforce | |
"""Bryanston School"",Incorporated","Bryanston House, Blandford, Dorset, United Kingdom, DT11 0PX",00226143,85310,18.0,28.2,0.0,0.0,0.0,0.0,24.4,75.6,50.8,49.2,49.2,50.8,51.5,48.5,https://www.bryanston.co.uk/employment,Nick McRobb (Bursar and Clerk to the Governors),500 to 999,"""Bryanston School"",Incorporated",306210,23130767.0,Charity,,Men,56.025 | |
"""RED BAND"" CHEMICAL COMPANY, LIMITED","19, Smith's Place, Leith Walk, Edinburgh, EH6 8NU",SC016876,47730,2.3,-2.7,15.0,37.5,15.6,66.7,20.3,79.7,25.4,74.6,10.3,89.7,18.1,81.9,,Philip Galt (Man |
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
Old charity number | New charity number | |
---|---|---|
306072 | 1115974 |
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
Type | Entity | Company Number | OSCAR CPID | |
---|---|---|---|---|
Academy Trust | Gateway Learning Community | 05853746 | CAD022 | |
Academy Trust | John Henry Newman Catholic College, The | 07414011 | CAD022 | |
Academy Trust | Abbey Multi Academy Trust | 07705552 | CAD022 | |
Academy Trust | Abbey School (Faversham), The | 07697086 | CAD022 | |
Academy Trust | St. Thomas More High School | 07696989 | CAD022 | |
Academy Trust | Peaslake Free School Limited | 07925067 | CAD022 | |
Academy Trust | Peatmoor Community Primary School | 08714452 | CAD022 | |
Academy Trust | Abney Trust | 09912859 | CAD022 | |
Academy Trust | Fulwell Infant School Academy | 08277622 | CAD022 |