Tag : cartopy

——Exploring the “Ontario Climate Change Data Portal”: A Case Study in Data Exploration Prompts searchable table Examples Download csv file from internet ChatGPT prompt I want you to act as a Python developer tasked with downloading a CSV file from the internet using the provided URL: https://lamps.math.yorku.ca/OntarioClimate/data/content/grids/Historical/Monthly_2m_temperature_8964_ERA5_January1981toMarch2021.csv. To accomplish this, write a Python script that ..

Read more

My example of Python code for mapping variables overlay with geographic information. Elements in the map include ocean, coastline,borders,lakes,rivers,province borders, contour, contourf, pcolormesh, scatter, labels, province (or state) names. Also includes information about how to set cmap, what range of the data (minimum, maximum) to show, how many levels to display the data. How to ..

Read more

conda create –name pygdal conda activate pygdal conda install -c conda-forge gdal #from osgeo import gdal #to make jupyter server work pip install –upgrade jupyterhub pip install –upgrade nbconvert conda install -c conda-forge notebook conda install -c conda-forge jupyter_contrib_nbextensions # install cartopy conda install -c conda-forge cartopy #install rasterio for reading tiff file conda install ..

Read more

from scipy.ndimage.filters import gaussian_filter lats = tp.coords[‘latitude’][:] lons = tp.coords[‘longitude’][:] ct_x=[-79.617,-75.717,-86.917,-93.783] ct_y=[43.667,45.383,49.767,51.067] ct_n=[‘Toronto’,’Ottawa’,’Geraldton’,’Red Lake’] projection = ccrs.PlateCarree() provinc_bodr = cartopy.feature.NaturalEarthFeature(category=’cultural’, name=’admin_1_states_provinces_lines’, scale=’50m’, facecolor=’none’, edgecolor=’k’) axes_class = (GeoAxes, dict(map_projection=projection)) # lons, lats = np.meshgrid(lons, lats) title_text=[“season=DJF(m/s)”, “season=MAM(m/s)”, “season=JJA(m/s)”, “season=SON(m/s)”] fig = plt.figure(figsize=(15,15)) axgr = AxesGrid(fig, 111, axes_class=axes_class, nrows_ncols=(1, 1), axes_pad=0.6, cbar_location=’right’, cbar_mode=’single’, cbar_pad=0.2, cbar_size=’2%’, label_mode=”) # ..

Read more