ratpmetro/main.py
def plot_incident_cause(self, year=None, loc=None):
        """
        Plot frequencies of the main cause of incidents

        Args:
            year (int): If ``year`` is given then only tweets within this specific year are used, else then all downloaded tweets are used
            loc (list of str): Time period from ``loc[0]`` to ``loc[1]``
        """
        df = self._df_processed_loc(year=year, loc=loc)
        incident_cause = df["incident_cause"].value_counts().drop(["N/A"])
        incident_cause.plot(kind="pie", autopct="%.0f%%")
        plt.ylabel("")
        return incident_cause.index, incident_cause.values

        Plot frequencies of the main cause of incidents

        Args:
            year (int): If ``year`` is given then only tweets within this specific year are used, else then all downloaded tweets are used
            loc (list of str): Time period from ``loc[0]`` to ``loc[1]``
        
Plot frequencies of the main cause of incidents
Plot frequencies of the main cause of incidents
def plot_incident_cause(self, year=None, loc=None):
        df = self._df_processed_loc(year=year, loc=loc)
        incident_cause = df["incident_cause"].value_counts().drop(["N/A"])
        incident_cause.plot(kind="pie", autopct="%.0f%%")
        plt.ylabel("")
        return incident_cause.index, incident_cause.values
def plot_incident_cause ( self , year = None , loc = None ) : df = self . _df_processed_loc ( year = year , loc = loc ) incident_cause = df [ "incident_cause" ] . value_counts ( ) . drop ( [ "N/A" ] ) incident_cause . plot ( kind = "pie" , autopct = "%.0f%%" ) plt . ylabel ( "" ) return incident_cause . index , incident_cause . values
Plot frequencies of the main cause of incidents
Plot frequencies of the main cause of incidents
"""
        Plot frequencies of the main cause of incidents

        Args:
            year (int): If ``year`` is given then only tweets within this specific year are used, else then all downloaded tweets are used
            loc (list of str): Time period from ``loc[0]`` to ``loc[1]``
        """
self
year
If ``year`` is given then only tweets within this specific year are used, else then all downloaded tweets are used
If ` ` year ` ` is given then only tweets within this specific year are used else then all downloaded tweets are used
loc
None