In week 4 term 4, I was working on my assignment.
My topic
The chosen topic for my topic will be the London Crime Data.
How will I process the data
I think in my project, I will “reshape” the dataset into the data I need in the following way:
- Select a specefic major category
- Merge the total value of that crime category in years in different area
- Pick a random sample and generate a graph, repeat this step 3 times
- Haven’t decide what graph yet but probably will find out next year
- Compare and contrust the 3 output
Code showcase
- Select data function:
1
def get_sql_query(columns:list, where:str,limit:int):
This function generates a SQL query that can get data from the dataset
- Random sample function:
1
def get_random_sample(n=100:int):
This function returns a random sample with the given amount
- Pick specefic mahor in year
1
def specefic_major_vs_year(n:int,major:str):
This function returns how many cases of the specefic crime category in year
How will I talk about the visualisation
Base on the visualisation, I will talk about the trends, and talk about any similarities and differences. I might also research on what happened in specefic years that leads to a trend.
How will I attach my code
I will attach my code in Kaggle, due to the database is too large to download.
Reflection
I think I’ve done well this week, I used my time wisely, and the class time this week actually helps me a lot with the assignment.