diff --git a/.gitignore b/.gitignore index 6fe5676..44a138c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -10_15_7months_final.pkl -webapp/10_15_7months_final.pkl +*.pkl +webapp/*.pkl # Byte-compiled / optimized / DLL files __pycache__/ diff --git a/webapp/README.md b/webapp/README.md index dd8adc8..d7fe10b 100644 --- a/webapp/README.md +++ b/webapp/README.md @@ -3,8 +3,8 @@ * Python (tested with 3.7) * virtualenv + virtualenvwrapper * flask + geopandas + python-dotenv (listed in `requirements.txt`) -* a CSV file containing at least the following columns - * `id`: unique id for the observation, used for lookup with the `?id=` URL param +* a CSV file containing at least the following columns (column names can be changed in config file) + * `UNIQUE_ID`: unique id for the observation, used for lookup with the `?id=` URL param * `VIEW_DATE`: initial observation date (YYYY-MM-DD) * `LAT`: longitude, WGS84/EPSG:4326 * `LONG`: longitude, WGS84/EPSG:4326 @@ -32,7 +32,7 @@ export FLASK_SECRET_KEY= ## Defining CSV file name to load -Edit `DATABASE_FILE_BASENAME` in `web_app_config.cfg` to use your own data +Edit `DATABASE_FILE_BASENAME`, `ID_COLUMN`, `LAT_COLUMN` and `LONG_COLUMN` in `web_app_config.cfg` to use your own data # Running the application locally diff --git a/webapp/sample_data.csv b/webapp/sample_data.csv index 2d4bb3e..ec714b9 100644 --- a/webapp/sample_data.csv +++ b/webapp/sample_data.csv @@ -1,4 +1,4 @@ -,CLASSNAME,VIEW_DATE,AREAUCKM,AREAMUNKM,MUNICIPALI,UF,LAT,LONG,URL_NEW -12719,BURNING SCAR,03/09/2020,7.809546108,7.809546108,Canaa dos Carajas,PA,-50.4562,-6.3556,https://PlanetHack2020Deforestation.pythonanywhere.com/api/v1/notice?id=12719 -57865,DEFORESTATION_CR,27/07/2020,0,0.815044466,Altamira,PA,-55.1294,-7.48811,https://PlanetHack2020Deforestation.pythonanywhere.com/api/v1/notice?id=57865 -163496,DEFORESTATION_CR,25/06/2020,0,3.04882942,Feliz Natal,MT,-54.0208,-12.0592,https://PlanetHack2020Deforestation.pythonanywhere.com/api/v1/notice?id=163496 +UNIQUE_ID,VIEW_DATE,LAT,LONG,URL_NEW +"1","2020-09-03","-50.4562","-6.3556","http://127.0.0.1:5001/api/v1/notice?id=1" +"2","2020-07-27","-55.1294","-7.48811","http://127.0.0.1:5001/api/v1/notice?id=2" +"3","2020-06-25","-54.0208","-12.0592","http://127.0.0.1:5001/api/v1/notice?id=3" \ No newline at end of file