Extract these location coordinates from this html file

Assignment Help Basic Computer Science
Reference no: EM131082257

In Section 11.8.3 we saw that the latitudes and longitudes for the countries are available on the Web, embedded in the page at https://dev.maxmind.com/geoip/ legacy/codes/average-latitude-and-longitude-for-countries/. A snippet of the HTML source for this page is shown in Figure 11.10. Extract these location coordinates from this HTML file.

1125_585f1ed3-a53c-4c9f-9f12-2987f6b910ac.png

Examine the HTML source, and notice that the data are simply placed as plain text within a node in the document. If we can extract the contents of this node, then we can place this information in a data frame. Begin by parsing
the HTML document with html Parse(). Don't download the document, simply pass the function the URL, https://dev.maxmind.com/geoip/legacy/codes/ average-latitude-and-longitude-for-countries.
Next, access the root of the document using xml Root (), and use an X Path expression to locate the nodes in the document.

The get Node Set() function should be useful here. The get Node Set() function takes the XML tree (or sub tree) and an X Path expression as input and returns a list of all nodes in the tree that are located with this expression.
Once you have located these nodes, check to see how many were found. It should be only one. The latitude and longitude values are in the text content of this node. Extract the text content with the xml Value () function. It should look something like:

1258_74a2e234-b6e7-4849-ab09-48f5aad8d8db.png

The content is one long character string containing all the data.

Complete the exercise by reading the plain text in your character vector into a data frame. Use read table () to do this. The parameters, text, skip, header, and sep should be useful here.

Reference no: EM131082257

Questions Cloud

Compute the net present worth to determine whether : A machine costs $1,000,000 to purchase and will produce $200,000 per year revenue. Annual operating and maintenance cost is $50,000. The company plans to use the machine for 10 years and then sell it for scrap for which it expects to receive $50,000...
Company must receive each year to breakeven on investment : A company purchases a new unit of machinery for $20,000. The machinery is to be sold at the end of 10 years for $2,000.If the company uses a MARR of 10%, what is the equivalent uniform net profit cash flow the company must receive each year to breake..
Find a formula for the number of cells as a function of time : Functions worksheet. A confused cell with a terrifying genetic mutation divides into two cells exactly one minute after being created. Then, after another minute each of the two new cells will divide, and so on. Find a formula for the number of cel..
Main components of financial analysis : What are the main components of ‘Financial Analysis' while working out the Detail Project Report? Why ‘Margin Money' for working capital is required to be provided as ‘Initial Investment' for the first year of operation?
Extract these location coordinates from this html file : Complete the exercise by reading the plain text in your character vector into a data frame. Use read table () to do this. The parameters, text, skip, header, and sep should be useful here.
Question regarding the chicago manual style : Sociologist argue that the individual must first learn society's culture in order to effectively interact with those around him/her. to What extent to you agree to this statement.
What interest rate must the investment earn : A teacher invests $5,000 at the end of every year for a 30-year career.If this teacher wants to have $1,000,000 in savings at retirement, what interest rate must the investment earn? (Show Work)
Different strategic approach : While PetSmart's prices are 11 percent lower on an average than Petco's, it stresses the services offered in its stores to boost revenues and profitability.Petco's strategy is to have smaller stores with more space for merchandise. Both companies ..
Cost-benefit analysis and cost-effectiveness analysis : The difference between a basic “cost-benefit analysis” and a “cost-effectiveness analysis”. In addition, tell me a potential scenario where a cost effectiveness analysis should be used instead of a cost benefit analysis.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd