Skip to content

Sapphirine/Migration_Project_202512-17

Repository files navigation

Migration Forecasting Project

A full-stack application for forecasting city-to-city migration patterns using time-series analysis and machine learning. The system enables scenario-based simulations (e.g., Spring Festival, COVID-19) and provides interactive visualizations of migration flows.

Overview

This project combines time-series forecasting models (XGBoost) with interactive geospatial visualization to predict and analyze inter-city migration patterns. Users can explore different scenarios and visualize migration flows through an intuitive web interface powered by Kepler.gl.

System Architecture

The project is organized into four main components:

  • Frontend: React + TypeScript web application with Kepler.gl for interactive map visualizations
  • Backend: FastAPI REST API handling data requests and forecasting operations
  • Model: XGBoost-based time-series forecasting models and two-stage method with scenario simulation capabilities
  • Data: City-to-city migration datasets with geographic coordinates

Getting Started

Prerequisites

  • Python 3.8+ with pip
  • Node.js 16+ with npm

Backend Setup

  1. Install Python dependencies:

    pip install -r requirements.txt
  2. Start the FastAPI server:

    cd backend
    uvicorn main:app --reload

    The API will be available at http://localhost:8000

Frontend Setup

  1. Install Node.js dependencies:

    cd frontend
    npm install
  2. Start the development server:

    npm run dev

    The frontend will be available at http://localhost:5173

Running the Application

  1. Ensure both backend and frontend servers are running
  2. Open http://localhost:5173 in your browser
  3. Select scenarios, date ranges, and geographic filters to explore migration forecasts

Project Structure

migration-project/
├── backend/          # FastAPI application
├── frontend/         # React + TypeScript application
├── prediction_model/ # XGBoost forecasting models & two stage method 
├── requirements.txt  # Python dependencies
└── README.md        # This file

License

This project is intended for coursework or demonstration purposes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors