diff --git a/measprocess/__init__.py b/measprocess/__init__.py index 2ae7a6f4f6804cf1e6c6721b5370f049d35bf371..fd35b17ab33a1787cb9b897350492da9db149736 100644 --- a/measprocess/__init__.py +++ b/measprocess/__init__.py @@ -1,24 +1,29 @@ -from measprocess.plotting import plot_locations_osm, plot_street_nodes +from .plotting import plot_locations_osm, plot_street_nodes -from measprocess.simulation import TCP_on_lines, ShadowFading +from .simulation import TCP_on_lines, ShadowFading -from measprocess.rtr.fetch import ( +from .rtr.process import ( + process, + interpolate_signal_loc +) + +from .rtr.fetch import ( rtr_details, rtr_overview ) -from measprocess.nemo.process import ( +from .nemo.process import ( link_dataframes ) -from measprocess.geospatial.fetch import ( +from .geospatial.fetch import ( geoseries_streets, geoseries_buildings, pull_from_geodatenviewer_list, pull_from_geodatenviewer_meas ) -from measprocess.geospatial.process import ( +from .geospatial.process import ( project_onto_streets, crop_geoseries_by_bounds, interpolate_series_at_distance, diff --git a/measprocess/rtr/__init__.py b/measprocess/rtr/__init__.py index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..b066ccc3e99432b3ed2d8a1ac280f9a9b60fdefb 100644 --- a/measprocess/rtr/__init__.py +++ b/measprocess/rtr/__init__.py @@ -0,0 +1,4 @@ +from .process import ( + process, + interpolate_signal_loc +) diff --git a/measprocess/rtr/process.py b/measprocess/rtr/process.py index 12e7afa16bcc3f628ba777fc889881d85dd357d5..3f7039530f81f6f9e0d80e423c98f7614060be0c 100644 --- a/measprocess/rtr/process.py +++ b/measprocess/rtr/process.py @@ -70,13 +70,13 @@ def interpolate_signal_loc(path_processed_signal, path_processed_location, path_ :param path_processed_location: path of location.csv :path_processed_final: path of final.csv where the returned dataframe is stored, this is optional, default is None - :return df_signal_final: pandas dataframe containing all not NaN values from signal.csv, + :return df_signal_final: pandas dataframe containing all not NaN values from signal.csv, including interpolated longitude and latitude for each value ''' df_signal = pd.read_csv(path_processed_signal) df_loc = pd.read_csv(path_processed_location) - + df_signal = df_signal[df_signal['cat_technology']=='4G'] #select only 4G techonology df_signal = df_signal[df_signal['lte_rsrp'].notna()] # remove all where lte_rsrp value is missing @@ -117,7 +117,7 @@ def interpolate_signal_loc(path_processed_signal, path_processed_location, path_ df_signal_selected['y'] = ynew df_signal_final.append(df_signal_selected) - + df_signal_final = pd.concat(df_signal_final, ignore_index=True) xy = gpd.GeoDataFrame(geometry=gpd.points_from_xy(df_signal_final.x, df_signal_final.y)).set_crs('EPSG:31287').to_crs('EPSG:4326') df_signal_final.drop(['x','y'], axis=1, inplace=True) #remove x and y in epsg:31287 @@ -128,4 +128,4 @@ def interpolate_signal_loc(path_processed_signal, path_processed_location, path_ if path_processed_final!=None: df_signal_final.to_csv(path_processed_final, index=False) - return df_signal_final \ No newline at end of file + return df_signal_final diff --git a/setup.py b/setup.py index 7c92ca31757462657852cbac4fb5ff45167f343a..62c1639d3f6df737652ff8014306b472b1dd5b8f 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,8 @@ import pathlib from setuptools import setup +import measprocess as mpc + # The directory containing this file HERE = pathlib.Path(__file__).parent