Skip to content

Sea Level Rise Data & Coastal Flooding. Note : Main algo is intentionally dumped due to copyright @ayushsiloiya619. It will made available in public soon . Stay tuned!!

Notifications You must be signed in to change notification settings

ayushsiloiya619/Sea-rise-Coastal-flooding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Sea_Coastal_Real_Time_Analysis

Sea Level Rise Data & Coastal Flooding Data.

  1. The code begins by importing the requests library, which is used to send HTTP requests to the server and retrieve data.

  2. An API token is set for the NOAA API, which will be used for authentication when making requests to the NOAA API.

  3. The base_url variable is set to the base URL for station queries in the NOAA API.

  4. The request headers are set with the API token using a dictionary named headers.

  5. The code enters a try-except block to handle any potential exceptions that may occur during the execution.

  6. Two station IDs are defined: sea_level_rise_station_id and coastal_flooding_station_id, representing specific stations for sea level rise and coastal flooding data.

  7. The URLs for sea level rise and coastal flooding data are constructed by appending the station IDs to the base_url.

  8. The code sends a GET request to the NOAA API to fetch the sea level rise data using the requests.get() function. The API token is included in the request headers.

  9. The response from the API is obtained and converted to a JSON format using the response.json() method.

  10. Specific data fields from the sea level rise data are extracted and stored in variables for further use.

  11. The sea level rise data is printed, displaying the values of the extracted fields.

  12. The code sends another GET request to the NOAA API to fetch the coastal flooding data using the requests.get() function, similar to the previous step.

  13. The response from the API is obtained and converted to JSON format.

  14. Specific data fields from the coastal flooding data are extracted and stored in variables.

  15. The coastal flooding data is printed, displaying the values of the extracted fields.

  16. If any exceptions occur during the execution of the code, they will be caught in the except block, and an error message will be printed.

To summarize, this code fetches data related to sea level rise and coastal flooding from the NOAA API by making HTTP requests using the requests library. The data is then extracted and printed to display specific fields such as elevation, dates, latitude, longitude, etc.

Notice: All content on this website, including text, graphics, logos, images, audio clips, and software, is the property of Ayush Siloiya and is protected by international copyright laws. Unauthorized use, reproduction, modification, distribution, or duplication of any content on this website is strictly prohibited and may result in legal action. Visitors to this website may not download, copy, or distribute any materials on this site without prior written permission from Ayush Siloiya.

© 2023 Ayush Siloiya. All rights reserved.

About

Sea Level Rise Data & Coastal Flooding. Note : Main algo is intentionally dumped due to copyright @ayushsiloiya619. It will made available in public soon . Stay tuned!!

Topics

Resources

Stars

Watchers

Forks