|
27 | 27 | },
|
28 | 28 | {
|
29 | 29 | "cell_type": "code",
|
30 |
| - "execution_count": 1, |
| 30 | + "execution_count": null, |
31 | 31 | "metadata": {},
|
32 | 32 | "outputs": [],
|
| 33 | + "source": [ |
| 34 | + "from arcgis.gis import GIS\n", |
| 35 | + "\n", |
| 36 | + "gis = GIS(\n", |
| 37 | + " profile=\"your_organization_profile\"\n", |
| 38 | + ")" |
| 39 | + ] |
| 40 | + }, |
| 41 | + { |
| 42 | + "cell_type": "code", |
| 43 | + "execution_count": 1, |
| 44 | + "metadata": {}, |
| 45 | + "outputs": [ |
| 46 | + { |
| 47 | + "name": "stdout", |
| 48 | + "output_type": "stream", |
| 49 | + "text": [ |
| 50 | + "Intel MKL WARNING: Support of Intel(R) Streaming SIMD Extensions 4.2 (Intel(R) SSE4.2) enabled only processors has been deprecated. Intel oneAPI Math Kernel Library 2025.0 will require Intel(R) Advanced Vector Extensions (Intel(R) AVX) instructions.\n", |
| 51 | + "Intel MKL WARNING: Support of Intel(R) Streaming SIMD Extensions 4.2 (Intel(R) SSE4.2) enabled only processors has been deprecated. Intel oneAPI Math Kernel Library 2025.0 will require Intel(R) Advanced Vector Extensions (Intel(R) AVX) instructions.\n" |
| 52 | + ] |
| 53 | + }, |
| 54 | + { |
| 55 | + "name": "stderr", |
| 56 | + "output_type": "stream", |
| 57 | + "text": [ |
| 58 | + "/Users/john3092/opt/anaconda3/envs/geosaurus_dev_env/lib/python3.11/site-packages/dask/dataframe/_pyarrow_compat.py:23: UserWarning: You are using pyarrow version 11.0.0 which is known to be insecure. See https://www.cve.org/CVERecord?id=CVE-2023-47248 for further details. Please upgrade to pyarrow>=14.0.1 or install pyarrow-hotfix to patch your current version.\n", |
| 59 | + " warnings.warn(\n" |
| 60 | + ] |
| 61 | + } |
| 62 | + ], |
33 | 63 | "source": [
|
34 | 64 | "from arcgis.gis import GIS\n",
|
35 | 65 | "\n",
|
|
82 | 112 | "cell_type": "markdown",
|
83 | 113 | "metadata": {},
|
84 | 114 | "source": [
|
85 |
| - "If you have numeric data, you may want to distinguish features using graduated colors to reflect a count or an amount. Different kinds of color ramps can be used—for example, a simple light-to-dark color ramp is good for showing low-to-high data values such as age, income, or ratio. Color ramps like this can be applied to points, lines, or polygons. Let's use a light-to-dark color ramp to represent the ratio of cropland area to general land area from low to high by county. More documentation can be found in [Style numbers](http://doc.arcgis.com/en/arcgis-online/create-maps/style-numbers.htm#ESRI_SECTION1_1D8BD412F83148C6ABF315CA10111E66)." |
| 115 | + "If you have numeric data, you may want to distinguish features using graduated colors to reflect a count or an amount. Different kinds of color ramps can be used—for example, a simple light-to-dark color ramp is good for showing low-to-high data values such as age, income, or ratio. Color ramps like this can be applied to points, lines, or polygons. Let's use a light-to-dark color ramp to represent the ratio of cropland area to general land area from low to high by county. More documentation can be found in [Style numbers](https://doc.arcgis.com/en/arcgis-online/reference/style-numbers.htm)." |
86 | 116 | ]
|
87 | 117 | },
|
88 | 118 | {
|
|
91 | 121 | "metadata": {},
|
92 | 122 | "outputs": [],
|
93 | 123 | "source": [
|
94 |
| - "\"\"\"\n", |
95 |
| - " # only 1 numeric attribute\n", |
96 |
| - " # (a) to visualize with counts and amounts (color)\n", |
97 |
| - " # field_name here represents \"The acres of total cropland as a percentage of land area in acres\"\n", |
98 |
| - "\"\"\"\n", |
99 |
| - "\n", |
100 | 124 | "from arcgis.layers import Service\n",
|
101 | 125 | "\n",
|
102 | 126 | "usa_flayer = Service(\n",
|
|
112 | 136 | "metadata": {},
|
113 | 137 | "outputs": [],
|
114 | 138 | "source": [
|
| 139 | + "\"\"\"\n", |
| 140 | + " # using 1 numeric attribute to visualize differences by color\n", |
| 141 | + " # field_name here represents \"The acres of total cropland as a percentage of land area in acres\"\n", |
| 142 | + "\"\"\"\n", |
| 143 | + "\n", |
| 144 | + "\n", |
115 | 145 | "renderer_manager = map1.content.renderer(0)\n",
|
116 | 146 | "smart_mapping_manager = renderer_manager.smart_mapping()\n",
|
117 | 147 | "smart_mapping_manager.class_breaks_renderer(break_type=\"color\", field=\"M086_07\")"
|
|
776 | 806 | "## Conclusion\n",
|
777 | 807 | "When you style a layer, the styling options offered depend on the type of features you are mapping (point, line, or polygon) as well as the type of data attributes (numbers, categories, dates, and so on) and number of attributes you choose. Each style helps you tell a slightly different story and answer different questions with your data. Samples shown here are meant to give you basic ideas of how built-in renderer types like Class Breaks Renderers or Unique Value Renderers are being used, or when you need to customize your styles, how to direct Python in allowing the Javascript API to attempt to infer the renderer by some of the Javascript API rules.\n",
|
778 | 808 | "\n",
|
779 |
| - "Now that we have mastered some basic styles of visualizing numeric or orderable data, let's move on to the second half of the topic (`advanced-cartography-part2.ipynb`) for guides on how to style your map based on categorical data." |
| 809 | + "Now that we have mastered some basic styles of visualizing numeric or orderable data, let's move on to the [Advanced Cartography Part2 guide](../advanced-cartography-part2) to style your map based on categorical data." |
780 | 810 | ]
|
781 | 811 | }
|
782 | 812 | ],
|
|
796 | 826 | "name": "python",
|
797 | 827 | "nbconvert_exporter": "python",
|
798 | 828 | "pygments_lexer": "ipython3",
|
799 |
| - "version": "3.10.14" |
| 829 | + "version": "3.11.0" |
800 | 830 | },
|
801 | 831 | "toc": {
|
802 | 832 | "base_numbering": 1,
|
|
0 commit comments