A project by Emelie Hofland and Jaime González-Arintero for the NASA Space Apps Challenge 2019 in Berlin, on October 18-20, 2019.
"Smashing SDGs by automatically matching places that need help with people that can help."
CatastroFix finds remote human settlements with high risk of natural disasters by means of NASA satellite data. Then, it looks for partners that could help local communities to become more resilient to such risks. Finally, it generates proposals aligned with the targets of the Sustainable Development Goals.
The video pitch is available in YouTube. Just click on the picture below.
A live demo of the application, hosted in Google Cloud, is available here.
NOTE: Some of the following data sets have been converted from ESRI ASCII raster format to shapefiles. A detailed explanation of the conversion procedure can be found in the next section.
- Converted data set (in this repository):
data/gdpgamrt-earthquake
- Raw source: NASA SEDAC, Columbia University
- Converted data set (in this repository):
data/gddrgmrt-drought
- Raw source: NASA SEDAC, Columbia University
- Converted data set (in this repository):
data/gdfldmrt-flood
- Raw source: NASA SEDAC, Columbia University
- Converted data set (in this repository):
data/gdlndmrt-landslide
- Raw source: NASA SEDAC, Columbia University
- Converted data set (in this repository):
data/gdcycmrt-cyclone
- Raw source: NASA SEDAC, Columbia University
- Data set (in this repository):
data/GDL-SHDI-SHP-2-human-development-index
- Raw source: Global Data Lab, Institute for Management Research, Radboud University
- Data set (in this repository):
data/gl_grumpv1_ppoints_shp-settlements
- Raw source: NASA SEDAC, Columbia University
A minimal database has been created so the application can match the areas at risk with the potential help sources. Such database has been compiled as a .csv
file, and includes some universities and institutes of technology from all over the world. Although the names, addresses and specialities are real, the contact persons and their titles are fictional (for privacy reasons).
The columns drought
, flood
, hunger.medical
and natural.disasters
indicate if each institution could effectively provide assistance in those emergency situations. For example, a TRUE
in hunger.medical
would mean that the institution in particular can support population suffering from hunger and/or in need of medical assistance. However, a FALSE
in flood
would mean that the institution doesn't count with enough resources or the right speciality to support flooded areas.
ATTENTION: Although all commands work, this section is a work in progress and still needs to be reviewed.
The tool gdal
is required for the format conversion, available via Anaconda or Miniconda.
-
To get started, download the Miniconda install script.
-
Install Miniconda running the provided script:
sh Miniconda3-latest-MacOSX-x86_64.sh
-
Close terminal, and open a new one, so the new aliases are available.
-
Install
gdal
using theconda
package manager:conda install -c conda-forge gdal
-
Create a
conda
environment; in this case it's named "CONVERSION":conda create --yes --channel conda-forge --name CONVERSION gdal
-
Activate it:
conda activate CONVERSION
-
Finally,
gdal
can be imported in Python:python -c 'import gdal;print(dir(gdal))'
Files can now be converted innvoking gdal
from the conda
environment, by means of the gdal_polygonize.py
tool:
gdal_polygonize.py -f "ESRI Shapefile" input-esri-ascii.asc output-shapefile.shp
The output shapefiles can now be easily imported in R.
NOTE: Data sets that required pre-processing have already been converted, and their shapefiles can be found in the "data sets" section.
- First of all, install R from the official source, depending on your operating system:
-
Once ready, install RStudio, since it will be needed to run the app. Simply choose one of the official installers.
-
Clone this repository to your machine (or skip this step if it was already done):
git clone https://github.com/Emelieh21/catastrofix-nasa-space-apps.git
-
Open RStudio, and run the following command on the console window (at the bottom left corner) to install the required packages:
install.packages(c("shiny","shinydashboard","leaflet","dplyr","geosphere","rgeos","RColorBrewer", "readxl"))
NOTE: This could take a few minutes, as the packages must be compiled for the target system.
-
Head to the folder of the tool, where the repository was cloned, (e.g.
/Downloads/catastrofix-nasa-space-apps
). -
Open the file
app.R
with RStudio. -
Click on "Run App" (small green "play" button).
- Add hunger dataset to the docs.
- Finish documenting the deployment in Google Cloud.
- Review the data conversion section.
Copyright (C) 2019 Emelie Hofland [email protected], Jaime González-Arintero [email protected]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
Except as contained in this notice, the name(s) of the above copyright holders shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization.
THE SOFTWARE IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.