<jupyter_start><jupyter_text>How to set different Projections in Magics This notebook will help you discover it.    Install MagicsIf you don't have Magics installed, run the next cell to install Magics using conda.<jupyter_code># Install Magics in the current Jupyter kernel
import sys
!conda install --yes --prefix {sys.prefix} Magics<jupyter_output><empty_output><jupyter_text>**Magics** supports several different projections.  Some of them are:   cylindrical, polar_stereographic, polar_north, mercator, mollweide, lambert, bonne etc.  There are couple of satellite view and meteorology specific projections suported too, such as:  meteosat, meteosat_57E, goes, goes_east etc. In this Notebook we will explore couple of them, and different ways of setting parameters.  Import Magics<jupyter_code>import Magics.macro as magics<jupyter_output><empty_output><jupyter_text>For start we will define some none projection parameters, which we will not change later.<jupyter_code>coast = magics.mcoast( 
            map_coastline_colour            = "grey",
            map_coastline_land_shade        = "on", 
            map_coastline_land_shade_colour = "cream", 
            map_grid                        = "on", 
            map_grid_colour                 = "grey", 
            map_coastline_sea_shade         = "on", 
            map_coastline_sea_shade_colour  = "white", 
            map_label                       = "off")<jupyter_output><empty_output><jupyter_text>If you are a beginner, and want to focus on other things, Magics has several predefined projections.  This is the list of Magics predefined projections:  ['north_pole', 'eurasia', 'global', 'south_west_europe',   'east_tropic', 'south_east_europe', 'south_east_asia_and_indonesia',   'northern_africa', 'antarctic', 'central_europe',   'pacific', 'southern_asia', 'south_america',   'north_east_europe', 'north_west_europe', 'europe',   'arctic', 'central_america', 'southern_africa',   'eastern_asia', 'middle_east_and_india', 'west_tropic',   'south_pole', 'south_atlantic_and_indian_ocean',   'equatorial_pacific', 'australasia', 'north_atlantic',   'western_asia', 'north_america']<jupyter_code>projection = magics.mmap(
    subpage_map_library_area = "on",
    subpage_map_area_name    = 'south_west_europe',
    page_id_line             = "off"
)

magics.plot(projection, coast)<jupyter_output><empty_output><jupyter_text>Global cylindrical projectionNow lets see how we can use some of Magics projecitons.  Global cylindrical projection is also Magics' default projection.<jupyter_code>projection = magics.mmap(
                  subpage_map_projection        = "cylindrical",
                  subpage_upper_right_longitude = 180.,
                  subpage_upper_right_latitude  = 90.,
                  subpage_lower_left_longitude  =  -180.,
                  subpage_lower_left_latitude   = -90.,
                  page_id_line                  = "off")

magics.plot(projection, coast)<jupyter_output><empty_output><jupyter_text>Cylindrical projection - Australia<jupyter_code>projection = magics.mmap(
                  subpage_upper_right_longitude = 190.00,
                  subpage_upper_right_latitude  = -5.00,
                  subpage_lower_left_latitude   = -55.00,
                  subpage_lower_left_longitude  = 80.00,
                  subpage_map_projection        = "cylindrical",
                  page_id_line                  = "off" )

magics.plot(projection, coast)<jupyter_output><empty_output><jupyter_text>Polar stereographic - Europe<jupyter_code>projection = magics.mmap(
                  subpage_lower_left_latitude   = 21.51,
                  subpage_lower_left_longitude  = -37.27,
                  subpage_upper_right_latitude  = 51.28, 
                  subpage_upper_right_longitude = 65., 
                  subpage_map_projection        = "polar_stereographic",
                  page_id_line                  = "off")

magics.plot(projection, coast)<jupyter_output><empty_output><jupyter_text>Polar stereographic - North America<jupyter_code>projection = magics.mmap(
                  subpage_lower_left_latitude    = -5.00,
                  subpage_lower_left_longitude   = -140.00,
                  subpage_upper_right_latitude   = 30.00, 
                  subpage_upper_right_longitude  = -15.00, 
                  subpage_map_vertical_longitude = -100.00,
                  subpage_map_projection         = "polar_stereographic",
                  page_id_line                   = "off"
)

magics.plot(projection, coast)<jupyter_output><empty_output><jupyter_text>Lambert projection<jupyter_code>projection = magics.mmap(
                  subpage_map_projection        = "lambert",
                  subpage_lower_left_latitude   = -0.00,
                  subpage_lower_left_longitude  = -80.00,  
                  subpage_upper_right_latitude  = 70.00,
                  subpage_upper_right_longitude = 160.00,
                  subpage_map_area_definition   = "corners",
                  page_id_line                  = "off"
)

magics.plot(projection, coast)<jupyter_output><empty_output><jupyter_text>Mollweide projection<jupyter_code>projection = magics.mmap(
    subpage_map_projection      = "mollweide",
    subpage_map_area_definition = "full",
    page_id_line                = "off")

magics.plot(projection, coast)<jupyter_output><empty_output><jupyter_text>Tilted perspective (experimental)<jupyter_code>projection = magics.mmap(
    subpage_map_projection                = "tpers", 
    subpage_frame                         = "off",
    page_frame                            = "off",
    subpage_map_projection_tilt           = 0.,
    subpage_map_projection_azimuth        = 60.,
    subpage_map_projection_view_latitude  = 40.,
    subpage_map_projection_view_longitude = 10.,
    page_id_line                          = "off"
                        )

magics.plot(projection, magics.mcoast())<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08207957204948178, 'fraction_numerical': 0.014376462721497826, 'mean_word_length': 2.6042168674698796, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '11', 'dir': 'jupyter-structured-clean-dedup', 'id': '265300', 'license': 'Apache-2.0', 'n_tokens_mistral': 2004, 'n_tokens_neox': 1826, 'n_words': 331, 'path': 'visualisation/tutorials/Subpage-Projections.ipynb', 'repo_name': 'mozartmae/notebook-examples', 'size': '5982'}