Package: abpower
abpowerabpoweris a parser for the publicly-available data provided byAESOrelated to the power grid in Alberta. It consists of a package and a command-line utility.BackgroundDuring the summer of 2020 (yes,thatsummer) I built a website named theAlberta Power Dashboardthat gathered and displayed data from AESO. It was fairly buggy and eventually I stopped maintaining it.This is an attempt to write a more robust parser than the original, with the possibility of bringing the website back at some point in the future - or at least providing a parser someone else can use.InstallationWithpip:-pipinstallabpowerWithpoetry:-poetryaddabpowerUsageTheabpowerpackageYou can query for all data currently supported by the module (see below) with the following:-fromabpowerimportETSParserparser=ETSParser()data=parser.get()This will return anETSobject that contains the data. Theas_dictandas_jsonproperties will returndictand JSON string representations of the data respectively.Querying specific dataYou can pass alistortupleof strings to the parser to only get and parse specific sections of the AESO data.For example, to only query for theCurrent Supply DemandandSystem Marginal Pricedata:-fromabpowerimportETSParserparser=ETSParser()data=parser.get(query=["current-supply-demand","system-marginal-price"])You can also import the specific parser directly:-fromabpower.parserimportCurrentSupplyDemandParser,SystemMarginalPriceParsercsd_parser=CurrentSupplyDemandParser()csd_data=csd_parser.get()smp_parser=SystemMarginalPriceParser()smp_data=smp_parser.get()Theabpowercommand-line utilityA command-line utility - also namedabpower- will be installed along with the module.As with the module, you can query for all data with:-abpowergetThis will query, parse and return all data in JSON format. You can use the--write-to-file(or-w) option to write the data to a file instead of standard output.Querying specific dataAlso like the module, you can query for specific data only:-abpowerget-qcurrent-supply-demand-qsystem-marginal-priceAvailable dataNot all the data provided on the AESO website is queried or parsed byabpower. This may change in the future, but right now the following are supported:-current-supply-demand- theCurrent Supply Demandreport, which gives an overview of the gridactual-forecast- theActual / Forecastreport, which gives a historical comparison of the forecasted and actual usage of the grid over the last 24 hoursdaily-average-pool-price- theDaily Average Pool Pricereport, which gives averages of the pool price over the last weekhourly-available-capability- the7 Day Hourly Available Capabilityreport, which gives a forecast of hourly availability over the next 7 dayspool-price- thePool Pricereport, which gives the historical pool prices over the last 24 hourssupply-surplus- theSupply Surplusreport, which gives the forecasted surplus status for the next 6 hourssystem-marginal-price- theSystem Marginal Pricereport, which gives the historical price over the last few hourspeak-load-forecastthePeak Load Forecastreport, which gives the forecasted peak load for the next 7 daysKnown issues and future plansThere are no known issues, but this was initially written in a weekend so make of that what you will.Documentation needs writing and/or generatingTests need writingCoverage of the data available needs expandingCredits and contributingabpoweris written and maintained by Andy Smith. Pull requests and bug reports are welcome!Licenseabpoweris distributed under theMIT License.