Good CFA Chart Plots




When I do the EFA from the psych package, I can generate some really nice paths with correlations and loads, and like this:


 ![enter image description here](https://fooobar.com//img/dfa657dff14dd3147f02025afa1b505f.png)


using a function `fa.diagram`
  




 (adsbygoogle = window.adsbygoogle || []).push({});
 
  

with the following code:



```
library(psych)
covariances <- ability.cov$cov
correlations <- cov2cor(covariances)
fa.promax <- fa(correlations, nfactors=2, rotate="promax", fm="pa")
fa.diagram(fa.promax, simple=FALSE)

        

        
        
        
 (adsbygoogle = window.adsbygoogle || []).push({});
 
        

    
```

I tend to use CFA more than EFA and would like to be able to model with correlations in the same way. I am using SEM package. I tried the function `pathDiagram`
  




 (adsbygoogle = window.adsbygoogle || []).push({});
 
  

, but it only generates code that can then be inserted into GVedit from Graphviz. I do this and there are no factor correlations or correlations. Also, I don't like cut and paste in another program (although the help file from sem for pathDiagram reads: " **To get graphics output directly, the dot program must be in the system search path.** "; I don't know what to put on the path. what would happen, and if it even had correlations?)


 **I would like to be able to make a trajectory diagram similar to what psych's fa.diagram does for EFA. I would like to be able to do this in R rather than cut and paste.** I don't care which package you use to do this, but I think most people would agree that the simpler the better, and if it can be done inside R, it will give you more freedom in choosing your graphics device.


Here is some sample code for the CFA model to work with:



```
dat3 <- read.table(url("http://dl.dropbox.com/u/61803503/Proj\_2b.dat"), 
            header=T, strip.white = T, as.is=FALSE, 
            na.strings= c("999", "NA", " "))

NHSDA.cov <- cov(dat3)

ete.mod <- specifyModel() 
F1 -> item3, lam1, NA 
F1 -> item5, lam2, NA 
F1 -> item9, lam3, NA 
F1 -> item10, lam4, NA 
F2 -> item4, lam5, NA 
F2 -> item13, lam6, NA 
F2 -> item14, lam7, NA 
F2 -> item15, lam8, NA 
F3 -> item1, lam9, NA 
F3 -> item6, lam10, NA 
F3 -> item7, lam11, NA 
F3 -> item11, lam12, NA 
F3 -> item12, lam13, NA 
F4 -> item2, lam14, NA 
F4 -> item8, lam15, NA 
F4 -> item16, lam16, NA 
F4 -> item17, lam17, NA 
item1 <-> item1, e1, NA 
item2 <-> item2, e2, NA 
item3 <-> item3, e3, NA 
item4 <-> item4, e4, NA 
item5 <-> item5, e5, NA 
item6 <-> item6, e6, NA 
item7 <-> item7, e7, NA 
item8 <-> item8, e8, NA 
item9 <-> item9, e9, NA 
item10 <-> item10, e10, NA 
item11 <-> item11, e11, NA 
item12 <-> item12, e12, NA 
item13 <-> item13, e13, NA 
item14 <-> item14, e14, NA 
item15 <-> item15, e15, NA 
item16 <-> item16, e16, NA 
item17 <-> item17, e17, NA 
F1 <-> F1, NA, 1
F2 <-> F2, NA, 1
F3 <-> F3, NA, 1
F4 <-> F4, NA, 1
F2 <-> F1, rF1F2 #1
F3 <-> F1, rF1F3 #2
F4 <-> F1, rF1F4 #3
F3 <-> F2, rF2F3 #4
F4 <-> F2, rF2F4 #5
F4 <-> F3, rF3F4 #6

ete.sem <- sem(ete.mod, NHSDA.cov, nrow(dat3)) 
(ete.SUM <- summary(ete.sem))

pathDiagram(ete.sem) #the attempt thus far

        

        
        
        
 (adsbygoogle = window.adsbygoogle || []).push({});
 
        

    
```

Running R 2.14.2 on Win 7
Try it like this:



