Project Overview: Analyzing Google Trends Data
Step-by-Step Process
- Data Collection
Objective: Collect Google Trends data for specific climate change-related keywords across different cities.
- Tools Used: pytrends library for accessing Google Trends data.
- Process:
- Defined a list of keywords related to climate change for each city.
- Used pytrends to fetch data for each keyword and city over a specified timeframe.
- Normalized the data using population size and internet penetration rates to ensure comparability across cities.
Reason: Normalization accounts for differences in population and internet access, providing a more accurate representation of search interest.
- Temporal Analysis
Objective: Analyze temporal trends in the collected data.
- Tools Used: pandas, matplotlib, statsmodels.
- Process:
- Performed STL decomposition to separate long-term trends, seasonal components, and residual noise.
- Created line graphs for each city, annotated with key global events related to climate change.
Reason: STL decomposition helps identify underlying patterns in time series data, while annotations provide context for observed trends.
- Geographical Analysis
Objective: Compare search interest across cities and assess spatial patterns.
- Tools Used: pandas, seaborn, geopandas, pysal.
- Process:
- Generated Kernel Density Estimation (KDE) plots to visualize search interest density.
- Created heatmaps to show regional search intensity.
- Calculated Moran’s I to assess spatial autocorrelation.
Reason: These analyses help understand how search interest varies geographically and whether it is spatially clustered.
- Visualization
Objective: Create visualizations for presentation.
- Tools Used: matplotlib, seaborn.
- Process:
- Generated line graphs, heatmaps, and KDE plots.
- Ensured visuals were labeled and annotated with major events.
Reason: Visualizations provide a clear and engaging way to communicate findings.
- Statistical Analysis
Objective: Perform statistical tests to validate findings.
- Tools Used: pymannkendall, libpysal, esda.
- Process:
- Conducted the Mann-Kendall Test to detect monotonic trends in temporal data.
- Used Moran’s I to assess spatial autocorrelation.
Reason: Statistical tests provide quantitative evidence for observed trends and patterns.
- Documentation and Reporting
Objective: Document the process and results.
- Tools Used: Markdown for report writing.
- Process:
- Created a detailed markdown report summarizing the methodology, results, and implications.
- Included recommendations based on findings.
Reason: Documentation ensures transparency and provides a reference for stakeholders to understand and act on the findings.