View daylengthplot_gist.rmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "Day length plot" | |
author: "Kenneth Wong" | |
date: "6/21/2021" | |
output: | |
md_document: | |
variant: markdown_github | |
--- | |
```{r setup, include=FALSE} |
View block1.ql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[out:json][timeout:25]; | |
// fetch area “HK” to search in | |
{{geocodeArea:HK}}->.searchArea; | |
// gather results | |
( | |
// query part for: “route=ferry” | |
way["route"="ferry"](area.searchArea); | |
relation["route"="ferry"](area.searchArea); | |
); | |
// print results |
View MainChain.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The hexagon bin feature class and the related fields | |
table = 'hex_bins_MYS' | |
fields = ["Matsuya","Yoshinoya","Sukiya","Max_No","MainChain"] | |
with arcpy.da.UpdateCursor(table, fields) as cursor: | |
for row in cursor: | |
Mainchain = "" | |
for column_no in range(3): |
View nakau_part1.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def main(): | |
""" | |
Get the details of the shop by brute-force searching the id of the shop | |
""" | |
# Approximate minimum and maximum storeid are searched manually | |
storeid_min = 2050 | |
storeid_max = 2600 | |
outFile = 'nakau_rawdata.csv' |
View nakau.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import csv | |
from bs4 import BeautifulSoup | |
from requests.exceptions import HTTPError | |
def get_data_nakau(storeid): | |
""" | |
Get the data of the store with given storeid |