Skip to content

Commit 874670a

Browse files
authored
Merge pull request #2047 from Esri/jy-adv-cart1
use relative link to refer to api guide and change comment text
2 parents 64ba115 + e12e753 commit 874670a

File tree

1 file changed

+40
-10
lines changed

1 file changed

+40
-10
lines changed

guide/10-mapping-and-visualization/advanced-cartography-part1.ipynb

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,39 @@
2727
},
2828
{
2929
"cell_type": "code",
30-
"execution_count": 1,
30+
"execution_count": null,
3131
"metadata": {},
3232
"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+
],
3363
"source": [
3464
"from arcgis.gis import GIS\n",
3565
"\n",
@@ -82,7 +112,7 @@
82112
"cell_type": "markdown",
83113
"metadata": {},
84114
"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)."
86116
]
87117
},
88118
{
@@ -91,12 +121,6 @@
91121
"metadata": {},
92122
"outputs": [],
93123
"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",
100124
"from arcgis.layers import Service\n",
101125
"\n",
102126
"usa_flayer = Service(\n",
@@ -112,6 +136,12 @@
112136
"metadata": {},
113137
"outputs": [],
114138
"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",
115145
"renderer_manager = map1.content.renderer(0)\n",
116146
"smart_mapping_manager = renderer_manager.smart_mapping()\n",
117147
"smart_mapping_manager.class_breaks_renderer(break_type=\"color\", field=\"M086_07\")"
@@ -776,7 +806,7 @@
776806
"## Conclusion\n",
777807
"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",
778808
"\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."
780810
]
781811
}
782812
],
@@ -796,7 +826,7 @@
796826
"name": "python",
797827
"nbconvert_exporter": "python",
798828
"pygments_lexer": "ipython3",
799-
"version": "3.10.14"
829+
"version": "3.11.0"
800830
},
801831
"toc": {
802832
"base_numbering": 1,

0 commit comments

Comments
 (0)