SlideShare ist ein Scribd-Unternehmen logo
1 von 9
Python in 10.1
Thom Mackey
Contents


‱ arcpy   Enhancements

‱ Add-ins

‱ Python   Toolboxes
FeatureClassToNumPyArray
import arcpy
import numpy
input = "C:/Data/ABSData.gdb/VIC_CCDs"
arr = arcpy.da.FeatureClassToNumPyArray(input,('CCD', 'pop_m', 'pop_f'))
# Sum the total population for males & females #
print(arr['pop_m'].sum())
print(arr['pop_f'].sum())
# Sum the female population for a particular CCD #
print(arr[arr['CCD'] == "2010101"]['pop_f'].sum())
FeatureClassToNumPyArray

import arcpy
import numpy
input = "C:/Data/ABSData.gdb/VIC_CCDs"
field1 = "INCOME"
field2 = "EDUCATION"
arr = arcpy.da.FeatureClassToNumPyArray(input, (field1, field2))
# Print correlation coefficients for the two fields
print(numpy.corrcoef((arr[field1],arr[field2])))
Improved Cursors



# Turn the contents of a GDB table into a Python list of lists
# Simple syntax & little code
with arcpy.da.SearchCursor(zonalstats_results_table,
                           ["MINORITY","MAJORITY","MEAN"]) as tblcur:
       results = [r for r in tblcur]
Improved Cursors
import arcpy
arcpy.env.workspace = "c:/data/output.gdb"
fc = "c:/data/base.gdb/roads"
fields = ("ROAD_TYPE", "BUFFER_DISTANCE")
with arcpy.da.UpdateCursor(fc, fields) as cursor:
# Update the field used in Buffer so the distance is based on road
# type. Road type is either 1, 2, 3 or 4. Distance is in meters.
       for row in cursor:
               row[1] = row[0] * 100
               cursor.updateRow(row)
arcpy.mapping: update/apply symbology
import arcpy
mxd = arcpy.mapping.MapDocument(r"C:ProjectProject.mxd")
df = arcpy.mapping.ListDataFrames(mxd, "Census")[0]
lyr = arcpy.mapping.ListLayers(mxd, "StatePopulation", df)[0]
lyrFile = arcpy.mapping.Layer(r"C:ProjectLYRsPopulation.lyr")
arcpy.mapping.UpdateLayer(df, lyr, lyrFile, True)
if lyr.symbologyType == "GRADUATED_COLORS":
         lyr.symbology.valueField = "POP2000"
         lyr.symbology.classBreakValues = [250000, 999999, 4999999, 9999999, 35000000]
         lyr.symbology.classBreakLabels = ["250,000 to 999,999", "1,000,000 to 4,999,999",
                                              "5,000,000 to 9,999,999",
                                              "10,000,000 to 35,000,000"]
arcpy.mapping.ExportToPDF(mxd, r"C:ProjectOutputStatePopulation.pdf")
del mxd, lyrFile
Add-Ins
Python Toolboxes

Weitere Àhnliche Inhalte

Was ist angesagt?

Gopher conbr golang e data science - oficial
Gopher conbr   golang e data science - oficialGopher conbr   golang e data science - oficial
Gopher conbr golang e data science - oficialRodrigo Pinheiro
 
ELECTRICAL POWER SYSTEMS ECONOMICS
ELECTRICAL POWER SYSTEMS ECONOMICSELECTRICAL POWER SYSTEMS ECONOMICS
ELECTRICAL POWER SYSTEMS ECONOMICSMohammedMedani4
 
Thesis PPT
Thesis PPTThesis PPT
Thesis PPTDrew Ferkin
 
Visualization team presentation
Visualization team presentation Visualization team presentation
Visualization team presentation madhobilota
 
Coq for ML users
Coq for ML usersCoq for ML users
Coq for ML userstmiya
 
peRm R group. Review of packages for r for market data downloading and analysis
peRm R group. Review of packages for r for market data downloading and analysispeRm R group. Review of packages for r for market data downloading and analysis
peRm R group. Review of packages for r for market data downloading and analysisVyacheslav Arbuzov
 
Py lecture5 python plots
Py lecture5 python plotsPy lecture5 python plots
Py lecture5 python plotsYoshiki Satotani
 
2 18-2018-all teams total runs
2 18-2018-all teams total runs2 18-2018-all teams total runs
2 18-2018-all teams total runsAlexander Bitar
 
Introducing the Microsoft Virtual Earth Silverlight Map Control CTP
Introducing the Microsoft Virtual Earth Silverlight Map Control CTPIntroducing the Microsoft Virtual Earth Silverlight Map Control CTP
Introducing the Microsoft Virtual Earth Silverlight Map Control CTPgoodfriday
 