```
pathDiagram(
              model=ete.sem
            , file="PathDiagram"
            , max.rank=paste("item", 1:17, sep="")
            , ignore.double=FALSE
            , edge.labels="values"
            , size=c(8, 8)
            , node.font=c("Helvetica", 10)
            , edge.font=c("Helvetica", 10)
            , rank.direction="LR"
            , digits=3
            , standardize=TRUE
            , graphics.fmt="pdf"
            )

        

        
        
        
 (adsbygoogle = window.adsbygoogle || []).push({});
 
        

    
```


  




 (adsbygoogle = window.adsbygoogle || []).push({});
 
  

This will create it `PathDiagram.pdf`
  




 (adsbygoogle = window.adsbygoogle || []).push({});
 
  

in your working directory. I don't know anyway to display the graph in R.


 ![enter image description here](https://fooobar.com//img/766a7d8d75d3c8dae69e8be5738bed8a.png)
A couple of notes to get started:



> 
> .apply(literal\_eval)
> 
> 
> 


Wouldn't this be better as `map`?



> 
> I then re-create the Dask DF:
> 
> 
> ddf = dd.from\_pandas(ddf\_out, npartitions=nCores)
> 
> 
> 


`ddf_out` was already a dask dataframe, I don't know why you had to do this.



> 
> The columns in result seem to match those in metadir.
> 
> 
> 


The value of `result.columns` is taken from the meta you provided, no computing happens until you ask for it (dask is lazy in most operations). Does the ValueError exception not provide further information?


Here is a full example



```
x = ({'F9_07_PZ_COMP_DIRECT': '0',
  'F9_07_PZ_DIRTRSTKEY_NAME': 'DEBRA MEALY',
  'F9_07_PZ_COMP_OTHER': '0',
  'F9_07_PZ_COMP_RELATED': '0',
  'F9_07_PZ_TITLE': 'CHAIR PERSON',
  'F9_07_PZ_AVE_HOURS_WEEK': '1.00',
  'F9_07_PC_TRUSTEE_INDIVIDUAL': 'X'},
 {'F9_07_PZ_COMP_DIRECT': '0',
  'F9_07_PZ_DIRTRSTKEY_NAME': 'HELEN GORDON',
  'F9_07_PZ_COMP_OTHER': '0',
  'F9_07_PZ_COMP_RELATED': '0',
  'F9_07_PZ_TITLE': 'VICE CHAIR',
  'F9_07_PZ_AVE_HOURS_WEEK': '1.00',
  'F9_07_PC_TRUSTEE_INDIVIDUAL': 'X'})
df = pd.DataFrame({'a': x})
d = dd.from_pandas(df, 1)
meta = pd.DataFrame(columns=['F9_07_PZ_COMP_DIRECT', 
       'F9_07_PZ_DIRTRSTKEY_NAME',
       'F9_07_PZ_COMP_OTHER', 'F9_07_PZ_COMP_RELATED', 'F9_07_PZ_TITLE',
       'F9_07_PZ_AVE_HOURS_WEEK', 'F9_07_PC_TRUSTEE_INDIVIDUAL'], dtype="O")
d.map_partitions(lambda df: df.a.apply(pd.Series), meta=meta).compute()

```

How did I know what `meta` to use? I applied the function to the pandas dataframe - you might use a small piece of the dataframe to do this.


Some additional notes:


* it is an anti-pattern to load the data with pandas, pass to dask workers and then gather the whole result back to a pandas (in memory) dataframe, you are very unlikely to see a speedup this way and may incur a lot of overhead. You are better off loading with something like `dd.read_csv`, and aggregating or writing with dask functions too. Only `compute()` on something that will be small or not return anything (because it involves writing the output). The official examples do not use from\_pandas.
* string and dict processing are python methods, and so hold the interpreter lock (GIL) of any python function: threads will not actually run in parallel. To get parallelism, you need to run in processes, which is most easily achieved using <https://docs.dask.org/en/latest/setup/single-distributed.html>
* the distributed scheduler also gives you access to the dashboard, which has a lot of useful information to diagnose how your system is running. You can also configure a lot about its behaviour, in case you have firewall rules you need to obey. You are mixing [expressions](https://docs.microsoft.com/en-us/dotnet/api/system.linq.expressions.expression?view=netframework-4.7.1) with [lambda expressions](https://docs.microsoft.com/en-us/dotnet/api/system.linq.expressions.lambdaexpression?view=netframework-4.7.1). There are many posts showing how you can combine lambda expressions, but the essential part is to compose expressions from lambda expression [bodies](https://docs.microsoft.com/en-us/dotnet/api/system.linq.expressions.lambdaexpression.body?view=netframework-4.7.1) and rebind the [parameters](https://docs.microsoft.com/en-us/dotnet/api/system.linq.expressions.lambdaexpression.parameters?view=netframework-4.7.1).


The later is usually achieved by a custom [`ExpressionVisitor`](https://docs.microsoft.com/en-us/dotnet/api/system.linq.expressions.expressionvisitor?view=netframework-4.7.1) like this:



```
using System.Linq.Expressions;

public static class ExpressionExtensions
{
    public static Expression ReplaceParameter(this Expression expression, ParameterExpression source, Expression target)
    {
        return new ParameterReplacer { Source = source, Target = target }.Visit(expression);
    }

    class ParameterReplacer : ExpressionVisitor
    {
        public ParameterExpression Source;
        public Expression Target;
        protected override Expression VisitParameter(ParameterExpression node)
        {
            return node == Source ? Target : base.VisitParameter(node);
        }
    }
}

```

Now regarding the EF Core combined query filters. 


Using dictionaries and expression lists seems overcomplicated for what are you doing. Since [`IMutableEntityType`](https://docs.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.metadata.imutableentitytype?view=efcore-2.1) provides read/write access to the [`QueryFilter`](https://docs.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.metadata.imutableentitytype.queryfilter?view=efcore-2.1#Microsoft_EntityFrameworkCore_Metadata_IMutableEntityType_QueryFilter), the same can be achieved with a small set of a custom extension methods.


All they go inside a class like this:



```
using System;
using System.Linq.Expressions;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

public static class QueryFilterExtensions
{
}

```

First method:



```
public static void AddQueryFilter(this IMutableEntityType target, LambdaExpression filter)
{
    if (target.QueryFilter == null)
        target.QueryFilter = filter;
    else
    {
        var parameter = target.QueryFilter.Parameters[0];
        var left = target.QueryFilter.Body;
        var right = filter.Body.ReplaceParameter(filter.Parameters[0], parameter);
        var body = Expression.AndAlso(left, right);
        target.QueryFilter = Expression.Lambda(body, parameter);
    }
}

```

This is a non generic method which combines the exiting filter with passed filter using `AndAlso` (C# `&&`) operator and shows the aforementioned lambda expression combining principles.


However it's not so useful directly, like inside your entity type configuration loop (it can, but requires you to build manually the lambda expression instead of letting C# compiler do that). So here comes the second method:



```
public static void AddQueryFilter<T>(this IMutableEntityType target, Expression<Func<T, bool>> filter)
{
    LambdaExpression targetFilter = filter;
    if (target.ClrType != typeof(T))
    {
        var parameter = Expression.Parameter(target.ClrType, "e");
        var body = filter.Body.ReplaceParameter(filter.Parameters[0], parameter);
        targetFilter = Expression.Lambda(body, parameter);
    }
    target.AddQueryFilter(targetFilter);
}

```

It's a generic method - not quite type-safe, but allows you to use a compile time lambda expression and bind it to the actual entity type as follows:



```
foreach (var entityType in modelBuilder.Model.GetEntityTypes())
{
    if (typeof(IDeleted).IsAssignableFrom(entityType.ClrType))
        entityType.AddQueryFilter<IDeleted>(e => e.DateTimeDeleted == null);
}

```

Looks better, isn't it :)


The last custom extension method is complement to (replacement of) the standard EF Core generic [`HasQueryFilter`](https://docs.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.metadata.builders.entitytypebuilder-1.hasqueryfilter?view=efcore-2.1#Microsoft_EntityFrameworkCore_Metadata_Builders_EntityTypeBuilder_1_HasQueryFilter_System_Linq_Expressions_Expression_System_Func__0_System_Boolean___) method:



```
public static EntityTypeBuilder<TEntity> AddQueryFilter<TEntity>(this EntityTypeBuilder<TEntity> target, Expression<Func<TEntity, bool>> filter)
    where TEntity : class
{
    target.Metadata.AddQueryFilter(filter);
    return target;
}

```

and allows you to replace



```
this.AddToDict<DbMyEntity>(t => t.Name == null || t.Name == "Something");

```

with the more convenient



```
modelBuilder.Entity<DbMyEntity>()
    .AddQueryFilter(t => t.Name == null || t.Name == "Something");

```

**Update (EF Core 3.0):** `QueryFilter` property has been replaced with `GetQueryFilter` and `SetQueryFilter` extension methods. Here's the diagram you requested. All the best!  

Greg  

![I need a serpentine belt routing diagram for a - c528ac5.gif](http://i.fixya.net/uploads/images/c528ac5.gif) Program installation methods differ depending on the type of program you are trying to install. Redhat uses the RPM utility to manage .rpm programs, but if you have a .tar, [tar.gz](/posts/bad_link/36792?url=http%3A%2F%2Ftar.gz%2F), .tgz, or similar install file, the steps for installing are entirely different.



From an old post of mine at the *cough!**shameless plug**cough!* [other forum](http://www.justlinux.com) I moderate:



> 
>  In general, RPM (Redhat Package Manager) files contain pre-compiled, ready-to-run programs and associated files such as instalation/usage documentation, etc.  
> 
> .[tar.gz](/posts/bad_link/36792?url=http%3A%2F%2Ftar.gz%2F) files, on the other hand, often contain the source code for a given program. This isn't always true; but it often is. If that's the case, you'll have to compile the progam yourself; instructions on how to do so are usually included. The .[tar.gz](/posts/bad_link/36792?url=http%3A%2F%2Ftar.gz%2F) extension comes from the following:
> 
> 
> 
> The .tar part indicates that the file actually consists of multiple files combined into one large archive file using the "tar" (Tape ARchive) program. The .gz part means that the resulting .tar archive has been compressed using the "gzip" program (similar to zip or Winzip). tar does not, by itself, compress; it only "wraps" multiple files into a single archive file, hence the subsequent use of gzip to actually compress that archive.
> 
> 
> 
> If your distro supports the use of RPMs (Redhat and Mandrake do),you have a couple of choices:
> 
> 
> 
> - Your distro will include one or more installation program which you can use from within the GUI. These can vary depending on the desktop environment you use, but GnoRPM, KPackage, Software Manager and Package Manager are a few.
> 
> 
> 
> - Any rpm package can be installed from the command line using the "rpm" command. If you're not at the command line, open a terminal window and type "rpm -ivh *filename*" (no quotes). This will install the package and give you some on-screen feedback as the intallation progresses. Read the rpm man pages for more info on usage.
> 
> 
> 
> For .[tar.gz](/posts/bad_link/36792?url=http%3A%2F%2Ftar.gz%2F) or .tgz files, you can accomplish both the decompression and the extraction of the tarball (a common term for a .tar, .[tar.gz](/posts/bad_link/36792?url=http%3A%2F%2Ftar.gz%2F), or .tgz file) using the GNU version of the "tar" command (which is probably the version included with your distro). For example, to uncompress and extract a file, type the following at a prompt:  
> 
> tar xzvf *filename*. The "z" option will run the file through gzip/gunzip first (assuming you've installed gzip), and then extract the files in the tar archive. Once you've done that, look for a README or some instruction file which should tell you how to proceed from there.
> 
> 
> 


Read the following link from RH's support site for more RH 9-specific info on the subject and repost if you have further questions:



<http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/custom-guide/ch-graphical-rpm.html> RIA Services [is now OpenSource](http://jeffhandley.com/archive/2013/07/03/ria-services-is-getting-open-sourced.aspx) with the name "Open RIA Services" (see [on CodePlex](https://openriaservices.codeplex.com/)).


Colin Blair, the project leader, has just announced the first version with EF6 support :
<http://www.openriaservices.net/blog/post/The-Open-RIA-Services-Blog/1016/4-3-Alpha-NuGet-Packages-Released/>


You can install the Nuget package : [RIA Services for Entity Framework 6+](https://www.nuget.org/packages/RIAServicesContrib.EntityFramework).


~~If you want to install the Nuget package [RIA Services for Entity Framework 6+](https://www.nuget.org/packages/RIAServicesContrib.EntityFramework), be sure to select the "include prerelease" item in the top combo Box.~~ [![enter image description here](https://i.stack.imgur.com/oyJ4x.png)](https://i.stack.imgur.com/oyJ4x.png)


Edit: earlier I told you there wasn't a feature in Sketch that allowed you to connect two paths. **There is.** I did a little digging and the feature is hidden away under "Layer -> Paths" menu.


Regardless, for more complex editing on your paths, I recommend you use Affinity Designer or Illustrator. there is a slider labeled hubigraph tile installation, turn that on. then a device is created that can be placed on the dashboard. monthly energy graph in this case

[[grpah2]](https://community.hubitat.com/uploads/default/original/3x/1/f/1f9bb3212a9c5f09119badcf87284edd06a27c55.png "grpah2")

then add that device to you dashboard using attribute as the template. then pick an attribute over to the right.

[[grp…](https://community.hubitat.com/uploads/default/original/3x/4/e/4e9f3c1689dbd166447a7d8b3d76c3d90c3f3263.png "grpah") hi dinesh,

please install the uipath.excel.activities package from package manager and you will have the csv activities also. [[screenshot\_87]](https://aws1.discourse-cdn.com/uipath/original/2x/1/1175d2bafd130d7e504edfe4b0742614f9b28b49.png "screenshot_87.png") try this mate. replacing images and links with your own.



```
<center><script language="JavaScript">
<!--
// Create arrays to contain all the values 
// for links and image locations
link = new Array
image = new Array

link[1]="[http://www.wildexpo.com.au/Aust%20Rep%20Show/](/posts/bad_link/469772?url=http%3A%2F%2Fwww.wildexpo.com.au%2FAust%2520Rep%2520Show%2F)"
image[1]="[http://www.reptilesaustralia.com.au/forums/Ads/wildexpo.gif](/posts/bad_link/469772?url=http%3A%2F%2Fwww.reptilesaustralia.com.au%2Fforums%2FAds%2Fwildexpo.gif)"

link[2]="[http://www.freewebs.com/langylot/](/posts/bad_link/469772?url=http%3A%2F%2Fwww.freewebs.com%2Flangylot%2F)"
image[2]="<http://i14.photobucket.com/albums/a345/Instar/reptilemad.jpg>"

link[3]="[http://www.theherphouse.com/](/posts/bad_link/469772?url=http%3A%2F%2Fwww.theherphouse.com%2F)"
image[3]="[http://www.theherphouse.com/mkportal/templates/default/images/logo.jpg](/posts/bad_link/469772?url=http%3A%2F%2Fwww.theherphouse.com%2Fmkportal%2Ftemplates%2Fdefault%2Fimages%2Flogo.jpg)"

link[4]="[http://www.aftcra.org.au/](/posts/bad_link/469772?url=http%3A%2F%2Fwww.aftcra.org.au%2F)"
image[4]="<http://i14.photobucket.com/albums/a345/Instar/adimage2.jpg>"

link[5]="<http://reptilesaustralia.com.au/index.html>"
image[5]="<http://i14.photobucket.com/albums/a345/Instar/reptilesaustralia.jpg>"

link[6]="<http://www.zoomed.com/>"
image[6]="[http://www.reptilesaustralia.com.au/forums/Ads/zoomed.jpg](/posts/bad_link/469772?url=http%3A%2F%2Fwww.reptilesaustralia.com.au%2Fforums%2FAds%2Fzoomed.jpg)"

link[7]="<http://www.reptilepark.com.au/>"
image[7]="<http://i14.photobucket.com/albums/a345/Instar/arpbanner468x60.jpg>"

link[8]="<http://www.wildlifewarriors.org.au/>"
image[8]="<http://i14.photobucket.com/albums/a345/Instar/www_banner.jpg>"

link[9]="[http://saveourreptiles.proboards50.com/index.cgi](/posts/bad_link/469772?url=http%3A%2F%2Fsaveourreptiles.proboards50.com%2Findex.cgi)"
image[9]="<http://i50.photobucket.com/albums/f335/lnvexotics/Untitled-1undoner11.jpg>"

// Create a random number between 1 and last number
random_num = (Math.round((Math.random()*8)+1))
// Write a link and images with random array
document.write('<a href="' + link[random_num] + '" target="_blank">'); 
document.write('<img src="' + image[random_num] + '" border="0"></a>'); 
-->
</script>
</center>
``` hi,

there is no one-fits-it-all framework that you can use. viktor cheng approach is good but oversimplified.  you should be flexible enough to come up with your own approaches and it comes with practice. 

i recommend the following approach:

1) start with "case in point" book - you can download this book for free everywhere. it's not the best guide on how you should approach the cases, however, it will give you the basic understanding.

2) start practicing cases with partners here or find them locally. !!! find experienced partners or coaches who can provide a good feedback!!!

3) purchase and read viktor cheng book (amazon kindle store) and listen to loms (his website). i recommend to reread the book and listen to loms every 15 cases. every time, having more experience, you’ll be finding something new.

4) practice fast math


 learn how to multiply double digit numbers (https://www.youtube.com/watch?v=6ndkkpzyjho)
 learn the division table up to 1/11 (i.e. 5/6 = 83.3)
 learn how to work with zeros (hint: 4000000 = 4*10ˆ6)
 use math tools (mimir math for ios), math tool on viktor cheng website to practice


5) below you can find a list of the most common case types and some high-level recommendations on structuring:


 market sizing - structuring from the supply or demand side. structuring using a formula or using an issue tree
 profitability - basic profitability framework. remember about different revenue streams and product mix
 market context cases (market entry, new product, acquisition, etc). always start with the big picture "market". finish with something specific to the case (e.g. how to enter?"). structure it as if you are defining the work streams for the real project.
 operational math problem (e.g. should we increase the speed of an elevator or just buy a second one? how should we reduce the queues? etc.) - structuring as a process / value chain, with inflows, operations, and outflows
 cost cutting - i provided the recommendations on structuring it here: https://www.preplounge.com/en/consulting-forum/operations-cases-mck-1105#a2134
 valuation - purely financial structure with cash flows, growth rate, wacc / hurdle rate, etc.
 synergies - revenue synergies (price, qty, mix) and cost synergies (value chain).
 social / economics cases (e.g. how to improve the quality of life in the city? how to increase the revenues of the museum?) - huge variability. practice 3-5 social cases before the interview


6) also, i would try to focus on the most common industries in the following priority(sorted by probability of getting a case): 1-retail and cpg; 2-airlines; 3-telecom; 4-banking; 5-natural resources; 6-tech

7) ! important: don't forget about the fit interview part. crafting you stories and backups stories will require a couple of weeks!

ps

here is a good list of articles regarding the different parts of the case:

1) start with clarifying questions:

https://www.preplounge.com/en/consulting-forum/clarifying-questions-1786#a3956

2) communicating while structuring. here is a long post by me on how to communicate the structure during the case study:

https://www.preplounge.com/en/consulting-forum/how-to-communicate-its-structure-for-the-case-study-1313#a2806

3) using hypothesis. i made a post about hypothesis here:

https://www.preplounge.com/en/consulting-forum/how-to-state-a-hypothesis-and-match-to-the-structure-1156#a2268

4) communicating while making calculations: 


 always tell the interviewer your approach
 check with the interviewer that your approach is correct
 come to the interviewer with some preliminary answers
 check your assumptions with the interviewer


5) communicating during the analysis of graphs / tables


 take a minute to look at the graph. read the graph title. look at the graph type and define the type (pie chart, line chart, etc). look at the legend (ask for clarifying questions if necessary). identify whats going on on the graph. look for: trends, % structures. look for unusual things - correlations, outliers,
 make 3-4 conclusions from the graph. think out loud on potential hypothesis on what could be the root cause / what are the consequences
 prioritize the most important for your current analysis and move forward with the case


6) communicating while having questions on creativity


 ask an interview for a minute to think
 think of several buckets of ideas (e.g. organic growth / non-organic growth / differentiation). remember to think as big as possible
 narrow down to each bucket and generate as many ideas as possible
 present the structure (buckets) and then your ideas


7) communicating your conclusion. you can find a good example i've posted here:

https://www.preplounge.com/en/consulting-forum/how-much-answer-first-should-the-conclusion-be-1231#a2493

8) communicating your fit stories

use the top-down approach while communicating your stories. "the pyramid principle" is the must-read by ex mckinsey on this topic.

i recommend using the star framework:


 in situation, you should briefly provide the context, usually in 1 or 2 sentences
 task usually includes 2 or 3 sentences describing the problem and your objective.
 then you provide a list of specific actions you took to achieve the goal. it should take 1 or 2 sentences per action (usually 3-4 actions). note that the interviewer can stop you any minute and ask for more details.
 the results part should have 1 or 2 sentences describing the outcomes. this part is finalizing your story - make sure it can impress the interviewer and stay in the memory.


best!