
Veeam R&D . 40 , , , Rustonka . Veeam , . , , , : , , , , . , , - โ .
โ , , , :
10 16 ?
1300 . , , .
, , , . , , , .
โ , . 14 . 298 . . 1,3 .
14 . , , , . โ , . , , , , . โ , , .
. , , , . , , 100 , . , . IPR Praha : , , , , .. , .
. , . โ , โ . , 22 .
url_population =  'https://www.czso.cz/documents/10180/25233177/sldb_zv.csv'
df_population = pd.read_csv(url_population,encoding = "ISO 8859-2")
df_population = df_population[(df_population.uzcis == 44)& (df_population.nazev.str.find('Praha') != -1)][['nazev','u01','u04', 'u05', 'u06']]
df_population.rename(columns={'nazev':'Name','u01':'Total', 'u04':'Kids', 'u05':'Middle', 'u06':'Senior'}, inplace = True)
df_population['Name'] = df_population['Name'].map(lambda x: x.lower())
. IPR Praha.
, GitHub repository
?
: , , , . , : , , . - API, -, - , - .
, . XML , . 2273 . , , , , .
, 500 . , : , .
, geo-API .
import geocoder
def get_coordinates(dataFrame, index_row):
    dict_coordinates = {}
    total_count = len(dataFrame.index)
    current = 0
    errors = 0
    for index, row in dataFrame.iterrows():
        try:
            g = geocoder.arcgis(row[index_row])
            lat = g.json['lat']
            lng = g.json['lng']
            dict_coordinates[index] = [lat, lng]
            current+=1
        except:
            errors+=1
            print ('Failed to get coordinates for {}: {}'.format(index_row, sys.exc_info()[0]))
    dataFrame['latitude'] = 0.0
    dataFrame['longitude'] = 0.0
    for k, v in dict_coordinates.items():
        dataFrame.loc[k,'latitude']=v[0]
        dataFrame.loc[k,'longitude']=v[1]
    print('Done: Total: {} Success: {} Error {}'.format(total_count, current, errors))
print('Environment was initializied')
url_schools = 'https://rejstriky.msmt.cz/opendata/vrejcz010.xml'
file_schools = 'schools.xml'
results = requests.get(url_schools)
results.content
with open(file_schools, 'w') as file:
    file.write(results.text)
print('Loaded')
import xml.etree.ElementTree as et 
xtree = et.parse(file_schools)
xroot = xtree.getroot()
dic_scools = []
try:
    for entry in xroot.findall('PravniSubjekt'):
        place_group = entry.find('SkolyZarizeni')
        if(place_group is None):
            continue
        for place in place_group.findall('SkolaZarizeni'):
            s_id = place.find('IZO').text
            s_type = place.find('SkolaDruhTyp').text
            s_name = place.find('SkolaPlnyNazev').text
            s_capasity = place.find('SkolaKapacita').text
            s_adress = place.find('SkolaMistaVykonuCinnosti')
            s_actual_add = s_adress.find('SkolaMistoVykonuCinnosti')
            s_addres1 =  s_actual_add.find('MistoAdresa1').text
            s_addres2 =  s_actual_add.find('MistoAdresa2').text
            s_addres3 =  s_actual_add.find('MistoAdresa3').text
            dic_scools.append([s_id, s_name,  s_type, s_capasity, '{} {} {}'.format(s_addres1, s_addres2, s_addres3)])
    print('Completed. Total schools and educational centers count: {}'.format(len(dic_scools)))
except:
    print ('Exception', sys.exc_info()[0]) 
columns = ['id', 'name', 'type', 'capacity', 'address']
df_education = pd.DataFrame(dic_scools, columns = columns)
print('Dataframe created: {},{}'.format(df_education.shape[0], df_education.shape[1]))
df_prague.to_csv('prague_schools.csv')
upload_file(storage_creds,'prague_schools.csv','prague_schools.csv')
types = df_education['type'].unique()
print('Types in XML file')
for t in types:
    print(t,df_education[df_education.type == t].iloc[0,1])
