- Go to https://www.yomiuri.co.jp/election/local/togisen2021/kouho/
- Select the element with class
"uni-election-local-2021 local-2021-kouho"
and open it in Browser console - Copy the code in scraper.js to the Browser console and run
let res = main(districts)
- Save
res
intoraw_results.json
- Run
python process_json.py
to generateprocessed_results.json
- Download the Japan administrative boundaries from https://gadm.org/download_country_v3.html (
gadm36_JPN_shp.zip
) and rename the Level 1 shapefile toTokyo_boundaries.geojson
- Run
python analyse.py
to generateout.png
akazukin5151 / 2021_tokyo_assembly_elections Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0