Git Product home page Git Product logo

flightseir's Introduction

FlightSEIR

Repo for paper Incorporating Dynamic Flight Network in SEIR to Model Mobility between Populations.

Prerequisites

See requirements.txt.

This project leverages pyflightdata API, a wrapper around flightradar24, to fetch flights data.

Project Structure

.
|-- datasets
|   |-- airports
|   |-- edge_lists
|   |-- historic_flights
|   |-- unique_flights
|-- graphs
|   |-- covid
|   |-- flights
|-- logs
|-- src
|   |-- data
|   |-- model
|-- states

Data Collection

  1. Fetch all countries: python src/data/fetch_countries.py
  2. Fetch all airports of all country: python src/data/fetch_airports.py
  3. Collect a list of flights departing and arriving a the given country: python src/data/fetch_unique_flights.py --countries Canada Note: due to limitations of pyflightdata, fetch_unique_flights.py can only fetch live flights. In order to obtain a comprehensive list of flights to and from Canada, one must run this script repeatly over a long period of time.
  4. Fetches the historic flights of a given country: python src/data/fetch_historic_flights.py --countries Canada Note: by default, pyflightdata only returns historic data for the past 7 days. In order to obtain 90/360 days of past flights, one must subscribe to the Silver/Gold plan on flightradar24 and login programmatically with f.login("username", "password").
  5. Download owid-covid-data.csv from Total COVID-19 Tests Performed by Country and place it under datasets folder.
  6. Download can_covid19.csv from Coronavirus disease (COVID-19): Outbreak update and place it under datasets folder.
  7. Download reported_flights_stats.csv from Domestic and international Itinerant movements and place it under datasets folder.
  8. Download canada_population_by_prov.csv and place it under datasets folder.

Data Processing

  1. Construct flight network edge list for Canada: python src/data/construct_edge_list.py --country=Canada followed by python src/data/process_flights_data.py
  2. Construct flight network edge list for provinces: python src/data/construct_edge_list.py --use_country --country=Canada followed by python src/data/process_flights_data.py --use_country
  3. To process test positive rates for the world, run src/data/process_positive_rate_world.ipynb to produce test-rate-processed.csv
  4. To process test positive rates for provinces, run src/data/process_positive_rate_can.ipynb to produce can_covid19_processed.csv
  5. To generate interpolated test positive rates, run src/data/interpolate_positive_rate.ipynb to produce interpolated_positive_rates.csv
  6. To generate data used for experiments, run src/data/flight-seir-Canada.ipynb. The generated data will be saved in the states folder.

Experiments

Run src/model/early_time_prediction.ipynb or src/model/reopen_simulation.ipynb.

flightseir's People

Contributors

charlottexiaoyeding avatar

Stargazers

shenyang(Andy) Huang avatar

Watchers

 avatar

flightseir's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.