Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
CER
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SERG
CER
Commits
6d30be6e
Commit
6d30be6e
authored
9 years ago
by
Ben Anderson
Browse files
Options
Downloads
Patches
Plain Diff
create a sample allocation file to match to consumption data
parent
3651023f
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
CER-data-processing-samples.do
+80
-0
80 additions, 0 deletions
CER-data-processing-samples.do
with
80 additions
and
0 deletions
CER-data-processing-samples.do
0 → 100644
+
80
−
0
View file @
6d30be6e
/*
**************************************************************
* Data preparation for ESRC Transformative project
* - Using the Commission for Energy Regulation (CER)'s Irish Smart Meter Trial data
* - http://www.ucd.ie/issda/data/commissionforenergyregulationcer/
* processes the original data for further use:
* - sample allocation = .csv file
* This work was funded by RCUK through the ESRC's Transformative Social Science Programme via the
* "Census 2022: Transforming Small Area Socio-Economic Indicators through 'Big Data'" Project
* - http://gtr.rcuk.ac.uk/project/2D2CD798-4F04-4399-B1AF-D810A233DD21
* - http://www.energy.soton.ac.uk/tag/census2022/
Copyright (C) 2014 University of Southampton
Author: Ben Anderson (b.anderson@soton.ac.uk, @dataknut, https://github.com/dataknut)
[Energy & Climate Change, Faculty of Engineering & Environment, University of Southampton]
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License
(http://choosealicense.com/licenses/gpl-2.0/), or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
#YMMV - http://en.wiktionary.org/wiki/YMMV
*/
global
where
"~/Documents/Work"
* project
global
proot
"$where/Data/CER Smart Metering Project"
* data
global
dpath
"$proot/data"
* log
global
logpath
"$proot/data/processed/logs"
global
version
"v1"
set
more
off
clear
all
capture
log
close
log
using
"$logpath/CER-data-processing-samples-$version.smcl"
,
replace
timer
clear
timer
on
1
************************************
************************************
* start with the pre-trial survey
insheet
using
"$dpath/original/CER_both/CER Electricity Revised March 2012/SME and Residential allocations.csv"
,
names
comma
clear
********
* sample allocations
gen
ba_sample
=
1
if
code
==
1
replace
ba_sample
=
2
if
code
==
2
replace
ba_sample
=
3
if
code
==
3
lab
var
ba_sample
"Sample membership"
lab
def
ba_sample
1
"Residential"
2
"SME"
3
"Other"
save
"$dpath/processed/CER_sample_allocation_$version.dta"
,
replace
timer
off
1
di
"Time taken:"
timer
list
1
log
close
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment