Skip to content

Commit a786032

Browse files
authored
harmonise folder structure of the Python script
- add requisite spatial data and survey data
1 parent 3756f90 commit a786032

35 files changed

+9578
-14
lines changed

thesis_data_analysis.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,27 +31,24 @@
3131
import random
3232

3333
# Working directories
34-
wd = r"C:\Sampon\Maantiede\Master of the Universe"
35-
script_wd = r"C:\Sampon\Maantiede\Master of the Universe/python"
34+
wd = r"C:\Sampon\Maantiede\Master of the Universe\python"
3635

3736
# Survey data file paths
38-
records_data = r"leaflet_survey_results\records.csv"
39-
visitors_data = r"leaflet_survey_results\visitors.csv"
37+
records_data = r"thesis_data_python\records.csv"
38+
visitors_data = r"thesis_data_python\visitors.csv"
4039

4140
# Spatial data paths
42-
grid_path = r"python\MetropAccess_YKR_grid_EurefFIN.shp"
43-
resarea_path = r"python\paavo\pno_dissolve.shp"
44-
postal_path = r"python\paavo\2019\pno_tilasto_2019.shp"
45-
ykr_path = r"yhdyskuntarakenteenvyoh17\YKRVyohykkeet2017.shp"
46-
artificial_path = r"clc2018_fi20m\clc2018_level1_dissolve.shp"
47-
ttm_path = r"HelsinkiTravelTimeMatrix2018\{0}xxx\travel_times_to_ {1}.txt"
41+
grid_path = r"thesis_data_python\MetropAccess_YKR_grid_EurefFIN.shp"
42+
resarea_path = r"thesis_data_python\pno_dissolve.shp"
43+
postal_path = r"thesis_data_python\pno_tilasto_2019.shp"
44+
ykr_path = r"thesis_data_python\YKRVyohykkeet2017.shp"
45+
artificial_path = r"thesis_data_python\clc2018_level1_dissolve.shp"
4846

4947
# Import functions and lists of zipcodes. Has to be done after inserting
5048
# os.chdir()
51-
os.chdir(script_wd)
49+
os.chdir(wd)
5250
from thesis_data_analysis_funcs import *
5351
from thesis_data_zipcodes import *
54-
os.chdir(wd)
5552

5653

5754

@@ -567,8 +564,8 @@
567564

568565
# Calculate jenks breaks for "artificial". Use breaks to reclassify values
569566
# in records. We will use code created by GitHub user Drewda. We will
570-
# generate the breaks with postal, so that postal code values are not
571-
# repeated over and over in the calculation.
567+
# generate the breaks with "postal", so that repeated rows of "records.artificial"
568+
# do not interfere with class breaks calculations.
572569
breaks = getJenksBreaks(postal.artificial.tolist(), 5)
573570

574571
# See the breaks on plot
@@ -595,6 +592,9 @@
595592
"Fully built",
596593
"novalue"))))))))).tolist()
597594

595+
# Get amount of artificial classes for thesis
596+
#records.groupby("zipcode").first().groupby("artificial").size()
597+
598598

599599

600600
### B) YKR zones
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PROJCS["EUREF_FIN_TM35FIN",GEOGCS["GCS_EUREF_FIN",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",27.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?xml version="1.0"?>
2+
<!--<!DOCTYPE metadata SYSTEM "http://www.esri.com/metadata/esriprof80.dtd">-->
3+
<metadata xml:lang="fi"><Esri><CreaDate>20140131</CreaDate><CreaTime>14415000</CreaTime><SyncOnce>TRUE</SyncOnce><DataProperties><lineage><Process ToolSource="G:\Program Files (x86)\ArcGIS\ArcToolbox\Toolboxes\Conversion Tools.tbx\RasterToPolygon" Date="20120828" Time="145831">RasterToPolygon r250_rast W:\gis_user\eerolaka\ruudut\EUREF\r250_polygon.shp NO_SIMPLIFY Value</Process><Process ToolSource="c:\program files (x86)\arcgis\desktop10.0\ArcToolbox\Toolboxes\Data Management Tools.tbx\Project" Date="20130610" Time="134334">Project C:\HY-Data\PSAARSAL\documents\Massa-ajot_Xavi\ykr_pk.shp C:\HY-Data\PSAARSAL\documents\temp\ykr_pk_Project.dbf PROJCS['Finland_Zone_2',GEOGCS['GCS_KKJ',DATUM['D_KKJ',SPHEROID['International_1924',6378388.0,297.0]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Gauss_Kruger'],PARAMETER['False_Easting',2500000.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',24.0],PARAMETER['Scale_Factor',1.0],PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]] KKJ_To_EUREF_FIN #</Process><Process ToolSource="C:\Program Files (x86)\ArcGIS\Desktop10.0\ArcToolbox\Toolboxes\Data Management Tools.tbx\CalculateField" Date="20130814" Time="134834">CalculateField massa_origins ID_orig [ID] VB #</Process><Process ToolSource="C:\Program Files (x86)\ArcGIS\Desktop10.0\ArcToolbox\Toolboxes\Data Management Tools.tbx\CalculateField" Date="20130814" Time="134900">CalculateField massa_origins ID_orig [ID] VB #</Process><Process ToolSource="c:\program files (x86)\arcgis\desktop10.0\ArcToolbox\Toolboxes\Data Management Tools.tbx\Project" Date="20140131" Time="133146">Project massa_origins P:\h510\metropaccess\Henkilokohtaiset_kansiot\Perttu\Megamassa-ajo\massa_ruudut.shp PROJCS['Finland_Zone_3',GEOGCS['GCS_KKJ',DATUM['D_KKJ',SPHEROID['International_1924',6378388.0,297.0]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Gauss_Kruger'],PARAMETER['False_Easting',3500000.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',27.0],PARAMETER['Scale_Factor',1.0],PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]] # PROJCS['Finland_Zone_2',GEOGCS['GCS_KKJ',DATUM['D_KKJ',SPHEROID['International_1924',6378388.0,297.0]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Gauss_Kruger'],PARAMETER['False_Easting',2500000.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',24.0],PARAMETER['Scale_Factor',1.0],PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]</Process><Process ToolSource="c:\program files (x86)\arcgis\desktop10.1\ArcToolbox\Toolboxes\Data Management Tools.tbx\Project" Date="20140131" Time="144151">Project MetropAccess_YKR_grid_WGS84 C:\HY-Data\HENTENKA\Python\MassaAjoNiputus\ShapeFileet\MetropAccess_YKR_grid_EurefFIN.shp PROJCS['EUREF_FIN_TM35FIN',GEOGCS['GCS_EUREF_FIN',DATUM['D_ETRS_1989',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',27.0],PARAMETER['Scale_Factor',0.9996],PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]] EUREF_FIN_To_WGS_1984 GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433],METADATA['World',-180.0,-90.0,180.0,90.0,0.0,0.0174532925199433,0.0,1262]]</Process><Process ToolSource="c:\program files (x86)\arcgis\desktop10.1\ArcToolbox\Toolboxes\Data Management Tools.tbx\CalculateField" Date="20140203" Time="104517">CalculateField MetropAccess_YKR_grid_EurefFIN YKR_ID [ID_orig] VB #</Process><Process ToolSource="c:\program files (x86)\arcgis\desktop10.1\ArcToolbox\Toolboxes\Data Management Tools.tbx\CalculateField" Date="20140203" Time="104551">CalculateField MetropAccess_YKR_grid_EurefFIN YKR_ID [ID_orig] VB #</Process></lineage></DataProperties><ArcGISFormat>1.0</ArcGISFormat></Esri></metadata>
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
UTF-8
428 KB
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PROJCS["EUREF_FIN_TM35FIN",GEOGCS["GCS_EUREF_FIN",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",27.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]
99.2 KB
Binary file not shown.
30 KB
Binary file not shown.
1.05 KB
Binary file not shown.
1.56 MB
Binary file not shown.

thesis_data_python/YKRVyohykkeet2017.shp.xml

Lines changed: 5 additions & 0 deletions
Large diffs are not rendered by default.
25.1 KB
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1252
900 Bytes
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PROJCS["EUREF_FIN_TM35FIN",GEOGCS["GCS_ETRS_1989",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",27.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]
135 KB
Binary file not shown.
108 Bytes
Binary file not shown.

thesis_data_python/pno_dissolve.cpg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ISO-8859-1

thesis_data_python/pno_dissolve.dbf

6.08 KB
Binary file not shown.

thesis_data_python/pno_dissolve.prj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PROJCS["ETRS89_TM35FIN_E_N",GEOGCS["GCS_ETRS_1989",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]

thesis_data_python/pno_dissolve.shp

179 KB
Binary file not shown.

thesis_data_python/pno_dissolve.shx

108 Bytes
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
UTF-8
2.17 MB
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PROJCS["ETRS89_TM35FIN_E_N",GEOGCS["GCS_ETRS_1989",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]
77.3 KB
Binary file not shown.
11.5 MB
Binary file not shown.
23.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)