Skip to content

Commit

Permalink
Move variables to top
Browse files Browse the repository at this point in the history
  • Loading branch information
slowe committed Sep 13, 2023
1 parent 9b08294 commit d7b83a9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
14 changes: 10 additions & 4 deletions pipelines/transport/ev.pl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
use YAML::XS;
use OpenInnovations::GeoJSON;

my $outputfile = "../../src/_data/sources/transport/national_charge_point_registry_by_constituency.csv";
my $geojsonfile = "../../src/_data/geojson/constituencies-2022.geojson";
my $popfile = "../../raw-data/Population.csv";
my $key = "PCON22CD";



my %colours = (
'black'=>"\033[0;30m",
'red'=>"\033[0;31m",
Expand All @@ -20,10 +27,9 @@

$types = {};
$connections = {};
$key = "PCON22CD";

# Load in the GeoJSON structure and work out bounding boxes for each feature
$geo = OpenInnovations::GeoJSON->new('file'=>"../../src/_data/geojson/constituencies-2022.geojson");
$geo = OpenInnovations::GeoJSON->new('file'=>$geojsonfile);

$n = @{$geo->{'features'}};
for($f = 0; $f < $n ; $f++){
Expand All @@ -33,7 +39,7 @@
}

# Load in the population figures
@data = LoadCSV("../../raw-data/Population.csv");
@data = LoadCSV($popfile);
$ages = {};
for($i = 0; $i < @data; $i++){
#Age group,ONSConstID,ConstituencyName,RegionID,RegionName,CountryID,CountryName,DateThisUpdate,DateOfDataset,Date,Const%,ConstLevel,Reg%,UK%
Expand Down Expand Up @@ -92,7 +98,7 @@
}
}
}
open(FILE,">","../../src/_data/sources/transport/national_charge_point_registry_by_constituency.csv");
open(FILE,">",$outputfile);
print FILE "$key,all";
print FILE ",slow (3-6 KW),fast (7-22 KW),rapid (25-100 KW),ultra (>100 KW),population (2020)";
print FILE ",all (per 100k),slow (3-6 KW per 100k),fast (7-22 KW per 100k),rapid (25-100 KW per 100k),ultra (>100 KW per 100k)";
Expand Down
4 changes: 3 additions & 1 deletion src/themes/transport/ev-charging-points.njk
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ description: |


<h2>Home charging sockets and devices (2022){% comp 'anchor', { 'ref': 'home'} %}{% endcomp %}</h2>
<p>This map shows where the Office for Zero Emission Vehicles (OZEV) has provided grants (EVHS, DRS, and EVCG) for domestic charging devices. These figures will not include home charging devices that have been installed without a grant. </p>
<p>This map shows where the Office for Zero Emission Vehicles (OZEV) has provided grants (EVHS, DRS, and EVCG) for domestic charging devices. These figures will not include home charging devices that have been installed without a grant. See <a href="#notes-home">notes on home charging data</a>.</p>
{% comp 'hexmap', {
"config": {
"width": 600,
Expand Down Expand Up @@ -247,6 +247,8 @@ description: |

<h3>Home{% comp 'anchor', { 'ref': 'notes-home'} %}{% endcomp %}</h3>
<p>A single device could have a number of connectors of varying speeds but these are counted as one "connection" here because the data do not provide information on the number of individual sockets each one has. For homecharging we are using 2022 data. At some point this will update with a 2023 value and we will need to see if they also use updated geographies.</p>
<p>The EV chargepoint grant (EVCG) provides funding of up to 75% towards the cost of installing electric vehicle smart chargepoints at domestic properties across the UK. It replaced the Electric Vehicle Homecharge Scheme (EVHS) on 1 April 2022.</p>
<p>The EVHS provided grant funding for up to 75% of the cost of installing electric vehicle charging devices at domestic properties across the UK.</p>

<h3>Workplace{% comp 'anchor', { 'ref': 'notes-work'} %}{% endcomp %}</h3>
<p>Workplace statistics are for the number of "Sockets Installed", which we also count as one unit.
Expand Down

0 comments on commit d7b83a9

Please sign in to comment.