Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#2 and #3 Python 3 C 2. GeoJSON (15 pts) Let's continue practing working working with GeoJSON data, which is one format for vector data

#2 and #3 image text in transcribed
image text in transcribed
Python 3 C 2. GeoJSON (15 pts) Let's continue practing working working with GeoJSON data, which is one format for vector data Now we will use a more complex GeoJSON file. The following cities dictionary has a collection of 6 US cities. Write a function that calculates the following information Count of the number of cities in the dataset Total population of all cities Total land area of all cities 11Mere is a list of the first 6 US cities in the following detaset: https://row.githubusercontent.com/albertbowden/us-dataoster/shapefiles/us-cities/geojson/us_cities.geofson cities "type": "FeatureCollection", "features" {"type": "Feature", "properties": { AREAME": "Ewa Beach", "CLASS": "COP", "ST": "HI", "STFIPS": "15", "PLACEFIP": "87450", "CAPITAL": "w", {"type": "Festure", "properties" : { "AREANAME": "Halown", "CLASS":"COP", "st": "HI", "STEIPS": "1", "PLACEFIP":"10000", "CAPITAL": "", "R -type": "Feature", "properties": [ "AREANAME"10", "CLASS": "COP","ST": "", "STFIPS", "1", "PLACEFIP": "34650", "CAPITAL": "", "REA "type": "Feature", "properties": [ "AREANAMH: "Honolulu", "CLASS": "COP", "ST": "HI", "STFIPS": "45", "PLACEFIP": "27000", "CAPITAL": "Y". { "type": "Feature", "properties": { "AREANAME": "Kahulul", "CLASS":"COP", """, "STFIPS": "1", "PLACEFIP": "22700", "CAPITAL": "", "A { "type": "Feature", "properties": "ARENAME" : "Kailua", "CLASS": "COP", "S1":"HI", "STFIPS": "1", "PLACEFIP", -2315e", "CAPITAL", "W", "AR 1) def cities internation(geojson): pass. Remove this line and insert your own code here for the function Call your cities information function cities information (eities) Saving completed Mode: Command Ln 23. Col27 Lab_2021 ( In 157 IM Python 3 O 3. More vector calculations (10 points) Let's make it more interesting. Using the same cities dataset write a new function that calculates the following Average population of all cities Mean center of all the city locations (now we get to use the spatial information) The mean center is the central point for a set of features (points in our case). For more information check out the following webpage http://desktoparcgis.com/ertutcrmap/10.3/tools/spatial statistics-toolbox/mean-center.htm Important note: To get averages you must use the information you already calculated from the previous question (totak and counts). Then it becomes an easylish) task C. Here is a list of the first US cities in the following dataset https://row.githubusercontent.com/jolbertbouden/us-dota/master/pefiles/useities/oro json/us_cles.us.com cities "type": "Featurecollection". "features" { "type": "Feature", "properties":( PARLAME: Ewa Beach, "CLASS": "P", "ST": "", "STEPS": "15", "PLACERTP" : "450". "CAPITALS W. type": "esture", "properties": ( AREA: 1, "CLASS","COP","ST": ", "STF3PS""1", "PLACES, 10000","CAPITAL, type": "Feature", "propertiest ( MEME 316", "CLASS", "CO", "st": ", "PS: ***, PLACEP: 3650-, "CAPITAL, , type": "Feature properties" ( ALLAH", "CLASS":"CO", "SI", "STFIPS""1", "PLACUI 1700w", "CAPITAL, Y, "type": "Feature", "properties"("ARE", "Kahulul", "CLASS"COP", "ST": "", "STEPS: "1", "PLACERTP*22700*, CAPITAL: "Y, A ("type": "Festure", "properties ( ARENE, "kalua", "CLASS", "COP", "SI"HI", "STFIPS": "15", MACEFTP, *2350", "KAPITAL", "W". " 2) defies are intratto conosson) Pass Remove the name your code here for the function Copies for con function cities average information cities) Mode Command Colab 4 2011 S.comeleted 10 Python 3 C 2. GeoJSON (15 pts) Let's continue practing working working with GeoJSON data, which is one format for vector data Now we will use a more complex GeoJSON file. The following cities dictionary has a collection of 6 US cities. Write a function that calculates the following information Count of the number of cities in the dataset Total population of all cities Total land area of all cities 11Mere is a list of the first 6 US cities in the following detaset: https://row.githubusercontent.com/albertbowden/us-dataoster/shapefiles/us-cities/geojson/us_cities.geofson cities "type": "FeatureCollection", "features" {"type": "Feature", "properties": { AREAME": "Ewa Beach", "CLASS": "COP", "ST": "HI", "STFIPS": "15", "PLACEFIP": "87450", "CAPITAL": "w", {"type": "Festure", "properties" : { "AREANAME": "Halown", "CLASS":"COP", "st": "HI", "STEIPS": "1", "PLACEFIP":"10000", "CAPITAL": "", "R -type": "Feature", "properties": [ "AREANAME"10", "CLASS": "COP","ST": "", "STFIPS", "1", "PLACEFIP": "34650", "CAPITAL": "", "REA "type": "Feature", "properties": [ "AREANAMH: "Honolulu", "CLASS": "COP", "ST": "HI", "STFIPS": "45", "PLACEFIP": "27000", "CAPITAL": "Y". { "type": "Feature", "properties": { "AREANAME": "Kahulul", "CLASS":"COP", """, "STFIPS": "1", "PLACEFIP": "22700", "CAPITAL": "", "A { "type": "Feature", "properties": "ARENAME" : "Kailua", "CLASS": "COP", "S1":"HI", "STFIPS": "1", "PLACEFIP", -2315e", "CAPITAL", "W", "AR 1) def cities internation(geojson): pass. Remove this line and insert your own code here for the function Call your cities information function cities information (eities) Saving completed Mode: Command Ln 23. Col27 Lab_2021 ( In 157 IM Python 3 O 3. More vector calculations (10 points) Let's make it more interesting. Using the same cities dataset write a new function that calculates the following Average population of all cities Mean center of all the city locations (now we get to use the spatial information) The mean center is the central point for a set of features (points in our case). For more information check out the following webpage http://desktoparcgis.com/ertutcrmap/10.3/tools/spatial statistics-toolbox/mean-center.htm Important note: To get averages you must use the information you already calculated from the previous question (totak and counts). Then it becomes an easylish) task C. Here is a list of the first US cities in the following dataset https://row.githubusercontent.com/jolbertbouden/us-dota/master/pefiles/useities/oro json/us_cles.us.com cities "type": "Featurecollection". "features" { "type": "Feature", "properties":( PARLAME: Ewa Beach, "CLASS": "P", "ST": "", "STEPS": "15", "PLACERTP" : "450". "CAPITALS W. type": "esture", "properties": ( AREA: 1, "CLASS","COP","ST": ", "STF3PS""1", "PLACES, 10000","CAPITAL, type": "Feature", "propertiest ( MEME 316", "CLASS", "CO", "st": ", "PS: ***, PLACEP: 3650-, "CAPITAL, , type": "Feature properties" ( ALLAH", "CLASS":"CO", "SI", "STFIPS""1", "PLACUI 1700w", "CAPITAL, Y, "type": "Feature", "properties"("ARE", "Kahulul", "CLASS"COP", "ST": "", "STEPS: "1", "PLACERTP*22700*, CAPITAL: "Y, A ("type": "Festure", "properties ( ARENE, "kalua", "CLASS", "COP", "SI"HI", "STFIPS": "15", MACEFTP, *2350", "KAPITAL", "W". " 2) defies are intratto conosson) Pass Remove the name your code here for the function Copies for con function cities average information cities) Mode Command Colab 4 2011 S.comeleted 10

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2012 Administration

Authors: Adam Jorgensen, Steven Wort

1st Edition

1118106881, 9781118106884

Students also viewed these Databases questions