La R Users Group Survey Of R Graphics
La R Users Group Survey Of R GraphicsLa R Users Group Survey Of R Graphics
La R Users Group Survey Of R Graphicsguest43ed8709
 
Python programing
Python programingPython programing
Python programingBHAVYA DOSHI
 
BIometrics- plotting DET and EER curve using Matlab
BIometrics- plotting DET and EER curve using MatlabBIometrics- plotting DET and EER curve using Matlab
BIometrics- plotting DET and EER curve using MatlabShiv Koppad
 
Compiling f”n language
Compiling f”n languageCompiling f”n language
Compiling f”n languageDidier Plaindoux
 

Was ist angesagt? (19)

Gopher conbr golang e data science - oficial
Gopher conbr   golang e data science - oficialGopher conbr   golang e data science - oficial
Gopher conbr golang e data science - oficial
 
ELECTRICAL POWER SYSTEMS ECONOMICS
ELECTRICAL POWER SYSTEMS ECONOMICSELECTRICAL POWER SYSTEMS ECONOMICS
ELECTRICAL POWER SYSTEMS ECONOMICS
 
Thesis PPT
Thesis PPTThesis PPT
Thesis PPT
 
program on Function overloading in java
program on  Function overloading in javaprogram on  Function overloading in java
program on Function overloading in java
 
Visualization team presentation
Visualization team presentation Visualization team presentation
Visualization team presentation
 
Coq for ML users
Coq for ML usersCoq for ML users
Coq for ML users
 
peRm R group. Review of packages for r for market data downloading and analysis
peRm R group. Review of packages for r for market data downloading and analysispeRm R group. Review of packages for r for market data downloading and analysis
peRm R group. Review of packages for r for market data downloading and analysis
 
Python Set.pptx
Python Set.pptxPython Set.pptx
Python Set.pptx
 
Py lecture5 python plots
Py lecture5 python plotsPy lecture5 python plots
Py lecture5 python plots
 
Om (Cont.)
Om (Cont.)Om (Cont.)
Om (Cont.)
 
2 18-2018-all teams total runs
2 18-2018-all teams total runs2 18-2018-all teams total runs
2 18-2018-all teams total runs
 
Introducing the Microsoft Virtual Earth Silverlight Map Control CTP
Introducing the Microsoft Virtual Earth Silverlight Map Control CTPIntroducing the Microsoft Virtual Earth Silverlight Map Control CTP
Introducing the Microsoft Virtual Earth Silverlight Map Control CTP
 
test
testtest
test
 
Lecture 1 mte 407
Lecture 1 mte 407Lecture 1 mte 407
Lecture 1 mte 407
 
Lecture 1 mte 407
Lecture 1 mte 407Lecture 1 mte 407
Lecture 1 mte 407
 
La R Users Group Survey Of R Graphics
La R Users Group Survey Of R GraphicsLa R Users Group Survey Of R Graphics
La R Users Group Survey Of R Graphics
 
Python programing
Python programingPython programing
Python programing
 
BIometrics- plotting DET and EER curve using Matlab
BIometrics- plotting DET and EER curve using MatlabBIometrics- plotting DET and EER curve using Matlab
BIometrics- plotting DET and EER curve using Matlab
 
Compiling f”n language
Compiling f”n languageCompiling f”n language
Compiling f”n language
 

Andere mochten auch

[Ʞ쎈수학 ë°•ëŻŒê·Œ] 3.5 객ìČŽ êł„ìž”ë„ì™€ ìž„ë©Ž 귞래프
[Ʞ쎈수학 ë°•ëŻŒê·Œ] 3.5 객ìČŽ êł„ìž”ë„ì™€ ìž„ë©Ž 귞래프[Ʞ쎈수학 ë°•ëŻŒê·Œ] 3.5 객ìČŽ êł„ìž”ë„ì™€ ìž„ë©Ž 귞래프
[Ʞ쎈수학 ë°•ëŻŒê·Œ] 3.5 객ìČŽ êł„ìž”ë„ì™€ ìž„ë©Ž 귞래프MinGeun Park
 
[C++ lab] 5. sud í”„ëĄœì íŠž ê”Źí˜„
[C++ lab] 5. sud í”„ëĄœì íŠž ê”Źí˜„[C++ lab] 5. sud í”„ëĄœì íŠž ê”Źí˜„
[C++ lab] 5. sud í”„ëĄœì íŠž ê”Źí˜„MinGeun Park
 
[C++ lab] 4. sud í”„ëĄœì íŠž 시작
[C++ lab] 4. sud í”„ëĄœì íŠž 시작[C++ lab] 4. sud í”„ëĄœì íŠž 시작
[C++ lab] 4. sud í”„ëĄœì íŠž 시작MinGeun Park
 
[C++ lab] 7. sud í”„ëĄœì íŠž ê”Źí˜„(2)
[C++ lab] 7. sud í”„ëĄœì íŠž ê”Źí˜„(2)[C++ lab] 7. sud í”„ëĄœì íŠž ê”Źí˜„(2)
[C++ lab] 7. sud í”„ëĄœì íŠž ê”Źí˜„(2)MinGeun Park
 
[C++ lab] 3. c++ í”„ëĄœê·žëž˜ë°
[C++ lab] 3. c++ í”„ëĄœê·žëž˜ë°[C++ lab] 3. c++ í”„ëĄœê·žëž˜ë°
[C++ lab] 3. c++ í”„ëĄœê·žëž˜ë°MinGeun Park
 
[íŽ˜ì°šìż ì°š] 신입 êČŒìž„ 개발자 ìƒì‹ì‚Źì „
[íŽ˜ì°šìż ì°š] 신입 êČŒìž„ 개발자 ìƒì‹ì‚Źì „[íŽ˜ì°šìż ì°š] 신입 êČŒìž„ 개발자 ìƒì‹ì‚Źì „
[íŽ˜ì°šìż ì°š] 신입 êČŒìž„ 개발자 ìƒì‹ì‚Źì „MinGeun Park
 
[C++ lab] 6. value,pointer,reference
[C++ lab] 6. value,pointer,reference[C++ lab] 6. value,pointer,reference
[C++ lab] 6. value,pointer,referenceMinGeun Park
 
[C++ lab] 1. 수업 ë‚Žìš© 및 진행 ë°©ëȕ
[C++ lab] 1. 수업 ë‚Žìš© 및 진행 ë°©ëȕ[C++ lab] 1. 수업 ë‚Žìš© 및 진행 ë°©ëȕ
[C++ lab] 1. 수업 ë‚Žìš© 및 진행 ë°©ëȕMinGeun Park
 
[C++ lab] 8. sud í”„ëĄœì íŠž ê”Źí˜„(3)
[C++ lab] 8. sud í”„ëĄœì íŠž ê”Źí˜„(3)[C++ lab] 8. sud í”„ëĄœì íŠž ê”Źí˜„(3)
[C++ lab] 8. sud í”„ëĄœì íŠž ê”Źí˜„(3)MinGeun Park
 
[C++ lab] 9. 디ëȄêč… í…ŒíŹë‹‰
[C++ lab] 9. 디ëȄêč… í…ŒíŹë‹‰[C++ lab] 9. 디ëȄêč… í…ŒíŹë‹‰
[C++ lab] 9. 디ëȄêč… í…ŒíŹë‹‰MinGeun Park
 
[C++ lab] 2. hello world
[C++ lab] 2. hello world[C++ lab] 2. hello world
[C++ lab] 2. hello worldMinGeun Park
 
C++ ëŻžì •ì˜ 행동(undefined behavior)
C++ ëŻžì •ì˜ 행동(undefined behavior)C++ ëŻžì •ì˜ 행동(undefined behavior)
C++ ëŻžì •ì˜ 행동(undefined behavior)은아 정
 
[C++ lab] 10. 메ëȘšëŠŹ 누수 ìȎ큏
[C++ lab] 10. 메ëȘšëŠŹ 누수 ìȎ큏[C++ lab] 10. 메ëȘšëŠŹ 누수 ìȎ큏
[C++ lab] 10. 메ëȘšëŠŹ 누수 ìȎ큏MinGeun Park
 
[Pl in c++] 6. battle ship 3
[Pl in c++] 6. battle ship 3[Pl in c++] 6. battle ship 3
[Pl in c++] 6. battle ship 3MinGeun Park
 
[C++adv] STL ì‚Źìš©ëČ•êłŒ ìŁŒì˜ ì‚Źí•­
[C++adv] STL ì‚Źìš©ëČ•êłŒ ìŁŒì˜ ì‚Źí•­[C++adv] STL ì‚Źìš©ëČ•êłŒ ìŁŒì˜ ì‚Źí•­
[C++adv] STL ì‚Źìš©ëČ•êłŒ ìŁŒì˜ ì‚Źí•­MinGeun Park
 
[1116 ë°•ëŻŒê·Œ] c++11에 추가된 ìƒˆëĄœìšŽ Ʞ늄듀
[1116 ë°•ëŻŒê·Œ] c++11에 추가된 ìƒˆëĄœìšŽ Ʞ늄듀[1116 ë°•ëŻŒê·Œ] c++11에 추가된 ìƒˆëĄœìšŽ Ʞ늄듀
[1116 ë°•ëŻŒê·Œ] c++11에 추가된 ìƒˆëĄœìšŽ Ʞ늄듀MinGeun Park
 
Modern C++ í”„ëĄœê·žëž˜ëšžë„Œ 위한 CPP11/14 í•”ì‹Ź
Modern C++ í”„ëĄœê·žëž˜ëšžë„Œ 위한 CPP11/14 í•”ì‹ŹModern C++ í”„ëĄœê·žëž˜ëšžë„Œ 위한 CPP11/14 í•”ì‹Ź
Modern C++ í”„ëĄœê·žëž˜ëšžë„Œ 위한 CPP11/14 í•”ì‹Źí„ë°° 씜
 
동ꔭ대 앱찜작터 1음찚:Cocos2d-X 소개, 환êČœì„€ì •, ìŁŒìš”ê°œë…
동ꔭ대 앱찜작터 1음찚:Cocos2d-X 소개, 환êČœì„€ì •, ìŁŒìš”ê°œë…ë™ê”­ëŒ€ 앱찜작터 1음찚:Cocos2d-X 소개, 환êČœì„€ì •, ìŁŒìš”ê°œë…
동ꔭ대 앱찜작터 1음찚:Cocos2d-X 소개, 환êČœì„€ì •, ìŁŒìš”ê°œë…Changhwan Yi
 
유니티의 툰셰읎딩을 ì‚Źìš©í•œ 3D 애니메읎션 표현
유니티의 툰셰읎딩을 ì‚Źìš©í•œ 3D 애니메읎션 표현유니티의 툰셰읎딩을 ì‚Źìš©í•œ 3D 애니메읎션 표현
유니티의 툰셰읎딩을 ì‚Źìš©í•œ 3D 애니메읎션 표현MinGeun Park
 

Andere mochten auch (19)

[Ʞ쎈수학 ë°•ëŻŒê·Œ] 3.5 객ìČŽ êł„ìž”ë„ì™€ ìž„ë©Ž 귞래프
[Ʞ쎈수학 ë°•ëŻŒê·Œ] 3.5 객ìČŽ êł„ìž”ë„ì™€ ìž„ë©Ž 귞래프[Ʞ쎈수학 ë°•ëŻŒê·Œ] 3.5 객ìČŽ êł„ìž”ë„ì™€ ìž„ë©Ž 귞래프
[Ʞ쎈수학 ë°•ëŻŒê·Œ] 3.5 객ìČŽ êł„ìž”ë„ì™€ ìž„ë©Ž 귞래프
 
[C++ lab] 5. sud í”„ëĄœì íŠž ê”Źí˜„
[C++ lab] 5. sud í”„ëĄœì íŠž ê”Źí˜„[C++ lab] 5. sud í”„ëĄœì íŠž ê”Źí˜„
[C++ lab] 5. sud í”„ëĄœì íŠž ê”Źí˜„
 
[C++ lab] 4. sud í”„ëĄœì íŠž 시작
[C++ lab] 4. sud í”„ëĄœì íŠž 시작[C++ lab] 4. sud í”„ëĄœì íŠž 시작
[C++ lab] 4. sud í”„ëĄœì íŠž 시작
 
[C++ lab] 7. sud í”„ëĄœì íŠž ê”Źí˜„(2)
[C++ lab] 7. sud í”„ëĄœì íŠž ê”Źí˜„(2)[C++ lab] 7. sud í”„ëĄœì íŠž ê”Źí˜„(2)
[C++ lab] 7. sud í”„ëĄœì íŠž ê”Źí˜„(2)
 
[C++ lab] 3. c++ í”„ëĄœê·žëž˜ë°
[C++ lab] 3. c++ í”„ëĄœê·žëž˜ë°[C++ lab] 3. c++ í”„ëĄœê·žëž˜ë°
[C++ lab] 3. c++ í”„ëĄœê·žëž˜ë°
 
[íŽ˜ì°šìż ì°š] 신입 êČŒìž„ 개발자 ìƒì‹ì‚Źì „
[íŽ˜ì°šìż ì°š] 신입 êČŒìž„ 개발자 ìƒì‹ì‚Źì „[íŽ˜ì°šìż ì°š] 신입 êČŒìž„ 개발자 ìƒì‹ì‚Źì „
[íŽ˜ì°šìż ì°š] 신입 êČŒìž„ 개발자 ìƒì‹ì‚Źì „
 
