{"id":313144,"name":"offgridai","description":"This is a cost calculator for a datacenter powered by solar, batteries, and gas generation.","url":"https://github.com/offgridai-us/cost-calculator","last_synced_at":"2026-04-14T22:30:26.327Z","repository":{"id":270124602,"uuid":"909039734","full_name":"offgridai-us/cost-calculator","owner":"offgridai-us","description":"Cost calculator for https://www.offgridai.us","archived":false,"fork":false,"pushed_at":"2025-02-22T19:40:45.000Z","size":4754,"stargazers_count":20,"open_issues_count":0,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-04-03T18:48:45.242Z","etag":null,"topics":["calculator","offgrid","solar","streamlit"],"latest_commit_sha":null,"homepage":"https://offgridai-cost-calculator.streamlit.app/","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/offgridai-us.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-27T15:48:36.000Z","updated_at":"2026-01-16T23:31:35.000Z","dependencies_parsed_at":"2024-12-28T16:32:46.453Z","dependency_job_id":"4fcb9a26-8fd5-4577-aa64-221ca8a82278","html_url":"https://github.com/offgridai-us/cost-calculator","commit_stats":null,"previous_names":["bengineer19/lcoe-solar-datacenter","offgridai-us/cost-calculator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/offgridai-us/cost-calculator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offgridai-us%2Fcost-calculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offgridai-us%2Fcost-calculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offgridai-us%2Fcost-calculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offgridai-us%2Fcost-calculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/offgridai-us","download_url":"https://codeload.github.com/offgridai-us/cost-calculator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offgridai-us%2Fcost-calculator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31524531,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"owner":{"login":"offgridai-us","name":"offgridai.us","uuid":"199001026","kind":"organization","description":"How off-grid solar microgrids can power the AI race","email":"feedback@offgridai.us","website":"https://www.offgridai.us","location":null,"twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/199001026?v=4","repositories_count":1,"last_synced_at":"2025-02-18T22:24:46.338Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/offgridai-us","funding_links":[],"total_stars":0,"followers":0,"following":0,"created_at":"2025-02-18T22:24:46.367Z","updated_at":"2025-02-18T22:24:46.367Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/offgridai-us","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/offgridai-us/repositories"},"packages":[],"commits":{"id":9399025,"full_name":"offgridai-us/cost-calculator","default_branch":"main","total_commits":57,"total_committers":2,"total_bot_commits":0,"total_bot_committers":0,"mean_commits":28.5,"dds":0.10526315789473684,"past_year_total_commits":0,"past_year_total_committers":0,"past_year_total_bot_commits":0,"past_year_total_bot_committers":0,"past_year_mean_commits":0.0,"past_year_dds":0.0,"last_synced_at":"2026-04-07T19:09:24.921Z","last_synced_commit":"7680d79e57b495ab4d6cc5b7c4ba92fb01852ce2","created_at":"2025-03-30T00:07:14.129Z","updated_at":"2026-04-07T19:09:24.891Z","committers":[{"name":"bengineer19","email":"benjames1999@hotmail.co.uk","login":"bengineer19","count":51},{"name":"Mike Fix","email":"62121649+mfix-stripe","login":"mfix-stripe","count":6}],"past_year_committers":[],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/offgridai-us%2Fcost-calculator/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-09T00:00:23.197Z","repositories_count":6212625,"commits_count":911269218,"contributors_count":35167410,"owners_count":1143411,"icon_url":"https://github.com/github.png","host_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories"}},"issues_stats":{"full_name":"offgridai-us/cost-calculator","html_url":"https://github.com/offgridai-us/cost-calculator","last_synced_at":"2026-01-29T10:01:37.886Z","status":"error","issues_count":0,"pull_requests_count":0,"avg_time_to_close_issue":null,"avg_time_to_close_pull_request":null,"issues_closed_count":0,"pull_requests_closed_count":0,"pull_request_authors_count":0,"issue_authors_count":0,"avg_comments_per_issue":null,"avg_comments_per_pull_request":null,"merged_pull_requests_count":0,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":0,"past_year_pull_requests_count":0,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":null,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":0,"past_year_pull_request_authors_count":0,"past_year_issue_authors_count":0,"past_year_avg_comments_per_issue":null,"past_year_avg_comments_per_pull_request":null,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":0,"created_at":"2025-03-30T00:07:14.662Z","updated_at":"2026-01-29T10:01:37.887Z","repository_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/offgridai-us%2Fcost-calculator","issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/offgridai-us%2Fcost-calculator/issues","issue_labels_count":{},"pull_request_labels_count":{},"issue_author_associations_count":{},"pull_request_author_associations_count":{},"issue_authors":{},"pull_request_authors":{},"host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-09T00:00:10.509Z","repositories_count":14168959,"issues_count":34547286,"pull_requests_count":112988799,"authors_count":11231467,"icon_url":"https://github.com/github.png","host_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories","owners_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/owners","authors_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors"},"past_year_issue_labels_count":{},"past_year_pull_request_labels_count":{},"past_year_issue_author_associations_count":{},"past_year_pull_request_author_associations_count":{},"past_year_issue_authors":{},"past_year_pull_request_authors":{},"maintainers":[],"active_maintainers":[]},"events":{"total":{"ForkEvent":5,"WatchEvent":14,"PushEvent":8},"last_year":{"ForkEvent":3,"WatchEvent":4}},"keywords":["calculator","offgrid","solar","streamlit"],"dependencies":[{"ecosystem":"pypi","filepath":"requirements.txt","sha":null,"kind":"manifest","created_at":"2024-12-28T16:32:46.171Z","updated_at":"2024-12-28T16:32:46.171Z","repository_link":"https://github.com/offgridai-us/cost-calculator/blob/main/requirements.txt","dependencies":[{"id":21304325629,"package_name":"streamlit","ecosystem":"pypi","requirements":"==1.31.1","direct":true,"kind":"runtime","optional":false},{"id":21304325630,"package_name":"pandas","ecosystem":"pypi","requirements":"==2.2.0","direct":true,"kind":"runtime","optional":false},{"id":21304325631,"package_name":"numpy","ecosystem":"pypi","requirements":"==1.26.3","direct":true,"kind":"runtime","optional":false},{"id":21304325632,"package_name":"plotly","ecosystem":"pypi","requirements":"==5.18.0","direct":true,"kind":"runtime","optional":false}]}],"score":3.6888794541139363,"created_at":"2025-03-30T00:07:11.389Z","updated_at":"2026-04-14T22:30:26.330Z","avatar_url":"https://github.com/offgridai-us.png","language":"Python","category":"Consumption","sub_category":"Computation and Communication","monthly_downloads":0,"total_dependent_repos":0,"total_dependent_packages":0,"readme":"# Introduction\nThis is a cost calculator for a datacenter powered by solar, batteries, and gas generation.\n\nIt can simulate a datacenter of any load anywhere in the world, with any combination of solar, battery, and gas generation. The output is a Levelized Cost of Energy (LCOE) in $/MWh, and a yearly financial model.\n \nThe code calculates the LCOE using the following steps:\n1. It pulls weather data for the speciifed `(lat, long)`\n2. It simulates the solar power from the weather data\n3. It simulates the powerflow of the system between the solar, battery, generator, and datacenter.\n4. It calculates the annual cashflows and the LCOE of the system.\n\n# Usage\nThere are three ways to use this code:\n\n## 1. Streamlit interface\n`streamlit run app.py`\n\n\n## 2. Command line interface\n#### One-shot LCOE calculation\nThis simulates a single case.\n```bash\npython calculate_lcoe_one_shot.py --lat 31.9 --long -106.2 --solar-mw 250 --bess-mw 100 --generator-mw 125 --datacenter-load-mw 100\n```\n\n(See `calculate_lcoe_one_shot.py` for all possible args)\n\n#### LCOE Ensemble Calculation\nThis simulates a range of cases and saves the results to a CSV file.\nThe \"raw results\" for every case are saved as a CSV, as well as the Pareto-optimal frontier on LCOE vs renewable-percentage. \n```bash\npython run_ensemble.py\n```\nYou can define the test cases in `run_ensemble.py`.\n\n## 3. Python\n```python\n\"\"\"There are three steps to calculate the LCOE:\n1. Get solar weather data\n2. Simulate powerflow\n3. Calculate LCOE\n\"\"\"\n\n# 1. Get solar weather data\nsolar_ac_dataframe = get_solar_ac_dataframe(lat, long)\n\n# 2. Simulate powerflow\npowerflow_results = simulate_system(lat, long, solar_ac_dataframe, ...)\n\n# 3. Create DataCenter instance and calculate LCOE\ndatacenter = DataCenter(\n    powerflow_results=powerflow_results,\n    solar=100, \n    bess=100, \n    generator=125, \n    generator_type=\"Gas Engine\",\n    # CAPEX rates\n    solar_capex_total_dollar_per_w=0.25,\n    bess_capex_total_dollar_per_kwh=0.10,\n    # O\u0026M rates\n    solar_om_fixed_dollar_per_kw=0.01,\n    bess_om_fixed_dollar_per_kw=0.01,\n    ... # See `datacenter.py` for all options and defaults\n)\n\nlcoe = datacenter.calculate_lcoe()\n```\n\n## Authors\n\n* [Ben James](https://github.com/bengineer19)\n","funding_links":[],"readme_doi_urls":[],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":[],"project_url":"https://ost.ecosyste.ms/api/v1/projects/313144","html_url":"https://ost.ecosyste.ms/projects/313144"}