with pd.option_context('mode.chained_assignment', None):
    types = ['B00', 'F10', 'C00','H22', 'G11']
    types_shu = types[0:3]
    df_education_selected = df_education.loc[df_education.type.isin(types)]
    df_education_selected.loc[df_education_selected['type'].isin(types_shu), 'Type'] = 'school'
    df_education_selected = df_education_selected.fillna('educatioanal center')
print('Schools and educational centers count {}'.format(df_education_selected.shape[0]))
print('Unique types {}'.format(df_education_selected['Type'].unique()))
df_education_selected.loc[0:, 'District_Name'] = df_education_selected.loc[0:,'address'].apply(lambda x: ' '.join(x.split()[-2:]).lower())
columns_to_drop = ['id','name','capacity', 'type']
df_education_selected.drop(columns = columns_to_drop, inplace = True)
get_coordinates(df_education_selected, 'address')
df_education_selected.drop(columns = ['address'], inplace= True)
df_education_selected.head()
, . .
, , 1623 . GitHub Repository.
OpenStreetMap. , . , .
poi_file_name = files['poi']
population_file_name = files['districts']
df_prague_population, selected_pois = get_data(population_file_name, poi_file_name)
print('Total POIs to explore: {}'.format(len(selected_pois)))
print('Total Districts to explore: {}'.format(len(df_prague_population))) 
start_time = time.time()
bbox = get_bounding_box(df_prague_population['Geometry'])
bbox_string = '_'.join([str(x) for x in bbox])
net_filename = 'network_{}.h5'.format(bbox_string)
print('Selected region bounding box is {}'.format(','.join([str(x) for x in bbox])) )
bbox_aspect_ratio = (bbox[2] - bbox[0]) / (bbox[3] - bbox[1])
print("Build new network")
network = osm.pdna_network_from_bbox(bbox[3], bbox[2], bbox[1], bbox[0],network_type='walk')
print ('Remove low-connectivity nodes and save to h5')
lcn = network.low_connectivity_nodes(impedance=1000, count=10, imp_name='distance')
network.save_hdf5(net_filename, rm_nodes=lcn)
upload_file(storage_creds,net_filename,net_filename)
print('Network with {:,} nodes builded in {:,.2f} secs'.format(len(network.node_ids), time.time()-start_time))
140 822 204 575 . B 10 . GitHub. . 2 .
Data aquisition and cleaning
1,3 . โ : 110 . 130 . . 70 . : , , , . โ 90 100 . โ , .

, . , , , , 160 180 1000 .
, , 1000 .

-10 . โ 8 4.

. . -10 , .
, . . , , , . 1 , , , 1 -10. , 4 , /1000. , , , .

. 1000 , โ .




, , . ( โ , โ , , , .)
. Pandana. . 140 822 5 . ( , , .)

. ( 3 .)
k-. 1950- . , .
EM-, . k.
, , . , , .
, - . , , . .
, โ Elbow. , 4 .
, , = /1300.





4 .
โ2 , . , 15 . , .


, โ2 , , , .
โ 0 โ 1,3. , 10 . . โ 30 .


10-16 . - . 4 .
. , , . , .
- Living Streets (The Pedestriansโ Association) A LIVING STREETS REPORT
- Criterion distances and correlates of active transportation to school in Belgian older adolescents. Delfien Van Dyck, Ilse De Bourdeaudhuij, Greet Cardon & Benedicte Deforche
- Naumann, S., & Kovalyov, M. Y. (2017). Pedestrian route search based on OpenStreetMap. In Intelligent Transport Systems and Travel Behaviour (pp. 87-96). Cham: Springer.
- Pandana
- THE MECHANICS OF WALKING IN CHILDREN
- OSMnx: Python for Street Networks
- : Wikipedia
- : Opendata Prague
- : Opendata Prague