[C++ lab] 6. value,pointer,reference
[C++ lab] 6. value,pointer,reference[C++ lab] 6. value,pointer,reference
[C++ lab] 6. value,pointer,reference
 
[C++ lab] 1. 수업 ë‚Žìš© 및 진행 ë°©ëȕ
[C++ lab] 1. 수업 ë‚Žìš© 및 진행 ë°©ëȕ[C++ lab] 1. 수업 ë‚Žìš© 및 진행 ë°©ëȕ
[C++ lab] 1. 수업 ë‚Žìš© 및 진행 ë°©ëȕ
 
[C++ lab] 8. sud í”„ëĄœì íŠž ê”Źí˜„(3)
[C++ lab] 8. sud í”„ëĄœì íŠž ê”Źí˜„(3)[C++ lab] 8. sud í”„ëĄœì íŠž ê”Źí˜„(3)
[C++ lab] 8. sud í”„ëĄœì íŠž ê”Źí˜„(3)
 
[C++ lab] 9. 디ëȄêč… í…ŒíŹë‹‰
[C++ lab] 9. 디ëȄêč… í…ŒíŹë‹‰[C++ lab] 9. 디ëȄêč… í…ŒíŹë‹‰
[C++ lab] 9. 디ëȄêč… í…ŒíŹë‹‰
 
[C++ lab] 2. hello world
[C++ lab] 2. hello world[C++ lab] 2. hello world
[C++ lab] 2. hello world
 
C++ ëŻžì •ì˜ 행동(undefined behavior)
C++ ëŻžì •ì˜ 행동(undefined behavior)C++ ëŻžì •ì˜ 행동(undefined behavior)
C++ ëŻžì •ì˜ 행동(undefined behavior)
 
[C++ lab] 10. 메ëȘšëŠŹ 누수 ìȎ큏
[C++ lab] 10. 메ëȘšëŠŹ 누수 ìȎ큏[C++ lab] 10. 메ëȘšëŠŹ 누수 ìȎ큏
[C++ lab] 10. 메ëȘšëŠŹ 누수 ìȎ큏
 
[Pl in c++] 6. battle ship 3
[Pl in c++] 6. battle ship 3[Pl in c++] 6. battle ship 3
[Pl in c++] 6. battle ship 3
 
[C++adv] STL ì‚Źìš©ëČ•êłŒ ìŁŒì˜ ì‚Źí•­
[C++adv] STL ì‚Źìš©ëČ•êłŒ ìŁŒì˜ ì‚Źí•­[C++adv] STL ì‚Źìš©ëČ•êłŒ ìŁŒì˜ ì‚Źí•­
[C++adv] STL ì‚Źìš©ëČ•êłŒ ìŁŒì˜ ì‚Źí•­
 
[1116 ë°•ëŻŒê·Œ] c++11에 추가된 ìƒˆëĄœìšŽ Ʞ늄듀
[1116 ë°•ëŻŒê·Œ] c++11에 추가된 ìƒˆëĄœìšŽ Ʞ늄듀[1116 ë°•ëŻŒê·Œ] c++11에 추가된 ìƒˆëĄœìšŽ Ʞ늄듀
[1116 ë°•ëŻŒê·Œ] c++11에 추가된 ìƒˆëĄœìšŽ Ʞ늄듀
 
Modern C++ í”„ëĄœê·žëž˜ëšžë„Œ 위한 CPP11/14 í•”ì‹Ź
Modern C++ í”„ëĄœê·žëž˜ëšžë„Œ 위한 CPP11/14 í•”ì‹ŹModern C++ í”„ëĄœê·žëž˜ëšžë„Œ 위한 CPP11/14 í•”ì‹Ź
Modern C++ í”„ëĄœê·žëž˜ëšžë„Œ 위한 CPP11/14 í•”ì‹Ź
 
동ꔭ대 앱찜작터 1음찚:Cocos2d-X 소개, 환êČœì„€ì •, ìŁŒìš”ê°œë…
동ꔭ대 앱찜작터 1음찚:Cocos2d-X 소개, 환êČœì„€ì •, ìŁŒìš”ê°œë…ë™ê”­ëŒ€ 앱찜작터 1음찚:Cocos2d-X 소개, 환êČœì„€ì •, ìŁŒìš”ê°œë…
동ꔭ대 앱찜작터 1음찚:Cocos2d-X 소개, 환êČœì„€ì •, ìŁŒìš”ê°œë…
 
