laitimes

With his son in mind, he took three steps to make a heat map of the trajectory

Occasionally brush Huawei Health Discovery can apply to download all personal exercise data, so the application is submitted. Data can not be obtained at that time, after almost a week, the data package is ready, the application and preparation of the data package process, Huawei will repeatedly confirm with you whether the data is provided to me, the trouble is some trouble, but after all, it is personal sensitive data, do not accept it and have to accept it.

The data is obtained, what is it used for? The son had a sudden idea and wanted to make a heat map of all the previous trajectories.

With his son in mind, he took three steps to make a heat map of the trajectory

Over the past year, the footprints of the great river north and south

So I said do it, and there were a lot of detours in the middle, but the process was still quite interesting.

The first step is to sort out the waypoint data. The son is enthusiastic about pathon these days, and the task of collating data is mainly undertaken by the son. Of course, it is okay not to use pathon, that is, excel processes such a large amount of data and takes a lot of time at each step.

About a year and a half ago, I started using Huawei bracelets and later upgraded to the watch GT runner. There was a similar idea before, when the mobile phone was used to generate the path of each movement, and then export the path, put the path into the google earth, probably has such a meaning, dense "pouring water droplets", there is no effect of heat map, very chaotic.

The amount of huawei motion data that has been decompressed is not small, and all waypoint data is stored in a file called motion path detail data.json. After the son's analysis, screening and sorting, 750,000 waypoint values were obtained. After the amount of data comes up, the speed of processing with tools such as Excel is suddenly much slower. Ten lines of pathon programs, it will be processed in a few seconds, and the son's sense of accomplishment will not be mentioned, "This is the first time I have compiled a 'useful' program!" ”

With his son in mind, he took three steps to make a heat map of the trajectory

Thermal Power Shenzhen

The next step is to make a heat map with tools. The most commonly found heat map tool is usually to make a certain value of a specific geographical location into a heat map effect, such as specifying a specific location coordinate for the Chaoyang District of Beijing, and then assigning the local measured pm2.5 to this position. But what we have to do is put a large number of random points on the map and represent them as heat values on the map according to the density of occurrences. Baidu, AutoNavi and many tools for geographic information systems seem to be able to do, either need to write a network script, or need to pay, and we just want to experience it. Finally found a tool, arcgis pro, the software is available in several versions, including stand-alone, enterprise, and 21-day trial version, can open free accounts for educators and students. I opened a trial account, but then I found that in fact, the web version could perfectly achieve the results we wanted.

With his son in mind, he took three steps to make a heat map of the trajectory

Thermal Imperial Capital

The most time-consuming part of the specific operation is to process the data, more than 750,000 pieces of data imported into which software is a disaster, so we used the interval extraction method to produce 1/100, 1/50, 1/20, 1/10 four sets of data. Test results 1/100 of the data waypoint spacing is a little large, after enlargement the display effect is not satisfactory, 1/10 of the data interval is small enough, the system has been very slow to process, and finally used 1/100, 1/50, 1/20 three sets of data, to 1/50 and 1/20 display effect is better.

With his son in mind, he took three steps to make a heat map of the trajectory

Thermal ski slopes

Here's how:

Step 1: Prepare the waypoint data (.csv file)

Step 2: Access (https://learngis2.maps.arcgis.com/), register and activate the account;

Log in to the website, click "Content", drag the prepared waypoint data to the "My Content" page, map the corresponding fields according to the system guidance, the address quota of each account is limited, but we only need to deposit latitude and longitude information, so it is not affected;

Step 3: In the map viewer, you can adjust the style and parameters displayed by the imported waypoints, and there are many styles to choose from according to your preferences.

With his son in mind, he took three steps to make a heat map of the trajectory

.csv files can be dragged directly to or to the side area

With his son in mind, he took three steps to make a heat map of the trajectory

After the data is imported, open the map view to view

With his son in mind, he took three steps to make a heat map of the trajectory

Adjust the display style to Heat Map

With his son in mind, he took three steps to make a heat map of the trajectory

Adjusts how the heat map is displayed

With his son in mind, he took three steps to make a heat map of the trajectory

Basemap backgrounds are also optional

From the perspective of large steps, the above three steps can make their own motion trajectory heat map, and interested partners can grope for it.