![Main Leaflet page with latest weather information(temprature, humidity)](https://private-user-images.githubusercontent.com/87564495/277170809-17cfdd7a-ea6f-409f-a9aa-b9f038512e95.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NzE1NTYsIm5iZiI6MTczOTQ3MTI1NiwicGF0aCI6Ii84NzU2NDQ5NS8yNzcxNzA4MDktMTdjZmRkN2EtZWE2Zi00MDlmLWE5YWEtYjlmMDM4NTEyZTk1LmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDE4MjczNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFjZTg4MGYxMzg4ZDgzMzNlNDg5NmEwNDcyZjVjMzk3YmM1MjBmMTkxOTA4MTZiNmQzZTcwOGIzNjZjMWNjYmEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.iMHu37-p_Jh2p6Z-o1GR9fMEM5H0x8KfEfw7XvRQdzg)
![Create, update(Put, Patch), Delete a particular object](https://private-user-images.githubusercontent.com/87564495/277171607-e38f2e4c-9dfc-47a7-86e3-c3ef64c31d63.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NzE1NTYsIm5iZiI6MTczOTQ3MTI1NiwicGF0aCI6Ii84NzU2NDQ5NS8yNzcxNzE2MDctZTM4ZjJlNGMtOWRmYy00N2E3LTg2ZTMtYzNlZjY0YzMxZDYzLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDE4MjczNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTllZDI1NDBlNjhjMmQ2ZTVkMTgwYWUxY2E0NDdhNjdiNzdhMzRkZTQxZDg0YTU3NWFiODQzMzJjMzcyNWQ2ZmYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.U3uXLY7cGHHXwmX5SbEmNZSxwQYHJuAH-zRJH7wFsic)
![Admin view of all center-point objects](https://private-user-images.githubusercontent.com/87564495/277172159-f48d37e2-44cb-4ba3-add9-7bb710770167.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NzE1NTYsIm5iZiI6MTczOTQ3MTI1NiwicGF0aCI6Ii84NzU2NDQ5NS8yNzcxNzIxNTktZjQ4ZDM3ZTItNDRjYi00YmEzLWFkZDktN2JiNzEwNzcwMTY3LmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDE4MjczNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBlODNlNDA5NjQ4MGE1NDQ5Yjg2MzBmMDZiNGJiYjliNDFmNDg1ODQ5OWI5OTgzN2MyNmQ3N2Q3MTU3ZDQxYzAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Anb3cxvnMIX2ET7RwIMFUQJs_qZNGIcpO6cbpWZrw2k)
- Install OSGeo4W via Installer, use administrator mode of cmd & type one line at one time
set OSGEO4W_ROOT=C:\OSGeo4W
set GDAL_DATA=%OSGEO4W_ROOT%\apps\gdal\share\gdal
set PROJ_LIB=%OSGEO4W_ROOT%\share\proj
set PATH=%PATH%;%OSGEO4W_ROOT%\bin
reg ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v Path /t REG_EXPAND_SZ /f /d "%PATH%"
reg ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v GDAL_DATA /t REG_EXPAND_SZ /f /d "%GDAL_DATA%"
reg ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v PROJ_LIB /t REG_EXPAND_SZ /f /d "%PROJ_LIB%"
- Install PostGis (which is extension of PostgreSQL) via Stack Builder Installer or via link https://download.osgeo.org/postgis/windows/ for your respective postgresql version
- install all dependencies there in requirements.py
- update your postgresql credentials in settings.py file
- run django program
adminName - admin password - admin@1234 Email address: admin@gmail.com
Name Location -> POINT(-0.2153 45.6402)
{
"id": 1,
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
37.7749,
-122.4194
]
},
"properties": {
"name": "ArgentinaTesting",
"temprature": 55.0,
"humidity": 27.0
}
}
Location - Point(37.7749 -122.4194)
-
Create a Python / GeoDjango / PostGIS / DRF (Django rest framework) website with Git-based source control with the ability to:
-
Store geolocations in an appropriate database model eg: PointField() ; ;
-
Retrieve National Weather Service current weather data (Temperature and humidity specifically) for the locations (https://www.weather.gov/documentation/services-web-api) ;
-
Present them as a Leaflet map on a view. https://leafletjs.com/ ;
-
Bonus: Show test coverage for the project. For each of the subtasks, we are measuring: 0) Can the candidate set up a working PostGIS / GeoDjango environment along with GitHub source control ;
-
Can the candidate produce an appropriate database model, do they understand how the Django ORM works? ;
-
Can they use a library like "requests" to communicate with an external API
-
Can they create a View in Django, and use Leaflet (a Javascript library and a Django plugin) to show the location pins on a map ;
-
Do they understand Test-Driven Development.
-
Add Points (Latitude-Longitude) to the database using Django Rest Framework and use this data to fetch Weather API
- Post API endpoints for Storing data in the database
- Update API endpoints to Update data in the database
- Delete API endpoints to Delete data from the database
-
https://docs.djangoproject.com/en/3.0/ref/contrib/gis/tutorial/
-
https://docs.djangoproject.com/en/3.0/topics/testing/advanced/#integration-with-coverage-py
You should share your completed project as a repo on GitHub on mentioned date. Looking forward to your solution.