유니티의 툰셰읎딩을 ì‚Źìš©í•œ 3D 애니메읎션 표현
유니티의 툰셰읎딩을 ì‚Źìš©í•œ 3D 애니메읎션 표현유니티의 툰셰읎딩을 ì‚Źìš©í•œ 3D 애니메읎션 표현
유니티의 툰셰읎딩을 ì‚Źìš©í•œ 3D 애니메읎션 표현
 

Ähnlich wie Python at 10.1

Python en la Plataforma ArcGIS
Python en la Plataforma ArcGISPython en la Plataforma ArcGIS
Python en la Plataforma ArcGISXander Bakker
 
End-to-end Big Data Projects with Python - StampedeCon Big Data Conference 2017
End-to-end Big Data Projects with Python - StampedeCon Big Data Conference 2017End-to-end Big Data Projects with Python - StampedeCon Big Data Conference 2017
End-to-end Big Data Projects with Python - StampedeCon Big Data Conference 2017StampedeCon
 
PythonêłŒ node.jsêž°ë°˜ 데읎터 분석 및 가시화
PythonêłŒ node.jsêž°ë°˜ 데읎터 분석 및 가시화PythonêłŒ node.jsêž°ë°˜ 데읎터 분석 및 가시화
PythonêłŒ node.jsêž°ë°˜ 데읎터 분석 및 가시화Tae wook kang
 
Koalas: Making an Easy Transition from Pandas to Apache Spark
Koalas: Making an Easy Transition from Pandas to Apache SparkKoalas: Making an Easy Transition from Pandas to Apache Spark
Koalas: Making an Easy Transition from Pandas to Apache SparkDatabricks
 
Munihac 2018 - Beautiful Template Haskell
Munihac 2018 - Beautiful Template HaskellMunihac 2018 - Beautiful Template Haskell
Munihac 2018 - Beautiful Template HaskellMatthew Pickering
 
Leveraging R in Big Data of Mobile Ads (RćœšèĄŒć‹•ć»Łć‘Šć€§æ•žæ“šçš„æ‡‰ç”š)
Leveraging R in Big Data of Mobile Ads (RćœšèĄŒć‹•ć»Łć‘Šć€§æ•žæ“šçš„æ‡‰ç”š)Leveraging R in Big Data of Mobile Ads (RćœšèĄŒć‹•ć»Łć‘Šć€§æ•žæ“šçš„æ‡‰ç”š)
Leveraging R in Big Data of Mobile Ads (RćœšèĄŒć‹•ć»Łć‘Šć€§æ•žæ“šçš„æ‡‰ç”š)Craig Chao
 
Wprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
Wprowadzenie do technologii Big Data / Intro to Big Data EcosystemWprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
Wprowadzenie do technologii Big Data / Intro to Big Data EcosystemSages
 
Congressional PageRank: Graph Analytics of US Congress With Neo4j
Congressional PageRank: Graph Analytics of US Congress With Neo4jCongressional PageRank: Graph Analytics of US Congress With Neo4j
Congressional PageRank: Graph Analytics of US Congress With Neo4jWilliam Lyon
 
Robust Operations of Kafka Streams
Robust Operations of Kafka StreamsRobust Operations of Kafka Streams
Robust Operations of Kafka Streamsconfluent
 
Using the code below- I need help with creating code for the following.pdf
Using the code below- I need help with creating code for the following.pdfUsing the code below- I need help with creating code for the following.pdf
Using the code below- I need help with creating code for the following.pdfacteleshoppe
 
Emerging Languages: A Tour of the Horizon
Emerging Languages: A Tour of the HorizonEmerging Languages: A Tour of the Horizon
Emerging Languages: A Tour of the HorizonAlex Payne
 
Pythonic Graphics
Pythonic GraphicsPythonic Graphics
Pythonic GraphicsKirby Urner
 
Getting Started with MongoDB and NodeJS
Getting Started with MongoDB and NodeJSGetting Started with MongoDB and NodeJS
Getting Started with MongoDB and NodeJSMongoDB
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with ClojureDmitry Buzdin
 
Cbse question paper class_xii_paper_2000
Cbse question paper class_xii_paper_2000Cbse question paper class_xii_paper_2000
Cbse question paper class_xii_paper_2000Deepak Singh
 
Data analysis with R
Data analysis with RData analysis with R
Data analysis with RShareThis
 
Wprowadzenie do technologi Big Data i Apache Hadoop
Wprowadzenie do technologi Big Data i Apache HadoopWprowadzenie do technologi Big Data i Apache Hadoop
Wprowadzenie do technologi Big Data i Apache HadoopSages
 

Ähnlich wie Python at 10.1 (20)

Python en la Plataforma ArcGIS
Python en la Plataforma ArcGISPython en la Plataforma ArcGIS
Python en la Plataforma ArcGIS
 
End-to-end Big Data Projects with Python - StampedeCon Big Data Conference 2017
End-to-end Big Data Projects with Python - StampedeCon Big Data Conference 2017End-to-end Big Data Projects with Python - StampedeCon Big Data Conference 2017
End-to-end Big Data Projects with Python - StampedeCon Big Data Conference 2017
 
PythonêłŒ node.jsêž°ë°˜ 데읎터 분석 및 가시화
PythonêłŒ node.jsêž°ë°˜ 데읎터 분석 및 가시화PythonêłŒ node.jsêž°ë°˜ 데읎터 분석 및 가시화
PythonêłŒ node.jsêž°ë°˜ 데읎터 분석 및 가시화
 
modm
modmmodm
modm
 
Koalas: Making an Easy Transition from Pandas to Apache Spark
Koalas: Making an Easy Transition from Pandas to Apache SparkKoalas: Making an Easy Transition from Pandas to Apache Spark
Koalas: Making an Easy Transition from Pandas to Apache Spark
 
Munihac 2018 - Beautiful Template Haskell
Munihac 2018 - Beautiful Template HaskellMunihac 2018 - Beautiful Template Haskell
Munihac 2018 - Beautiful Template Haskell
 
Leveraging R in Big Data of Mobile Ads (RćœšèĄŒć‹•ć»Łć‘Šć€§æ•žæ“šçš„æ‡‰ç”š)
Leveraging R in Big Data of Mobile Ads (RćœšèĄŒć‹•ć»Łć‘Šć€§æ•žæ“šçš„æ‡‰ç”š)Leveraging R in Big Data of Mobile Ads (RćœšèĄŒć‹•ć»Łć‘Šć€§æ•žæ“šçš„æ‡‰ç”š)
Leveraging R in Big Data of Mobile Ads (RćœšèĄŒć‹•ć»Łć‘Šć€§æ•žæ“šçš„æ‡‰ç”š)
 
Wprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
Wprowadzenie do technologii Big Data / Intro to Big Data EcosystemWprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
Wprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
 
Congressional PageRank: Graph Analytics of US Congress With Neo4j
Congressional PageRank: Graph Analytics of US Congress With Neo4jCongressional PageRank: Graph Analytics of US Congress With Neo4j
Congressional PageRank: Graph Analytics of US Congress With Neo4j
 
Robust Operations of Kafka Streams
Robust Operations of Kafka StreamsRobust Operations of Kafka Streams
Robust Operations of Kafka Streams
 
Using the code below- I need help with creating code for the following.pdf
Using the code below- I need help with creating code for the following.pdfUsing the code below- I need help with creating code for the following.pdf
Using the code below- I need help with creating code for the following.pdf
 
R and cpp
R and cppR and cpp
R and cpp
 
Emerging Languages: A Tour of the Horizon
Emerging Languages: A Tour of the HorizonEmerging Languages: A Tour of the Horizon
Emerging Languages: A Tour of the Horizon
 
Pythonic Graphics
Pythonic GraphicsPythonic Graphics
Pythonic Graphics
 
