Skip to content

EnzoLefebure/my-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Climate Prediction Text Generator

A Python application that generates climate prediction texts based on different scenarios, timeframes, and regions.

Features

  • Generate climate prediction texts with customizable parameters
  • Choose from optimistic, moderate, or pessimistic climate scenarios
  • Select specific time periods from 2030 to 2100
  • Target predictions for specific regions or globally
  • Interactive data visualizations comparing different scenarios
  • Download generated predictions as text files

Installation

  1. Clone this repository
  2. Install the required dependencies:
pip install -r requirements.txt

Usage

Running the Web Application

Launch the Streamlit web interface:

streamlit run app.py

This will open a browser window with the application.

Using the Class Directly

You can also use the ClimateTextGenerator class directly in your own code:

from climate_prediction import ClimateTextGenerator

# Initialize the generator
generator = ClimateTextGenerator()

# Generate a prediction
prediction = generator.generate_prediction(
    scenario='moderate',      # 'optimistic', 'moderate', or 'pessimistic'
    year_range=(2040, 2070),  # Range of years for the prediction
    region="North America"    # Optional specific region, or None for global
)

# Print the prediction
print(prediction)

Scenario Descriptions

Optimistic Scenario

  • Temperature rise limited to 0.5-1.5°C above pre-industrial levels
  • Rapid adoption of renewable energy and sustainable practices
  • Effective international cooperation and climate policies

Moderate Scenario

  • Temperature rise of approximately 1.0-2.5°C above pre-industrial levels
  • Mixed progress on climate goals and mitigation strategies
  • Partial adaptation to changing conditions

Pessimistic Scenario

  • Temperature rise of 2.0-4.5°C above pre-industrial levels
  • Continued reliance on fossil fuels with limited international cooperation
  • Severe impacts on ecosystems, infrastructure, and human systems

Data Sources

The climate projections used in this application are based on general climate science projections and simplified models. For more accurate and detailed climate data, consider using data from:

  • IPCC (Intergovernmental Panel on Climate Change)
  • NOAA (National Oceanic and Atmospheric Administration)
  • NASA's climate resources
  • World Climate Research Programme

About

Project for Data Science

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages