{"nbformat":4,"nbformat_minor":0,"metadata":{"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"colab":{"name":"index.ipynb","provenance":[],"collapsed_sections":[]}},"cells":[{"cell_type":"markdown","metadata":{"id":"qnwDXmVMKal9"},"source":["# ufro_uhi_plot\n","\n","> Python proyect to plotting urban heat island."]},{"cell_type":"markdown","metadata":{"id":"Tsj88dQYKal-"},"source":["## Install"]},{"cell_type":"markdown","metadata":{"id":"FxilRFbBKal-"},"source":["`pip install ufro_uhi_plot`"]},{"cell_type":"markdown","metadata":{"id":"9Or04PW2Kal_"},"source":["## How to use"]},{"cell_type":"markdown","metadata":{"id":"vOW-rXybQ4TO"},"source":["Import Uhi from the package"]},{"cell_type":"code","metadata":{"id":"r-nVqlh4QBf3","executionInfo":{"status":"ok","timestamp":1614313126357,"user_tz":180,"elapsed":40068,"user":{"displayName":"ALIWEN ANSELMO LEONARDO MELILLAN RAGUILEO","photoUrl":"","userId":"01472878631407744750"}}},"source":["from ufro_uhi_plot.uhi import Uhi"],"execution_count":3,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"BQ7-0J5jQ8al"},"source":["Instantiate the Uhi Class"]},{"cell_type":"code","metadata":{"id":"W8AUkK5nKal_","executionInfo":{"status":"ok","timestamp":1614313126718,"user_tz":180,"elapsed":39484,"user":{"displayName":"ALIWEN ANSELMO LEONARDO MELILLAN RAGUILEO","photoUrl":"","userId":"01472878631407744750"}}},"source":["file_path = \"examples/data_example.csv\"\r\n","station_label = \"Vivienda.ID\"\r\n","datetime_label = \"Fecha\"\r\n","temperature_label = \"Pm25\"\r\n","latitude_label = \"Latitud\"\r\n","longitude_label = \"Longitud\"\r\n","\r\n","uhi = Uhi(file_path,station_label,datetime_label,temperature_label,latitude_label,longitude_label)"],"execution_count":4,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"XpyXfgwgRSGR"},"source":["Plot the images according your preferences"]},{"cell_type":"code","metadata":{"id":"XMCFUp0yKamB","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1614313281375,"user_tz":180,"elapsed":154647,"user":{"displayName":"ALIWEN ANSELMO LEONARDO MELILLAN RAGUILEO","photoUrl":"","userId":"01472878631407744750"}},"outputId":"ca17a81d-c38e-4c1e-c996-4db28ca14dbb"},"source":["\r\n","output_folder=\"examples/generated maps\"\r\n","\r\n","days_array = [\"2019-05-26\"]\r\n","extent = [-72.69,-72.53,-38.78,-38.68]\r\n","prefix_file = \"contamination map\"\r\n","unit = \"ug/m³\"\r\n","mapbox_username = #<insert your mapbox's username>\r\n","mapbox_token= #<insert your mapbox's token>\r\n","\r\n","uhi.plotImagesPerDaysArray(output_folder,days_array,extent,prefixFile=prefix_file,hasLimits=True,Z_UNIT=unit,mapbox_username=mapbox_username,mapbox_token=mapbox_token)"],"execution_count":5,"outputs":[{"output_type":"stream","text":["Successfully created the directory examples/generated maps\n","Plotting UHI Map of  2019-05-26\n","...\n","2019-05-26 00:59:35\n","2019-05-26 01:59:35\n","2019-05-26 02:59:35\n","2019-05-26 03:59:35\n","2019-05-26 04:59:35\n","2019-05-26 05:59:35\n","2019-05-26 06:59:35\n","2019-05-26 07:59:35\n","2019-05-26 08:59:35\n","2019-05-26 09:59:35\n","2019-05-26 10:59:35\n","2019-05-26 11:59:35\n","2019-05-26 12:59:35\n","2019-05-26 13:59:35\n","2019-05-26 14:59:36\n","2019-05-26 15:59:35\n","2019-05-26 16:59:35\n","2019-05-26 17:59:35\n","2019-05-26 18:59:35\n","2019-05-26 19:59:35\n","2019-05-26 20:59:35\n","2019-05-26 21:59:36\n","2019-05-26 22:59:35\n","2019-05-26 23:59:35\n","Plot completed 2019-05-26\n"],"name":"stdout"}]},{"cell_type":"markdown","metadata":{"id":"jFqfRRtYCcYH"},"source":["### Google Colab use"]},{"cell_type":"markdown","metadata":{"id":"4slM-MMJRdl0"},"source":["If you have a problem with Google Colab you can install a script in a jupyter notebox that fix this."]},{"cell_type":"code","metadata":{"id":"9-SOmCLuJRHH"},"source":["!pip install import-ipynb\n","import import_ipynb\n","!wget https://raw.githubusercontent.com/raguileoam/Colab/master/CartopyColab.ipynb\n","from CartopyColab import cartopy"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"id":"QNpDJGaUdMvM"},"source":[""],"execution_count":null,"outputs":[]}]}