CLIM Undergraduate Workshop: (Attachment) Performing Extreme Value Analysis (...
CLIM Undergraduate Workshop: (Attachment) Performing Extreme Value Analysis (...CLIM Undergraduate Workshop: (Attachment) Performing Extreme Value Analysis (...
CLIM Undergraduate Workshop: (Attachment) Performing Extreme Value Analysis (...
 
Getting Started with MongoDB and NodeJS
Getting Started with MongoDB and NodeJSGetting Started with MongoDB and NodeJS
Getting Started with MongoDB and NodeJS
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with Clojure
 
Cbse question paper class_xii_paper_2000
Cbse question paper class_xii_paper_2000Cbse question paper class_xii_paper_2000
Cbse question paper class_xii_paper_2000
 
Data analysis with R
Data analysis with RData analysis with R
Data analysis with R
 
Wprowadzenie do technologi Big Data i Apache Hadoop
Wprowadzenie do technologi Big Data i Apache HadoopWprowadzenie do technologi Big Data i Apache Hadoop
Wprowadzenie do technologi Big Data i Apache Hadoop
 

KĂŒrzlich hochgeladen

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 

KĂŒrzlich hochgeladen (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 

Python at 10.1

  • 2. Contents ‱ arcpy Enhancements ‱ Add-ins ‱ Python Toolboxes
  • 3. FeatureClassToNumPyArray import arcpy import numpy input = "C:/Data/ABSData.gdb/VIC_CCDs" arr = arcpy.da.FeatureClassToNumPyArray(input,('CCD', 'pop_m', 'pop_f')) # Sum the total population for males & females # print(arr['pop_m'].sum()) print(arr['pop_f'].sum()) # Sum the female population for a particular CCD # print(arr[arr['CCD'] == "2010101"]['pop_f'].sum())
  • 4. FeatureClassToNumPyArray import arcpy import numpy input = "C:/Data/ABSData.gdb/VIC_CCDs" field1 = "INCOME" field2 = "EDUCATION" arr = arcpy.da.FeatureClassToNumPyArray(input, (field1, field2)) # Print correlation coefficients for the two fields print(numpy.corrcoef((arr[field1],arr[field2])))
  • 5. Improved Cursors # Turn the contents of a GDB table into a Python list of lists # Simple syntax & little code with arcpy.da.SearchCursor(zonalstats_results_table, ["MINORITY","MAJORITY","MEAN"]) as tblcur: results = [r for r in tblcur]
  • 6. Improved Cursors import arcpy arcpy.env.workspace = "c:/data/output.gdb" fc = "c:/data/base.gdb/roads" fields = ("ROAD_TYPE", "BUFFER_DISTANCE") with arcpy.da.UpdateCursor(fc, fields) as cursor: # Update the field used in Buffer so the distance is based on road # type. Road type is either 1, 2, 3 or 4. Distance is in meters. for row in cursor: row[1] = row[0] * 100 cursor.updateRow(row)
  • 7. arcpy.mapping: update/apply symbology import arcpy mxd = arcpy.mapping.MapDocument(r"C:ProjectProject.mxd") df = arcpy.mapping.ListDataFrames(mxd, "Census")[0] lyr = arcpy.mapping.ListLayers(mxd, "StatePopulation", df)[0] lyrFile = arcpy.mapping.Layer(r"C:ProjectLYRsPopulation.lyr") arcpy.mapping.UpdateLayer(df, lyr, lyrFile, True) if lyr.symbologyType == "GRADUATED_COLORS": lyr.symbology.valueField = "POP2000" lyr.symbology.classBreakValues = [250000, 999999, 4999999, 9999999, 35000000] lyr.symbology.classBreakLabels = ["250,000 to 999,999", "1,000,000 to 4,999,999", "5,000,000 to 9,999,999", "10,000,000 to 35,000,000"] arcpy.mapping.ExportToPDF(mxd, r"C:ProjectOutputStatePopulation.pdf") del mxd, lyrFile

Hinweis der Redaktion

  1. ** da module - to numpy array- what's numpy?- can convert values from a feature class to a numpy array- this allows lots of things straight-up like very fast column-based summary statistics (can take the mean of a column) or manipulation of all fields/rows at once (ever needed to multiply all values in all fields by 10?)- numpy arrays are the native datatype of many scipy & related libraries. allows for good extension of functionality- even better, easy(er) transfer to-from R
  2. ** da module - fast cursors- cursors have been vastly improved; 30x faster for SearchCursor, >10x faster for insert- support "with" keyword for setup/teardown; prevents locks- have some funky shape properties accessors (centroid, x, y etc)- different syntax - requires a rewrite, not find-replace (fields req'd)
  3. ** improved mapping module- can specify basic layer symbology e.g. graduated colours, symbols, unique vals, raster classifications- can apply legend styles- automatically create server connections (deployable)
  4. ** Difference between add-ins & script tools- addins involve a toolbar- user interaction e.g. click on feature, drag envelope, type in address- anything that requires dynamic interaction is better as an addin** How to make/distribute them- have a "template wizard" which sets up the folder structure & basic classes- fills in the config.xml which could be edited directly- ultimately just a .zip file with a different extension** List of functions/events you can use- Can capture following events: - dbl-click - circle, rectangle, line - info about mouse click: - which button - map OR screen coordinates on mouse-down or mouse-up - whether a modifier (shift, ctrl, alt) was present - keypress captures (incl. modifiers)- All these can be fed into your tool logic. Could generate custom editing, extraction, interactive geoprocessing, etc.
  5. ** What they are- .pyt file- Just a Python script with specific classes- ArcGIS understands them as a Toolbox- Incorporates everything: parameter info, descriptions, validation, program logic** Advantages over "normal" toolboxes- Easier to deploy- Easier to maintain - can actually have >1 person editing at once, with proper version control!- Could theoretically generate them automatically... with different tools according to some parameters. We used to have to make >1 toolbox with subsets of tools, this would have helped- No worrying about relative paths/python files going missing/models losing their sub-models