Name: magicbox-aggregate-mobility
Owner: unicef
Description: Aggregates Amadeus airport to airport mobility by municipality/state in CSV format
Created: 2017-05-30 18:29:18.0
Updated: 2018-05-14 13:38:05.0
Pushed: 2018-05-16 15:37:51.0
Size: 235
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Aggregate Amadeus mobility data by administrative boundary to produce CSV output
This repository aggregates Amadeus mobility data by
administrative boundaries to output a CSV file where each line is
orig,dest,count
.
Administrative boundaries (ABs) are concepts to describe different geospatial concepts, like countries, states, provinces, and more. Read more about ABs on the MagicBox wiki.
Amadeus provides a lot of raw data. Not all of it is useful for MagicBox. This tool reduces the amount of data into three fields:
orig
: Origin airportdest
: Destination airportcount
: Number of people traveling between orig
to dest
This data helps us understand travel patterns for MagicBox. For example, we may be able to predict a risk of a virus (e.g. Zika) to spread to a new location.
These instructions get you a copy of the project up and running on your local machine for development and testing purposes.
Make sure JAVA_HOME
environment variable is set on your system. If you install
Hadoop and Spark from the source, make sure they are on your system PATH
(e.g.
hadoop-3.0.0/bin
and spark-2.2.1-bin-hadoop2.7/bin
).
Run these commands at a command prompt.
clone https://github.com/unicef/magicbox-aggregate-mobility.git
agicbox-aggregate-mobility
onfig_sample.js config.js
install
There are a few different options to set in the config.js
file:
zipped
: Stores compressed Amadeus traffic dataprocessed
: Final location of processed dataspark_path
: Install location of spark shell binary spark-shell
.
Leave blank if spark-shell
is in your path.
note: please include a trailing slash.aggregation_level
: value in form adminX where X is one of 0, 1, 2, 3, 4 or 5.
The administrative level boundary level data should be aggregated to.fields
: Filtered fields from raw Amadeus dataTo get the compressed data?
More info coming soon.
In this repository you can find a Dockerfile to build an image of this project.
Build the image:
er build -t unicef/magicbox_aggregate_mobility .
You can then run this project within docker using:
er run --rm -v $(pwd):/app unicef/magicbox_aggregate_mobility node main.js
run test
Check out the following:
This project is licensed under the BSD 3-Clause License.