![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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMjEzODAsIm5iZiI6MTcyNDAyMTA4MCwicGF0aCI6Ii84NzU2NDQ5NS8yNzcxNzA4MDktMTdjZmRkN2EtZWE2Zi00MDlmLWE5YWEtYjlmMDM4NTEyZTk1LmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDIyNDQ0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk5N2UyNzhlNGU4YzE5OTlhM2Y0YTJiMzgzMWE0YTEyMmJmYzVlNjdlN2UxNGVmOTI3M2QwMWFjYTM2NjM5MTcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.4EYg5_Q-nhXGsnb2JnjSEMG4ohFYwN6akAlQ25Fil9U)
![Create, update(Put, Patch), Delete a particular object](https://private-user-images.githubusercontent.com/87564495/277171607-e38f2e4c-9dfc-47a7-86e3-c3ef64c31d63.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMjEzODAsIm5iZiI6MTcyNDAyMTA4MCwicGF0aCI6Ii84NzU2NDQ5NS8yNzcxNzE2MDctZTM4ZjJlNGMtOWRmYy00N2E3LTg2ZTMtYzNlZjY0YzMxZDYzLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDIyNDQ0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgxZjEwZDE0ZmUxZGI1NGI0N2ExZDY2MWNjNTBiMGEzZTBmMGNlZTk3ZTVjYzAyMmU1NWFhODExNjU0NDdmMzEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.yJsmuUacJ0tOMuL7SYc79wSzzC5YP7TNgKINdk6hL80)
![Admin view of all center-point objects](https://private-user-images.githubusercontent.com/87564495/277172159-f48d37e2-44cb-4ba3-add9-7bb710770167.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMjEzODAsIm5iZiI6MTcyNDAyMTA4MCwicGF0aCI6Ii84NzU2NDQ5NS8yNzcxNzIxNTktZjQ4ZDM3ZTItNDRjYi00YmEzLWFkZDktN2JiNzEwNzcwMTY3LmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDIyNDQ0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVkZmIyZDQxOTUzMTNkMWY1N2IwYjZiYTEwOTFhMzFkOGI4OTgzNWZiOWU5NzQ3ZWUxMTVjMjM3Mjc0NWZmOGQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.48EG2-HM5cnnrC-Ya6Q5FYbMfvwpulCEiuTJre-MSZ0)
- 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.