Project Overview
Welcome to the Python Wildlife Conservation Challenge: Protect the Ecosystem! In this interactive exercise, you will take on the role of a data analyst for the Global Wildlife Conservation Organization (GWCO). Your mission is to analyze and visualize wildlife data, manage conservation resources, and develop strategies to combat threats to various species. Utilizing Python’s robust data analysis libraries alongside interactive tools like CodeMirror and Pyodide, you’ll gain hands-on experience in addressing real-world conservation challenges.
Through a series of engaging tasks, you’ll enhance your Python programming skills, deepen your understanding of data analysis, and contribute to the preservation of Earth’s precious ecosystems.
Objective
By the end of this exercise, you will:
- Enhance Python Proficiency: Strengthen your Python programming skills with a focus on data manipulation and visualization.
- Master Interactive Coding Environments: Utilize CodeMirror for an enriched coding experience and Pyodide to execute Python code directly in the browser.
- Analyze Conservation Data: Perform data analysis on wildlife and conservation datasets to extract meaningful insights.
- Visualize Data Effectively: Create compelling visualizations to represent complex data patterns and trends.
- Develop Conservation Strategies: Apply your skills to manage resources and develop strategies to protect endangered species.
Tasks
Embark on the following tasks to protect endangered species and optimize conservation efforts. Each task is designed to guide you through critical data analysis and visualization scenarios using Python. After completing each task, you can check your answers using the provided sample solutions.
Task 1: List All Endangered Species
Objective: Retrieve a list of all species in the dataset with their details.
Instructions:
- Use Python to load the
speciesdataset. - Display all species IDs, common names, scientific names, conservation statuses, habitats, and population estimates.
Task 2: Identify the Most Endangered Species
Objective: Determine the top 5 most endangered species based on their conservation status.
Instructions:
- Sort the species by their
conservation_statusin order of severity (e.g., Critically Endangered > Endangered > Vulnerable). - List the top 5 most endangered species with their details.
Task 3: Analyze Poaching Trends Over Time
Objective: Visualize the number of poaching incidents each month.
Instructions:
- Load the
poaching_incidentsdataset. - Extract the month and year from the
dateof each incident. - Group the data by month-year and count the number of incidents.
- Create a line chart to represent the poaching trends over time.
Task 4: Map Conservation Projects to Their Habitats
Objective: Create a visualization showing which projects are targeting which habitats.
Instructions:
- Merge the
conservation_projectsandhabitatsdatasets onhabitat_id. - Plot a bar chart where each bar represents a habitat, and the height indicates the number of active projects.
- Differentiate projects by their budget using color intensity or labels.
Task 5: Calculate Average Population Estimate by Habitat
Objective: Determine the average population estimate of species in different habitats.
Instructions:
- Merge the
speciesandhabitatsdatasets onhabitat. - Group the data by
habitatand calculate the averagepopulation_estimatefor each group. - Display the results in a table.
Task 6: Forecast Future Resource Needs
Objective: Predict the required amount of Anti-Poaching Equipment for the next year based on historical data.
Instructions:
- Analyze the trend in
poaching_incidentsfrom thepoaching_incidentsdataset. - Use a simple linear regression model to forecast the number of poaching incidents for each month in the next year.
- Estimate the required
Anti-Poaching Equipmentbased on the forecasted incidents. - Plot the historical data and forecasted values.
Task 7: Visualize Species Distribution Across Habitats
Objective: Create a visual representation of how species are distributed across different habitats.
Instructions:
- Load the
speciesdataset. - Count the number of species in each
habitat. - Generate a pie chart or bar graph to show the distribution.
Task 8: Optimize Resource Allocation for Conservation Projects
Objective: Allocate available resources to conservation projects based on their budget and habitat priority.
Instructions:
- Consider the
resourcesdataset for available resources like Rangers, Patrol Vehicles, Anti-Poaching Equipment, Funding, and Medical Supplies. - Develop a strategy to allocate resources to projects prioritizing habitats with higher numbers of endangered species.
- Display the allocation plan in a structured format.
