Data Overview
The data used in this web-book is derived from federal, state, commercial, and local sources, as well as direct communications with utilities and state program managers. More information about data sources can be found on the methods page of this web-book.
Download Individual Tables
Individual tables can be downloaded here as text files (CSV, comma-separated values). Once downloaded to your local machine, these files can be opened graphically using Microsoft Excel, or programmatically using R or Python.
Capacity
A dataset compiled from the time series built for Table 1.D of the Aug 08, 2023 Energy Statistics Workbook
capacity_wide_description = metadata . resources [ 0 ] . description ;
capacity_wide_raw = FileAttachment ( "data/final_data/capacity.csv" ) . csv ({ typed : true }) ;
capacity_wide = tidy (capacity_wide_raw ,
filter ((d) => d . year < 2020 ))
capacity_wide_path = metadata . resources [ 0 ] . path ;
capacity_wide_metadata = metadata . resources [ 0 ] . schema . fields ;
viewof capacity_input = Inputs . select ( new Map ([
[ "Capacity Metadata" , capacity_wide_metadata] ,
[ "Capacity" , capacity_wide]]) ,
{ value : capacity_wide_metadata , label : "Preview:" }
) ;
Inputs . table (capacity_input) ;
capacity_wide_description = "A dataset compiled from the time series built for Table 1.D of the Aug 08, 2023 Energy Statistics Workbook"
capacity_wide_raw =
Array(440) [Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , …]
RuntimeError: filter is not defined
capacity_wide_path = "working/capacity/capacity_wide.csv"
capacity_wide_metadata =
Array(9) [Object , Object , Object , Object , Object , Object , Object , Object , Object ]
RuntimeError: filter is not defined
RuntimeError: filter is not defined
RuntimeError: filter is not defined
button (capacity_wide_metadata , 'capacity_metadata.csv' , `Capacity Metadata` )
button (capacity_wide , `capacity.csv` , `Capacity` )
RuntimeError: filter is not defined
Net Generation
A dataset compiled from Table 2.3b from the 2011-2021 Alaska Energy Statistics Workbooks deliverables.
net_generation_wide_description = metadata . resources [ 2 ] . description
net_generation_wide_raw = FileAttachment ( "data/final_data/generation.csv" ) . csv ({ typed : true }) ;
net_generation_wide = tidy (net_generation_wide_raw ,
filter ((d) => d . year < 2020 ))
net_generation_wide_path = metadata . resources [ 2 ] . path
net_generation_wide_metadata = metadata . resources [ 2 ] . schema . fields
viewof generation_input = Inputs . select ( new Map ([[ "Generation Metadata" , net_generation_wide_metadata] ,
[ "Generation" , net_generation_wide]]) ,
{ value : net_generation_wide_metadata , label : "Preview:" }
) ;
Inputs . table (generation_input) ;
net_generation_wide_description = "A dataset compiled from Table 2.3b from the 2011-2021 Alaska Energy Statistics Workbooks deliverables."
net_generation_wide_raw =
Array(22408) [Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , …]
RuntimeError: filter is not defined
net_generation_wide_path = "working/generation/net_generation_wide.csv"
net_generation_wide_metadata =
Array(13) [Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object ]
RuntimeError: filter is not defined
RuntimeError: filter is not defined
RuntimeError: filter is not defined
button (net_generation_wide_metadata , 'net_generation_metadata.csv' , `Generation Metadata` )
button (net_generation_wide , `generation.csv` , `Net Generation` )
RuntimeError: filter is not defined
Consumption and Sales
A dataset compiled from Table 2.5a of the 2011-2019 Alaska Energy Statistics Workbooks.
consumption_wide_description = metadata . resources [ 4 ] . description
consumption_wide_raw = FileAttachment ( "data/final_data/consumption.csv" ) . csv ({ typed : true }) ;
consumption_wide = tidy (consumption_wide_raw ,
filter ((d) => d . year < 2020 ))
consumption_wide_path = metadata . resources [ 4 ] . path
consumption_wide_metadata = metadata . resources [ 4 ] . schema . fields
viewof consumption_input = Inputs . select ( new Map ([[ "Consumption Metadata" , consumption_wide_metadata] ,
[ "Consumption" , consumption_wide]]) ,
{ value : consumption_wide_metadata , label : "Preview:" }
) ;
Inputs . table (consumption_input) ;
consumption_wide_description = "A dataset compiled from Table 2.5a of the 2011-2019 Alaska Energy Statistics Workbooks."
consumption_wide_raw =
Array(6904) [Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , …]
RuntimeError: filter is not defined
consumption_wide_path = "working/consumption/consumption_wide.csv"
consumption_wide_metadata =
Array(26) [Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , …]
RuntimeError: filter is not defined
RuntimeError: filter is not defined
RuntimeError: filter is not defined
button (consumption_wide_metadata , 'consumption_wide_metadata.csv' , `Consumption Metadata` )
button (consumption_wide , `consumption_wide.csv` , `Consumption` )
RuntimeError: filter is not defined
Prices
A dataset compiled from Table 2.5 from the 2011-2021 Alaska Energy Statistics Workbooks deliverables.
prices_description = metadata . resources [ 6 ] . description ;
prices_raw = FileAttachment ( "data/final_data/prices.csv" ) . csv ({ typed : true }) ;
prices = tidy (prices_raw ,
filter ((d) => d . year < 2020 ))
prices_path = metadata . resources [ 6 ] . path ;
prices_metadata = metadata . resources [ 6 ] . schema . fields ;
viewof prices_input = Inputs . select ( new Map ([[ "Prices Metadata" , prices_metadata] ,
[ "Prices" , prices]]) ,
{ value : prices_metadata , label : "Preview:" }
) ;
Inputs . table (prices_input) ;
prices_description = "A dataset compiled from Table 2.5 from the 2011-2021 Alaska Energy Statistics Workbooks deliverables."
prices_raw =
Array(2108) [Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , …]
RuntimeError: filter is not defined
prices_path = "working/prices/prices.csv"
prices_metadata =
Array(20) [Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object ]
RuntimeError: filter is not defined
RuntimeError: filter is not defined
RuntimeError: filter is not defined
button (prices_metadata , `prices_metadata.csv` , `Metadata` ) ;
button (prices , `prices.csv` , `Prices` ) ;
RuntimeError: filter is not defined
Population-Weighted Average Prices
A dataset compiled from Table 2.5 from the 2011-2021 Alaska Energy Statistics Workbooks deliverables.
weighted_prices_description = metadata . resources [ 7 ] . description ;
weighted_prices_raw = FileAttachment ( "data/final_data/weighted_prices.csv" ) . csv ({ typed : true }) ;
weighted_prices = tidy (weighted_prices_raw ,
filter ((d) => d . year < 2020 ))
weighted_prices_path = metadata . resources [ 7 ] . path ;
weighted_prices_metadata = metadata . resources [ 7 ] . schema . fields ;
viewof weighted_prices_input = Inputs . select ( new Map ([[ "Weighted Prices Metadata" , weighted_prices_metadata] ,
[ "Weighted Prices" , weighted_prices]]) ,
{ value : weighted_prices_metadata , label : "Preview:" }
) ;
Inputs . table (weighted_prices_input) ;
weighted_prices_description = "A dataset compiled from Table 2.5 from the 2011-2021 Alaska Energy Statistics Workbooks deliverables."
weighted_prices_raw =
Array(99) [Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , …]
RuntimeError: filter is not defined
weighted_prices_path = "working/prices/weighted_prices.csv"
weighted_prices_metadata =
Array(5) [Object , Object , Object , Object , Object ]
RuntimeError: filter is not defined
RuntimeError: filter is not defined
RuntimeError: filter is not defined
button (weighted_prices_metadata , `weighted_prices_metadata.csv` , `Metadata` ) ;
button (weighted_prices , `weighted_prices.csv` , `Weighted Prices` )
RuntimeError: filter is not defined
stdlib = require ( "@observablehq/stdlib" )
d3 = require ( "d3@7" )
import {tidy , groupBy , rename , summarize , sum , mutate , select , n , nDistinct , mean , filter , pivotWider , pivotLonger , leftJoin , slice} from "@pbeshai/tidyjs"
// load metadata
metadata = FileAttachment ( "data/final_data/metadata.json" ) . json () ;
metadata =
Object {title : "2024 Alaska Electricity Trends Report" , id : "NULL" , licenses : Array(1) , description : "Electricity capacity, generation, consumption, and price data from 2011-2019/21" , resources : Array(8) , keywords : Array(3) }
// download button function
button = (data , filename = 'data.csv' , displayname) => {
const downloadData = new Blob ([d3 . csvFormat (data)] , { type : "text/csv" }) ;
const size = (downloadData . size / 1024 ) . toFixed ( 1 ) ;
const button = DOM . download (
downloadData ,
filename ,
` ${ displayname } ( ${ size } KB)`
) ;
return button ;
}
db = FileAttachment ( "data/working/aetr.db" ) . sqlite ()
viewof dbTable = Inputs . select (( await db . describe ()) . value . map (d => d . name ) ,
{ label : "" })
database = db . query ( `SELECT * FROM ${ dbTable } ` )
Inputs . table (database)
db_button = (database , filename = 'data.csv' ) => {
const downloadData = new Blob ([d3 . csvFormat (database)] , { type : "text/csv" }) ;
const size = (downloadData . size / 1024 ) . toFixed ( 1 ) ;
const button = DOM . download (
downloadData ,
filename ,
`Download ${ filename } ( ${ size } KB)`
) ;
return button ;
}
db_button (database , ` ${ dbTable } ` )