question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

make the allocated net generation work at non-annual frequencies

See original GitHub issue

The problem

The allocation process employs three tables: the generation fuel table, the original generation table and the generators table (accessed via pudl_out.gf_eia923(), pudl_out.gen_original_eia923() and pudl_out.gens_eia860() respectively). both the gf and the gen table is originally reported monthly while the gens table is annual. The allocation process doesn’t know to make the gens table monthly before trying to allocate. Given that, I think ensuring the allocation process knows how to deal with monthly data would be a relatively straightforward fix.

Seeing the problem

# instantiate a monthly pudl_out object
pudl_out_ms = pudl.output.pudltabl.PudlTabl(
    pudl_engine,
    freq='MS',
    fill_net_gen=True 
)
gen = pudl_out_ms.gen_eia923()
# the two interim ouptus
gen_original = pudl_out_ms.gen_original_eia923()
gen_allocated = pudl_out_ms.gen_allocated_eia923()

# make the annual version for comparison
pudl_out_as = pudl.output.pudltabl.PudlTabl(
    pudl_engine,
    freq='AS',
    fill_fuel_cost=True,
    roll_fuel_cost=True,
    fill_net_gen=True 
)
gen_as = pudl_out_as.gen_eia923()

# make some plots
gen_options = {
    "Monthly Allocated": gen_allocated,
    "Monthly Original": gen_original,
    "Annual Allocated": gen_as
}
for gen_type, df in gen_options.items():
    gen_sum = df.groupby(['report_date'])[['net_generation_mwh']].sum().sort_index()
    plt.plot(
        gen_sum.index, gen_sum.net_generation_mwh, '.--',
        label=gen_type
    )
plt.legend()
plt.title("Net Generation")
plt.show()

image.png

The solution??

I thiiiiink this could all be solved by using pudl.helpers.clean_merge_asof in pudl.analysis.allocate_net_gen.associate_generator_tables

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
TrentonBushcommented, Feb 17, 2022

That rings a bell but 10 minutes of digging only surfaced this old issue #1106 that touched on generating timeseries on a cartesian product of ID fields

0reactions
zaneselvanscommented, Sep 12, 2022

@cmgosnell is this issue closed by #1608 from @grgmiller?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Understanding Frequency in Compensation Rate Conversions
This section discusses: Factors applied to the compensation rate. Conversion of compensation rates to different frequencies. Job Data pay rate frequencies.
Read more >
Federal Register/Vol. 87, No. 190/Monday, October 3, 2022 ...
comment on: (1) whether to create new accounts for non-hydro renewable energy generating assets; 20 (2) what modifications to FERC Form No.
Read more >
International Brotherhood of Electrical Workers
Covering Employees in Power Generation and Steam Heat, ... If the employee to whom the job is awarded declines the job, the Company....
Read more >
ANNUAL REPORT
FERC Form No. 1 (FERC Form 1) is an annual regulatory requirement for Major electric utilities, licensees and others. (18 C.F.R. § 141.1)....
Read more >
Renewable Electricity Futures Study. Volume 4 - NREL
RE Futures results indicate that a future U.S. electricity system that is largely powered by renewable sources is possible and that further work...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found