0% found this document useful (0 votes)
10 views

Cooperative University of Kenyan Python Assignment

Uploaded by

Gershon Ayieko
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Cooperative University of Kenyan Python Assignment

Uploaded by

Gershon Ayieko
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

@edgar cc

COOPERATIVE UNIVERSITY OF KENYA [CUK]

Python Assignment: Exploring Data in the Kenyan Context

Objective:
To understand and apply Python programming concepts, including data manipulation, analysis,
and visualization, using datasets related to Kenya.

Total Marks: 100

Assignment Tasks

Task 1: Data Acquisition and Cleaning (35 Marks)

1. Dataset: Find a publicly available dataset related to Kenya. Possible sources include:
o Kenya National Bureau of Statistics (KNBS)
o World Bank Data
o Kaggle Datasets
2. Data Cleaning:
o Load the dataset into a Pandas DataFrame.
o Check for and handle missing values (drop or fill).
o Convert relevant columns to appropriate data types (e.g., date, numeric).
o Remove any duplicate entries.
3. Output:
o Print the first 5 rows of the cleaned DataFrame.
o Provide a brief summary (2-3 sentences) of the dataset.

Task 2: Data Analysis (35 Marks)

1. Descriptive Statistics:
o Calculate and display the mean, median, and standard deviation for numerical
columns.
o Identify any correlations between different numerical variables.
2. Data Grouping:
o Group the data by a categorical variable (e.g., region, year) and calculate the total
or average for a numerical variable of interest.
3. Output:
o Present the results of your analysis in a clear format (tables or charts).

Task 3: Data Visualization (20 Marks)

1. Visualization Libraries: Use Matplotlib or Seaborn to create visual representations of


the data.
2. Charts to Create:

1
@edgar cc

A bar chart showing the total population distribution across different regions in
o
Kenya.
o A line graph showing the trend of a particular variable over the years (e.g., GDP
growth, education enrollment rates).
3. Output:
o Display the charts with appropriate titles and labels.

Task 4: Code Quality and Documentation (10 Marks)

1. Code Quality:
o Ensure your code is well-organized, follows Python naming conventions, and
includes comments explaining key sections.
o Use functions to modularize your code where appropriate.
2. Documentation:
o Include a README file explaining how to run your code and any dependencies
required.

Submission Guidelines

• Format: Submit your assignment as a Jupyter Notebook (.ipynb) or a Python script (.py)
along with any necessary data files.
• Deadline: [2 dec 2024]
• Evaluation Criteria:
o Completeness and correctness of the tasks (70%)
o Quality of analysis and insights (20%)
o Code quality and documentation (10%)

You might also like